-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add ManagedByLabel to user ClusterBackup resources #13396
Conversation
pkg/resources/resources.go
Outdated
@@ -1071,6 +1072,7 @@ const ( | |||
ClusterBackupUsername = "velero" | |||
ClusterBackupServiceAccountName = "velero" | |||
ClusterBackupNamespaceName = "velero" | |||
ClusterBakcupControllerName = "cluster-backup-controller" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo.
ClusterBakcupControllerName = "cluster-backup-controller" | |
ClusterBackupControllerName = "cluster-backup-controller" |
pkg/ee/cluster-backup/controller.go
Outdated
@@ -323,6 +324,7 @@ func (r *reconciler) undeployClusterBackupUserClusterCRDs(ctx context.Context, u | |||
LabelSelector: labels.SelectorFromSet( | |||
map[string]string{ | |||
"component": "velero", | |||
appskubermaticv1.ApplicationManagedByLabel: resources.ClusterBakcupControllerName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should apply to the other resources as well, else we'll still delete Deployments and DaemonSets we never managed.
/test pre-kubermatic-etcd-launcher-e2e |
/approve Personally I would not have put a controller name constant in the resources package, cause that's not where it belongs, and would have used an objectModifier to apply the labels instead of editing every single reconciler function to do it manually (and therereby getting rid of the new "need" to have the controller name in a completely foreign, remote, far away package), but nwe're in a hurry, so I guess... let's merge it. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xrstf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
@xrstf: once the present PR merges, I will cherry-pick it on top of release/v2.25 in a new PR and assign it to you. 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. |
LGTM label has been added. Git tree hash: 9b62bc9b5e1d7f0d5e0acee50696bb27b079f4d4
|
@xrstf: new pull request created: #13397 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. |
What this PR does / why we need it:
This PR fixes a bug where Velero CRDs are removed from user clusters if it's deployed externally and Cluster Backup is disabled.
Which issue(s) this PR fixes:
Fixes #13393
What type of PR is this?
/kind bug
Special notes for your reviewer:
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: