-
Notifications
You must be signed in to change notification settings - Fork 259
OCPSTRAT-485: Add ConfigMap revision pruner for API server operators #2063
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
base: master
Are you sure you want to change the base?
Conversation
Add the new controller ConfigMapRevisionPruneController that prunes old revisioned ConfigMaps no longer in use by operand pods. This complements the existing SecretRevisionPruneController. Key features: - Prunes ConfigMaps by prefix (e.g., revision-status-, installer-status-) - Preserves the 5 most recent revisions per prefix independently - Only prunes revisions below the minimum pod revision in use Also adds WithRevisionPruneController to APIServerControllerSet, allowing API server operators to configure ConfigMap revision pruning alongside the existing secret pruning capability.
|
@grandeit: This pull request references OCPSTRAT-485 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature to target the "4.21.0" version, but no target version was set. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: grandeit The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @grandeit. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
bertinatto
left a comment
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.
Hey @grandeit, thanks a lot for this PR!
The changes here seem OK, but I’d be in favor of consolidating this controller with the secretspruner controller. Both controllers share the same pruning criteria for secrets and ConfigMaps, so having a single pruner would eliminate duplicated logic. The only real difference between the controller introduced in this PR and the secretpruner controller is the resource type being pruned (Secret vs. ConfigMap); the rest of the logic is the same.
Additionally, both ConfigMap and Secret revisions are created by the same controller (revisioncontroller), so it would be more consistent to also have a single controller responsible for pruning them.
Thoughts?
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.
Since the other package is called secretspruner, probably a better name here would be configmappruner
|
/ok-to-test |
@grandeit also, if you can, please create a proof PR pointing the library-go dependency in one of our operators to use the version that you have here (see an example here). |
|
@grandeit: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Add the new controller ConfigMapRevisionPruneController that prunes old revisioned ConfigMaps no longer in use by operand pods. This complements the existing SecretRevisionPruneController.
Key features:
Also adds WithRevisionPruneController to APIServerControllerSet, allowing API server operators to configure ConfigMap revision pruning alongside the existing secret pruning capability.
With this, it will be possible to add revision pruning to the
openshift-apiserverandoauth-apiserverin the future. As described in RFE-3492 and RFE-4143.