mirror of https://github.com/k3s-io/k3s
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
parent
a5a0e8fde2
commit
29397b4e68
|
@ -150,6 +150,10 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
|
||||||
argsMap["register-with-taints"] = strings.Join(cfg.NodeTaints, ",")
|
argsMap["register-with-taints"] = strings.Join(cfg.NodeTaints, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !cfg.DisableCCM {
|
||||||
|
argsMap["cloud-provider"] = "external"
|
||||||
|
}
|
||||||
|
|
||||||
if ImageCredProvAvailable(cfg) {
|
if ImageCredProvAvailable(cfg) {
|
||||||
logrus.Infof("Kubelet image credential provider bin dir and configuration file found.")
|
logrus.Infof("Kubelet image credential provider bin dir and configuration file found.")
|
||||||
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "KubeletCredentialProviders=true")
|
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "KubeletCredentialProviders=true")
|
||||||
|
|
|
@ -116,6 +116,10 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
|
||||||
argsMap["register-with-taints"] = strings.Join(cfg.NodeTaints, ",")
|
argsMap["register-with-taints"] = strings.Join(cfg.NodeTaints, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !cfg.DisableCCM {
|
||||||
|
argsMap["cloud-provider"] = "external"
|
||||||
|
}
|
||||||
|
|
||||||
if ImageCredProvAvailable(cfg) {
|
if ImageCredProvAvailable(cfg) {
|
||||||
logrus.Infof("Kubelet image credential provider bin dir and configuration file found.")
|
logrus.Infof("Kubelet image credential provider bin dir and configuration file found.")
|
||||||
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "KubeletCredentialProviders=true")
|
argsMap["feature-gates"] = util.AddFeatureGate(argsMap["feature-gates"], "KubeletCredentialProviders=true")
|
||||||
|
|
Loading…
Reference in New Issue