Skip to content

Add kube-janitor annotation

Dmytro Makovey requested to merge buildx-kube-janitor into master

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

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 in buildx cluster under the namespace corresponding to CI_COMMIT_REF_SLUG
  • inspect the created pods:
    k get -o json namespace build-buildx-kube-janitor | jq .metadata.annotations
    output should look like:
    {
      "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

Merge request reports