Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: Follow up for , With the change for cloud-controller-manager updating providerID, the is to be updated. But it will fail later in node update call: Should also check validation rule: By adding following line will do the trick. But this will also allow users to manually edit node's providerID Shall we enforce that only cloud-controller-manager can update the providerID? What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?:
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig cluster-lifecycle
cc
/area cloudprovider
being able to update seems pretty reasonable to me. Can you get a PR in for that since we're close to code freeze?
cc
I found this issue when validating against a cluster running azure cloud provider, could you please also check whether it is the same case from you side? serves somewhat like an identity for nodes, thus it wouldn't expect arbitrarily updating. A compromise proposal is to allow updates when the value is not set. This gives controller manager a chance to set it during node register. Created as a fix proposal.
thanks for the patch, I think I'll have some time this weekend to verify this fix!
[MILESTONENOTIFIER] Milestone Labels Complete Issue label settings: sig/cluster-lifecycle: Issue will be escalated to these SIGs if needed. priority/important-soon: Escalate to the issue owners and SIG owner; move out of milestone after several unsuccessful escalation attempts. kind/bug: Fixes a bug discovered during the current release. <detailsAdditional instructions available <a href=""here</a</details

Discussion:
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "podCIDR"), "node updates may not change podCIDR except from "" to valid")) } } <ins> // Allow controller manager updating provider ID when not set if len(oldNode.Spec.ProviderID) == 0 { oldNode.Spec.ProviderID = node.Spec.ProviderID } else { if oldNode.Spec.ProviderID != node.Spec.ProviderID { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "providerID"), "node updates may not change providerID except from "" to valid")) } } </ins> // TODO: move reset function to its own location // Ignore metadata changes now that they have been tested oldNode.ObjectMeta = node.ObjectMeta

}, }, }, false}, <ins> {api.Node{ ObjectMeta: metav1.ObjectMeta{ Name: "update-provider-id-when-not-set", }, }, api.Node{ ObjectMeta: metav1.ObjectMeta{ Name: "update-provider-id-when-not-set", }, Spec: api.NodeSpec{ ProviderID: "provider:///new", }, }, true}, {api.Node{ ObjectMeta: metav1.ObjectMeta{ Name: "update-provider-id-when-set", }, Spec: api.NodeSpec{ ProviderID: "provider:///old", }, }, api.Node{ ObjectMeta: metav1.ObjectMeta{ Name: "update-provider-id-when-set", }, Spec: api.NodeSpec{ ProviderID: "provider:///new", }, }, false}, </ins> } for i, test := range tests { test.oldNode.ObjectMeta.ResourceVersion = "1"