mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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 ```
This commit is contained in:
commit
3447dc0b13
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user