-
Notifications
You must be signed in to change notification settings - Fork 14
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 a finalizer on the InternalHubComponent #191
Add a finalizer on the InternalHubComponent #191
Conversation
61b924f
to
f297988
Compare
test/resources/operator.open-cluster-management.io_internalhubcomponents_crd.yaml
Outdated
Show resolved
Hide resolved
f297988
to
632b6ff
Compare
@@ -19,6 +19,7 @@ const ( | |||
case2ManagedClusterAddOnName string = "config-policy-controller" | |||
case2ManagedClusterAddOnCR string = "../resources/config_policy_addon_cr.yaml" | |||
case2ClusterManagementAddOnCRDefault string = "../resources/config_policy_clustermanagementaddon.yaml" | |||
case2InternalHubComponentCRDefault string = "../resources/grc_internalhubcomponent.yaml" |
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.
Is this CRD??
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.
It's the instance of the CR. I could rename it ...DefaultCR
if you think that's better
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.
Good DefaultCR anything except "-D"
/hold Important comments about this approach have been made in stolostron/klusterlet-addon-controller#315, I'll need to look into. |
In some uninstallation situations, the finalizers on Policies and ConfigurationPolicies were not always resolved before the addons and the addon-controller were stopped. This resulted in resources and namespaces being stuck, and could cause issues during a re-install. Now, this addon-controller will manage a finalizer on the "grc" InternalHubCluster, to prevent the addon-controller from being stopped while policy ManagedClusterAddOns still exist. When the InternalHubComponent is present, anything that creates a ManagedClusterAddOn for this controller must ensure that they are deleted when the InterrnalHubComponent is deleted. This can be done with OwnerReferences. In RHACM, the klusterlet-addon-controller will do this. Refs: - https://issues.redhat.com/browse/ACM-14707 Signed-off-by: Justin Kulikauskas <[email protected]>
632b6ff
to
87924b2
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JustinKuli, yiraeChristineKim 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 |
We're going in another direction. |
In some uninstallation situations, the finalizers on Policies and ConfigurationPolicies were not always resolved before the addons and the addon-controller were stopped. This resulted in resources and namespaces being stuck, and could cause issues during a re-install.
Now, this addon-controller will manage a finalizer on the "grc" InternalHubCluster, to prevent the addon-controller from being stopped while policy ManagedClusterAddOns still exist.
When the InternalHubComponent is present, anything that creates a ManagedClusterAddOn for this controller must ensure that they are deleted when the InterrnalHubComponent is deleted. This can be done with OwnerReferences. In RHACM, the klusterlet-addon-controller will do this.
Refs: