-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix helm uninstall cleanup by adding finalizers and cleaning them from the controller #2433
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nikola-jokic
requested review from
mumoshu,
toast-gear and
a team
as code owners
March 22, 2023 13:39
nikola-jokic
force-pushed
the
nikola-jokic/finalize-helm-uninstall
branch
from
March 22, 2023 14:02
96215fe
to
254bb1c
Compare
nikola-jokic
commented
Mar 22, 2023
nikola-jokic
commented
Mar 22, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
charts/gha-runner-scale-set-controller/templates/manager_cluster_role.yaml
Outdated
Show resolved
Hide resolved
nikola-jokic
force-pushed
the
nikola-jokic/finalize-helm-uninstall
branch
2 times, most recently
from
March 28, 2023 12:53
010becc
to
a2f7335
Compare
…pection (#2391) Co-authored-by: Tingluo Huang <tingluohuang@github.com>
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
TingluoHuang
reviewed
Apr 3, 2023
TingluoHuang
reviewed
Apr 3, 2023
controllers/actions.github.com/autoscalingrunnerset_controller.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
TingluoHuang
approved these changes
Apr 3, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To lower the amount of permissions required for the manager to operate, manager role binding is introduced when the autoscaling runner set is applied.
But when doing helm uninstall, role and role bindings are deleted usually before the
AutoscalingRunnerSet
can clean up resources, causing errors.This change adds finalizers to resources applied by helm, and extends the manager cluster role, so it can clean up Role in the last step of clean-up.
We added finalizers to the following resources in
gha-runner-scale-set
in AutoscalingRunnerSet namespace:Finalizer name is changed for the GitHub secret in
gha-runner-scale-set
fromactions.github.com/secret-protection
toactions.github.com/cleanup-protection
The order in which resources are being patched to remove finalizers:
Note: only resources that are specified in
AutoscalingRunnerSet.ObjectMeta.Annotations
are going to be patched.