-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clusterctl move takes ownership of all fields #7473
Comments
/triage accepted /area clusterctl |
/assign I can work on this. I will sync with @fabriziopandini on this. |
Yup please sync with Fabrizio. He also wanted to talk to Vince about it Added to the milestone for now so we can track it, but basically TBD. |
fyi. Some prior art on how to write managed fields: cluster-api/cmd/clusterctl/client/cluster/mover.go Lines 1177 to 1204 in eaf2e61
(we dropped this code later on again) |
@chrischdi Do you remember why we dropped that code? // patchTopologyManagedFields patches the managed fields of obj if parts of it are owned by the topology controller.
// This is necessary to ensure the managed fields created by the topology controller are still present and thus to
// prevent unnecessary machine rollouts. Without patching the managed fields, clusterctl would be the owner of the fields
// which would lead to co-ownership and also additional machine rollouts. (xref: #6710) I guess because we maybe didn't need it for this anymore?
But I think this is still the case:
Would be just good to know so we don't add it again and then drop it again because we missed something. Independent of that, I think the new implementation should just preserve all managed fields 100% for all resources so that a clusterctl move doesn't change the managed fields at all. |
If I'm right:
|
Given this is something that impact everyone who does bootstrap pivot I think that we should implement a minimal fix in clusterctl (~same of the example linked above), and cherry-pick it to the 1.2 branch then, while working at SSA for label/annotation propagation we can eventually consider if to add a more sophisticated fix. |
As the title says when using clusterctl move, clusterctl owns all fields after the move.
Steps to reproduce
The consequence of that issue is that
kubectl apply
or other clients (e.g. the Cluster topology controller) won't be able to remove fields without explicitly taking ownership first by setting fields to a different value.kubectl apply --server-side=true
won't be able to change field values except if--force-conflicts
is used.I think we have to fix this. My suggestion is to modify
clusterctl move
so that the managed fields are not changed during the move./kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]
The text was updated successfully, but these errors were encountered: