Skip to content

feat(k8s): image-pins refuses an image on the latest tag - #2617

Merged
dan-petty merged 2 commits into
mainfrom
ci/2093-latest-image-tag
Oct 29, 2026
Merged

dan-petty merged 2 commits into
mainfrom
ci/2093-latest-image-tag

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops k8s image-pins refuses each rendered image that has no digest and the latest tag or no tag, unless an ImageUpdater object names its repository. It exits 1 before it resolves an image, so a refused pull request spends no Docker Hub pull. The CI job image-pins already runs the command on each pull request that changes k8s/, so the job now fails on such an image and passes for the untagged service image that Image Updater pins.

The chart render runs helm template --skip-tests. Argo CD does not apply a Helm test hook, so a test pod's image is never pulled. This removes the qdrant test pod's bci-base:latest and the grafana test pod's bats image from the pins.

The rule is in the image-pins render and not in a kube-linter custom check. kube-linter 0.8.3 with the block list .*:(latest)$ passes a copy of k8s/ in which a value file sets tag: "latest", because it reads raw files and does not render a chart with the value files. Five value files set an image tag.

Closes #2093

devops k8s image-pins now refuses each rendered image that has no digest
and the latest tag or no tag, unless an ImageUpdater object names its
repository. It exits 1 before it resolves an image, so a refused pull
request spends no Docker Hub pull. The CI job image-pins runs the command
on each pull request that changes k8s/, so the job now fails on such an
image.

The chart render runs helm template --skip-tests: Argo CD does not apply
a Helm test hook, so a test pod's image is never pulled. This removes the
qdrant test pod's bci-base:latest and the grafana test pod's bats image
from the pins.

A kube-linter custom check over k8s/ was rejected: kube-linter 0.8.3
passes a copy of k8s/ in which a value file sets tag "latest", because it
does not render a chart with the repository's value files.
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results (worktree at 6e225b7, rebased on origin/main 38a0a442):

  • Fail first: with the new tests and no source change, tests/k8s/test_image_pins.py fails to import (ImportError: cannot import name 'names_latest').
  • After the change: tests/k8s/test_image_pins.py passes, 46 tests. tests/test_docs.py, tests/test_language_catalogs.py, tests/test_mcp.py and tests/k8s/ pass, 323 tests.
  • Static: ruff check, ruff format and mypy pass on the changed files. The pre-commit hooks pass.
  • Render of this repository (collect_image_pins only, with no resolve and no Docker Hub read): 29 pins, no latest image, and the Image Updater repository ghcr.io/dan-petty/devops-cli/service apart. Before the change: 31 pins, including the test-pod images registry.suse.com/bci/bci-base:latest and docker.io/bats/bats:1.14.0.
  • kube-linter 0.8.3, custom check from latest-tag with the block list .*:(latest)$: it reports a raw Pod with example/app:latest, and it passes a copy of k8s/ in which k8s/llm/values-open-webui.yaml sets tag: "latest" (exit 0).
  • Not run: a live devops k8s image-pins resolve. The test(k8s): every image pin under k8s/ resolves in its registry before the merge #1994 measurements used up the home network's anonymous Docker Hub allowance. The CI job image-pins resolves on the runner.

@dan-petty
dan-petty marked this pull request as ready for review October 29, 2026 03:58
@dan-petty
dan-petty merged commit 548b3ba into main Oct 29, 2026
17 checks passed
@dan-petty
dan-petty deleted the ci/2093-latest-image-tag branch October 29, 2026 04:16
dan-petty pushed a commit that referenced this pull request Oct 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.15.0](v0.14.0...v0.15.0)
(2026-10-29)


### Features

* **k8s:** derived push entries, Secret types, one stack list
([#2618](#2618))
([3634c6f](3634c6f)),
closes [#2008](#2008)
* **k8s:** image-pins refuses an image on the latest tag
([#2617](#2617))
([548b3ba](548b3ba)),
closes [#2093](#2093)
* **monitoring:** alert when a noeviction Valkey nears its bound
([#2615](#2615))
([f452644](f452644)),
closes [#2094](#2094)
* **review:** golangci-lint runs offline in the review sandbox
([#2622](#2622))
([20915ce](20915ce)),
closes [#2129](#2129)
* **review:** the SARIF export writes how each tool run ended
([#2620](#2620))
([8f8ef44](8f8ef44)),
closes [#2100](#2100)


### Bug Fixes

* **release:** parse release pull request number safely in urgent merge
([#2621](#2621))
([262244d](262244d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(k8s): CI fails when a manifest names an image with the latest tag, and passes for an image that Argo CD Image Updater pins

1 participant