mirror of https://github.com/k3s-io/k3s
Merge pull request #65195 from luxas/kubeadm_fix_cloudprovider_upgrade
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kubeadm: Fix a small config upgrading issue with .CloudProvider **What this PR does / why we need it**: Fixes a panic in the conversion code where `.NodeRegistration.KubeletExtraArgs` could be nil :/ **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` @kubernetes/sig-cluster-lifecycle-pr-reviews /kind bug /priority critical-urgent /milestone v1.11 /status approved-for-milestonepull/8/head
commit
b005f2fba3
|
@ -113,6 +113,9 @@ func UpgradeCloudProvider(in *MasterConfiguration, out *kubeadm.MasterConfigurat
|
||||||
if out.ControllerManagerExtraArgs == nil {
|
if out.ControllerManagerExtraArgs == nil {
|
||||||
out.ControllerManagerExtraArgs = map[string]string{}
|
out.ControllerManagerExtraArgs = map[string]string{}
|
||||||
}
|
}
|
||||||
|
if out.NodeRegistration.KubeletExtraArgs == nil {
|
||||||
|
out.NodeRegistration.KubeletExtraArgs = map[string]string{}
|
||||||
|
}
|
||||||
|
|
||||||
out.APIServerExtraArgs["cloud-provider"] = in.CloudProvider
|
out.APIServerExtraArgs["cloud-provider"] = in.CloudProvider
|
||||||
out.ControllerManagerExtraArgs["cloud-provider"] = in.CloudProvider
|
out.ControllerManagerExtraArgs["cloud-provider"] = in.CloudProvider
|
||||||
|
|
Loading…
Reference in New Issue