Skip to content

Commit eda5a29

Browse files
authored
Merge pull request kubernetes#77513 from ereslibre/upload-cluster-configuration-after-upgrade
kubeadm: upload the `ClusterConfiguration` during the upgrade
2 parents baa2030 + b6f4bb3 commit eda5a29

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/kubeadm/app/phases/uploadconfig/uploadconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ func UploadConfiguration(cfg *kubeadmapi.InitConfiguration, client clientset.Int
101101
kubeadmconstants.ClusterStatusConfigMapKey: string(clusterStatusYaml),
102102
},
103103
}, func(cm *v1.ConfigMap) error {
104+
// Upgrade will call to UploadConfiguration with a modified KubernetesVersion reflecting the new
105+
// Kubernetes version. In that case, the mutation path will take place.
106+
cm.Data[kubeadmconstants.ClusterConfigurationConfigMapKey] = string(clusterConfigurationYaml)
107+
// Mutate the ClusterStatus now
104108
return mutateClusterStatus(cm, func(cs *kubeadmapi.ClusterStatus) error {
105109
// Handle a nil APIEndpoints map. Should only happen if someone manually
106110
// interacted with the ConfigMap.

0 commit comments

Comments
 (0)