-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use a predelete hook to cleanly uninstall the config-policy-controller #60
Use a predelete hook to cleanly uninstall the config-policy-controller #60
Conversation
open-cluster-management.io/addon-framework v0.5.1-0.20221206033210-55b40b1bc8c6 | ||
open-cluster-management.io/api v0.8.1-0.20220919023232-a2688935edf3 |
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.
Were these necessary for a feature?
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.
Not necessary, but I saw that we were running a prerelease version and decided to sneak in an update.
I can make this a separate PR.
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.
And I hadn't noticed we had a pre-release version. The update should be good.
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.
The prerelease was to catch a hosted mode annotation update, which had a typo. (You know me and typos!) Update should be fine.
/hold until the config-policy-controller PR is approved |
The tests pass locally once the config-policy-controller PR is merged. |
e033bdc
to
723b1a2
Compare
This change makes it so that a finalizer is added to the config-policy-controller ManagedClusterAddOn object. Now when it is deleted, it will trigger an additional ManifestWork to create a Pod which signals to the config-policy-controller that it's being uninstalled and it waits for all ConfigurationPolicy objects to have their finalizers removed before exiting. Once the Pod exits successfully, the finalizer on the ManagedClusterAddOn object is removed and the config-policy-controller uninstall proceeds. If there are a lot of policies, it may take longer than 30 seconds, so the grace period was bumped up to 120 seconds to exit cleanly. Note that now with KIND_VERSION set to minimum, it uses a newer version for the Hub to match the lowest supported version for the Hub. This is to work around this: open-cluster-management-io/api#206 Signed-off-by: mprahl <mprahl@users.noreply.github.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JustinKuli, mprahl 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 |
/unhold |
This change makes it so that a finalizer is added to the
config-policy-controller ManagedClusterAddOn object. Now when it is deleted,
it will trigger an additional ManifestWork to create a Pod which
signals to the config-policy-controller that it's being uninstalled and
it waits for all ConfigurationPolicy objects to have their finalizers
removed before exiting. Once the Pod exits successfully, the finalizer
on the ManagedClusterAddOn object is removed and the
config-policy-controller uninstall proceeds.
If there are a lot of policies, it may take longer than 30 seconds, so
the grace period was bumped up to 120 seconds to exit cleanly.
Note that now with KIND_VERSION set to minimum, it uses a newer version
for the Hub to match the lowest supported version for the Hub. This is
to work around this:
open-cluster-management-io/api#206
See this related PR:
open-cluster-management-io/config-policy-controller#104