Commit fe768dd4 authored by Ilya Dmitrichenko's avatar Ilya Dmitrichenko

Do not go into standalone mode when `--require-kubeconfig` is passed (fix #32085)

parent c4e2ade3
......@@ -298,7 +298,7 @@ func initConfigz(kc *componentconfig.KubeletConfiguration) (*configz.Config, err
func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
// TODO: this should be replaced by a --standalone flag
standaloneMode := (len(s.APIServerList) == 0)
standaloneMode := (len(s.APIServerList) == 0 && !s.RequireKubeConfig)
if s.ExitOnLockContention && s.LockFilePath == "" {
return errors.New("cannot exit on lock file contention: no lock file specified")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment