Add kube-janitor annotation
What does this MR do?
To make sure buildx
agents are properly cleaned up after use and prevent premature agent removal - add appropriate annotation to namespace indicating intent to use agent for the next 6 hours.
Related issues
- related to Configure CNG build scripts to allow multi-arch... (gitlab-org/distribution/team-tasks#1142 - closed) • Dmytro Makovey • 16.6 • At risk
- related to [CI] [Spike] Investigate use of kube-janitor fo... (gitlab-org/distribution/team-tasks#1263 - closed) • Dmytro Makovey • 16.9
- related to https://gitlab.com/gitlab-org/distribution/infrastructure/kubernetes-provisioning/-/issues/29+s
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Integration tests added to GitLab QA -
The impact any change in container size has should be evaluated -
New dependencies are managed with dependencies.io
Testing
- (re)run any of the jobs from pipeline building images.
buildx
pods will bet instantiated inbuildx
cluster under the namespace corresponding toCI_COMMIT_REF_SLUG
- inspect the created pods:
k get -o json namespace build-buildx-kube-janitor | jq .metadata.annotations
{ "janitor/expires": "2023-11-14T22:21" }
- re-running any of the build jobs from the pipeline should bump above annotation expiration time correspondingly
Edited by João Alexandre Cunha