Skip to content

test(k8s): each image pin under k8s/ resolves before the merge - #2614

Merged
dan-petty merged 4 commits into
mainfrom
test/1994-image-pins-resolve
Oct 29, 2026
Merged

dan-petty merged 4 commits into
mainfrom
test/1994-image-pins-resolve

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops k8s image-pins renders each Argo CD Application as Argo CD does and resolves each image it pins, so a wrong tag fails the pull request and not the sync.

  • A path source renders with kubectl kustomize, and a chart source with helm template and the repository's value files, read through kubectl kustomize, so a tag that a value file sets is checked too.
  • Each pin resolves once with docker buildx imagetools inspect, as an anonymous client. Images that an ImageUpdater names, and images of a cluster-only registry, are listed and not resolved.
  • The image-pins job of ci.yml runs the command when a pull request changes k8s/, the command or ci.yml.
  • ImagetoolsFake replays the tool's recorded runs, with its contract suite.

Docker Hub counts each read as an anonymous pull; #2610 moves the resolver to a HEAD request.

Closes #1994

Change: openspec/changes/archive/2026-10-29-1994-image-pins-resolve/

`devops k8s image-pins` renders each Argo CD Application as Argo CD
does (kustomize for a path source, helm template with the repository's
value files for a chart, its output read through kustomize), takes the
`image` values of the rendered objects, and resolves each pin once with
`docker buildx imagetools inspect` as an anonymous client. It does not
resolve the images that an ImageUpdater names or the images of a
cluster-only registry, and it exits 1 on an image that its registry does
not hold or refuses. The `image-pins` job of ci.yml runs it on a pull
request that changes k8s/. A shared fake replays the tool's recorded
runs, with its contract suite.
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence (2026-10-29, Docker Engine 29.9.2, buildx v0.38.1, helm v4.3.0):

  • Live run on this repository: 29 Applications (16 chart sources) name 32 distinct images; one is the repository that ImageUpdater devops names, so 31 are pins, 13 on Docker Hub. All 31 resolved as an anonymous client. Render 18.7 s (eight Applications at a time, libyaml), resolve 9.6 s, whole command 33 s. Sequential renders with the pure-Python loader took 175 s.
  • YAML: PyYAML and ruamel.yaml both refuse the prometheus chart's Alertmanager StatefulSet (a tab after a value); kubectl kustomize reads it, and the pin quay.io/prometheus/alertmanager:v0.34.1 is checked.
  • Anonymous: with a stored Docker credential, GHCR refused 5 public images with 403; with an empty DOCKER_CONFIG all resolved.
  • Docker Hub: three inspects took ratelimit-remaining from 100 to 97. The measurements spent the home address's hourly allowance, and a later run failed closed with toomanyrequests. perf(k8s): use tag_digest HEAD for image pins #2610 moves the resolver to a HEAD request; fix(security): output masking reads the prose 'token: <word>' as a secret and rewrites error text #2613 is the output masking that rewrote a buildx error.
  • fail-to-pass: uv run devops ci fail-to-pass --base origin/main: 2 changed tests fail on base and the 2 new modules error there (the module does not exist on base).
  • Local tests: 537 passed in tests/k8s, test_mcp.py, test_workflow_contracts.py, test_ci.py and test_architectural_invariants.py; devops docs check passes.

Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty marked this pull request as ready for review October 29, 2026 03:22
@dan-petty
dan-petty merged commit 29f5a74 into main Oct 29, 2026
17 checks passed
@dan-petty
dan-petty deleted the test/1994-image-pins-resolve branch October 29, 2026 03:22
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.

test(k8s): every image pin under k8s/ resolves in its registry before the merge

1 participant