mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
Do not go into standalone mode when --require-kubeconfig
is passed (fix #32085)
This commit is contained in:
parent
c4e2ade371
commit
fe768dd405
@ -298,7 +298,7 @@ func initConfigz(kc *componentconfig.KubeletConfiguration) (*configz.Config, err
|
|||||||
|
|
||||||
func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
|
func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
|
||||||
// TODO: this should be replaced by a --standalone flag
|
// 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 == "" {
|
if s.ExitOnLockContention && s.LockFilePath == "" {
|
||||||
return errors.New("cannot exit on lock file contention: no lock file specified")
|
return errors.New("cannot exit on lock file contention: no lock file specified")
|
||||||
|
Loading…
Reference in New Issue
Block a user