Skip to content
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

Deprecate clusterctl backup and clusterctl restore #6992

Closed
fabriziopandini opened this issue Jul 29, 2022 · 9 comments · Fixed by #7005
Closed

Deprecate clusterctl backup and clusterctl restore #6992

fabriziopandini opened this issue Jul 29, 2022 · 9 comments · Fixed by #7005
Assignees
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@fabriziopandini
Copy link
Member

Detailed Description

clusterctl backup and clusterctl restore command names are misleading and they drive a lot of confusion in the users.

Those command does not provide a full backup and restore solution, they never intended to be.
Instead they allow to break down the cluster move command workflow into two parts; clusterctl backup is the first part where move reads from the source cluster, clusterctl restore is the second part where move writes to the target cluster.

In order to avoid further confusion I suggest to:

  • deprecate clusterctl backup and offer the same functionality by cluster move --to-folder, where --to-folder is a new flag that is mutually exclusive of the existing to-kubeconfig
  • deprecate clusterctl restore and offer the same functionality by cluster move --from-folder, where --from-folder is a new flag that is mutually exclusive of the existing kubeconfig

/kind api-change
/kind cleanup

@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jul 29, 2022
@fabriziopandini fabriziopandini added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jul 29, 2022
@oscr
Copy link
Contributor

oscr commented Jul 30, 2022

Is this a "help wanted" issue? If so, I would love to take it when I get back from the fells next week.

@fabriziopandini
Copy link
Member Author

/help-wanted

@oscr, feel free to assign yourself to this task

@oscr
Copy link
Contributor

oscr commented Aug 1, 2022

/assign

@mmmmmmpc
Copy link

Please don't do this.
A cluster backup and restore tool abd procedure is needed in case the management cluster suffers any incidence.
Extending this to include the resources needed to fully save a management cluster and restore it would have a very positive impact in users.

@oscr
Copy link
Contributor

oscr commented Sep 26, 2022

@mmmmmmpc Could you please explain a little more? No functionality is being removed. It's just changed name and location: backup -> move --to-directory and restore -> move --from-directory.

@fabriziopandini
Copy link
Member Author

And this change is meant to avoid confusion

Those command does not provide a full backup and restore solution, they never intended to be.

backup and restore should be executed using tools like velero or by leveraging GitOps tools capable to consider everything there is in a Cluster, not only CAPI resources in a namespace

@kfox1111
Copy link

Fair. But does this mean the backup commands are successful in backing up/restoring all the bits the cluster api is in charge of?

IE, say you have a management cluster, as per recommended best practice. Is dumping the objects via backup, and saving them enough to be able to reinstall the management cluster and have it re-manage the managed cluster?

IE, this backup on mgmt cluster, and velero on managed cluster?

@mmmmmmpc
Copy link

@fabriziopandini ... the Management Cluster is not a cluster to handle any workload but a very special case.
It handles all the deployment and changes to the productive clusters (i.e. worload clusters and shared services clusters).
Velero is intended to work to restore the productive clusters ... while clusterctl can take care of integrating them into a running management cluster.
If you see it from this perspective, the restore of a management cluster, in case it gets corrupted or destroyed, is not acommon task related to productive workloads but a task related to rebuilding the management infrastructure, which in this case is hte management cluster.
Having clusterctl is the place for that (which for example, takes care of moving prodductive clusters from one management cluster o another ... and no one would say, "do that with velero"), and having the backup option for it was a very nice first step.
If kept as it is, we all have the chance to collaborate in adding what is needed to clusterctl so that it can backup and restore the special case that is a management cluster.

My 0.02 €

@oscr
Copy link
Contributor

oscr commented Sep 27, 2022

This sounds like a much larger discussion than the scope of this specific issue. Maybe we could start a discussion / office hours / take it on slack to get more people involved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants