-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v2.6.3-patch3] Private registry cleanup job 2.6.3 patch3 (#37158)
* Add private registry information to node cleanup job The node cleanup job ignored cluster private registry information. This caused issues when trying to remove nodes from a custom RKE1 cluster when private registries were enforced by something like OPA Gatekeeper. Now, just as with cluster agent deployment, private registry information is added whenever needed. * Refactor node-cleanup job implementation It was determined that some of the code around creating and deleting the node-cleanup job was producing unexpected results like non-nil errors with empty error messages. In addition, the cleanup job is being leftover in some case. This code makes the error messages more descriptive and adds retries to try to ensure that the cleanup job gets deleted. * Add feature flag for custom RKE1 node cleanup It is common for users to cleanup their own custom nodes when deleting them from Rancher. This has caused issue with jobs and/or pods being left around or nodes not being deleted properly. This change adds a feature flag to turn the cleanup off globally if a user doesn't need it. * Delete node-cleanup pods that aren't deleted If a pod is stuck because it has been scheduled on a node that node longer exists, then deleting the job may not be enough to delete this pod. This would cause the job deletion to hang forever. This change deletes the pod with gradePeriodSeconds of 0 to force its deletion.
- Loading branch information
Donnie Adams
committed
Apr 2, 2022
1 parent
85dfd7c
commit 0a60d47
Showing
2 changed files
with
86 additions
and
30 deletions.
There are no files selected for viewing
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
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