-
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
Re-define the scope of clusterctl move #3354
Comments
I could potentially see a two different use cases for move:
I think so, otherwise we are deferring the complexity of doing so onto the user.
If we do not move them for the user, then we should block operations if they do not already exist, otherwise we will create a situation where the management cluster behaves very differently pre and post move. If we do decide that we should delete them as part of the move, we should probably only do so after they are no longer in use by any Clusters that remain in the source management cluster. Ideally I'd like to rely on ownerReferences for this, but I don't think we can since they do not have a Namespace field. We also cannot rely on finalizers since an owning controller would not be blocked on performing reconciliation of deletion. Which leaves two options:
Given the above, I think we should probably support deletion for resources that we explicitly know about (defined in-tree for Cluster API), and defer handling of other global resources to provider (or integration) specific post-move instructions. It might be good to start thinking longer term if we could support some of this through a plugin mechanism, though. Similar to the provider-specific pre-requisites, it would be nice to have a way to automate some of these provider-specific steps, but we should not necessarily own the implementation of them.
We probably need to allow for providers/integrations to define pre (and post) steps needed around the use of That way they can specify any pre actions needed to "pause" reconciliation during the move and any "post" actions needed to resume reconciliation and possibly clean up resources left behind.
I think use of the ownerRef chain is good for any resources that are namespace scoped and exist in the same namespace, but it definitely breaks down for global and cross-namespace references. I don't think we should move away from the use of ownerRef, but we should likely explore an alternative that could be used in a common way for any global resources. I'm not sure that we should support cross-namespace references unless there is a specific use case that is defined that we agree to support, though.
I don't necessarily think that we can. We can define a convention for supported migration, but can likely leave the rest to pre/post steps needed for a specific provider/integration which may need it. In those cases, I'm wondering if it would help to add a flag to the move command to skip unpausing of the resources until the post steps can be done. We might need a pause/unpause command that can be run after any post steps are run to resume reconciliation of resources, though.
I don't think we should support moving the provider controllers, but to the extent that we can we should move provider resources. Alternatively, going back to the idea of a plugin system, we could define provider-specific hooks that a provider can optionally implement, which would allow them to handle their resources in the appropriate ways.
There are two that I can see:
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
/area clusterctl |
|
@voor Would it be possible to mark external objects like those ConfigMaps with the See https://cluster-api.sigs.k8s.io/clusterctl/provider-contract.html?highlight=move#move for more info |
@fabriziopandini Do we still need this issue? |
IMO yes, at least until we can derive some AI from this discussion... |
Moving global objects are needed for CAPA multi-tenancy and we need to backport it to v0.3 as we will support multitenancy in the next release. CAPZ also needs this support in v0.3 releases IIRC @nader-ziada |
@sedefsavas I suggest to open a separated issue for the specific problem of moving global objects so we can rally on details:
|
@vincepri I'm +1 for closing this issue given that we have an influx of activities on more detailed use cases:
|
/close |
@vincepri: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Detailed Description
Clusterctl move was introduced in v0.3 as an evolution of pivot command but with a smaller scope that the original command.
The moving process was designed around the bootstrap use case, and it relies on three core ideas:
However, recently a set of new requirements are being presented, so, considering also the discussions about v1alpha4 roadmap, it is now the right time for considering if the scope of this command should be re-defined.
Following topics should be addressed IMO:
What to include in a move operation
The initial design was conceived in order to move all the Clusters in a namespace.
Recently this was extended for including ClusterResourseSet as a root (#3243), there is a WIP PR for identity principals (#3254) and a PR for moving objects which are not related to Cluster API provider (#3337)
What use case are we covering
/kind feature
@wfernandes @vincepri
The text was updated successfully, but these errors were encountered: