Cleanup hooks pull clastix/kubectl by bare tag, bypassing the registry override

Open Beginner friendly
#5,590 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, kubernetes

Research direction

Read the four affected templates: packages/apps/kubernetes/templates/delete.yaml, packages/apps/tenant/templates/cleanup-job.yaml, packages/system/dashboard/templates/adopt-configmap-hook.yaml, and packages/system/forklift/templates/forklift-cr-cleanup-hook.yaml. Compare with #3088 and the existing images/*.tag files, then add a unit test for the registry prefix. Done when the hooks use digest-pinned refs rendered through cozy-lib.image and the test verifies the registry override.

Written by the indexing model from the issue text.

Description

triage/needs-triage

Some cleanup hooks still pull docker.io/clastix/kubectl:v1.32 by bare tag, outside cozy-lib.image, so _cluster.images-registry does not apply to them. In an airgapped install or with a registry override these hooks still go to Docker Hub, and a pre-delete hook that cannot pull its image blocks the uninstall.

Affected templates, from the list in #5363:

  • packages/apps/kubernetes/templates/delete.yaml
  • packages/apps/tenant/templates/cleanup-job.yaml
  • packages/system/dashboard/templates/adopt-configmap-hook.yaml
  • packages/system/forklift/templates/forklift-cr-cleanup-hook.yaml

Without a digest these refs are also not reproducible and are not picked up by Renovate or by the image mirror and multi-arch checks.

Fix would be the same shape as #3088 did for harbor and mariadb: move the ref into an images/*.tag file with tag and digest, render it through include "cozy-lib.image", and add a unit test for the registry prefix. #5363 covers Renovate tracking and leaves these four out on purpose.

Dominant language
Go
Stars
2.2k
Forks
209
Avg merge
3d 22h
Merged PRs (30d)
150

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cozystack/cozystack

All issues in cozystack/cozystack

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.