Unverified Commit 3447dc0b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #56008 from xiangpengzhao/kubeadm-dkc-panic

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>. Fix panic when assigning configmap UID of kubelet configuration. **What this PR does / why we need it**: **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 https://github.com/kubernetes/kubeadm/issues/553 **Special notes for your reviewer**: /cc @luxas **Release note**: ```release-note NONE ```
parents d52d1602 4453f2c7
......@@ -86,7 +86,13 @@ func UpdateNodeWithConfigMap(client clientset.Interface, nodeName string) error
return false, nil
}
node.Spec.ConfigSource.ConfigMapRef.UID = kubeletCfg.UID
node.Spec.ConfigSource = &v1.NodeConfigSource{
ConfigMapRef: &v1.ObjectReference{
Name: kubeadmconstants.KubeletBaseConfigurationConfigMap,
Namespace: metav1.NamespaceSystem,
UID: kubeletCfg.UID,
},
}
newData, err := json.Marshal(node)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment