-
Notifications
You must be signed in to change notification settings - Fork 60
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 DevWorkspace Pruner (operator-lib/prune package) #1402
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4a44124
to
4dc83c6
Compare
Signed-off-by: Oleksii Kurinnyi <[email protected]>
…rate_all Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
4dc83c6
to
cdbf388
Compare
Signed-off-by: Oleksii Kurinnyi <[email protected]>
78b0e3d
to
3218747
Compare
What does this PR do?
This pull request adds a new controller that prunes (removes) DevWorkspaces based on these rules:
DevWorkspaceOperatorConfig
(DWOC) resource.cron
library, allowing for flexible configuration of the pruning frequency.What issues does this PR fix or reference?
resolves #1376
Is it tested? How?
DevWorksapceOperatorConfig
initially does not have pruning enabled by defaultCleanupCronJob
section in theconfig.workspace
section of the DWOC.CleanupCronJob
section, ensure thatenable: false
.DevWorkspaceOperatorConfig
to enable pruning and set parameters:kubectl patch DevWorkspaceOperatorConfig devworkspace-operator-config \ -n devworkspace-controller \ --type=merge \ -p '{"config": {"workspace": {"cleanupCronJob": {"enable": true, "dryRun": true, "retainTime": 60, "schedule": "* * * * *"}}}}'
kubectl patch DevWorkspaceOperatorConfig devworkspace-operator-config \ -n devworkspace-controller \ --type=merge \ -p '{"config": {"workspace": {"cleanupCronJob": {"dryRun": false }}}}'
PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che