Browse Source

Re-add --cloud-provider=external kubelet arg

The cloud-provider arg is deprecated and cannot be set to anything other than external, but must still be used or node addresses are not set properly.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/5636/head v1.24.1-rc2+k3s1
Brad Davidson 3 years ago committed by Brad Davidson
parent
commit
29397b4e68
  1. 4
      pkg/daemons/agent/agent_linux.go
  2. 4
      pkg/daemons/agent/agent_windows.go

4
pkg/daemons/agent/agent_linux.go

@ -150,6 +150,10 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
argsMap["register-with-taints"] = strings.Join(cfg.NodeTaints, ",")
}
if !cfg.DisableCCM {
argsMap["cloud-provider"] = "external"
}
if ImageCredProvAvailable(cfg) {
logrus.Infof("Kubelet image credential provider bin dir and configuration file found.")
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "KubeletCredentialProviders=true")

4
pkg/daemons/agent/agent_windows.go

@ -116,6 +116,10 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
argsMap["register-with-taints"] = strings.Join(cfg.NodeTaints, ",")
}
if !cfg.DisableCCM {
argsMap["cloud-provider"] = "external"
}
if ImageCredProvAvailable(cfg) {
logrus.Infof("Kubelet image credential provider bin dir and configuration file found.")
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "KubeletCredentialProviders=true")

Loading…
Cancel
Save