You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(chart, e2e): third-party images are pinned by digest from one inventory with a check; every udsecho object is labelled (#1400, #1401, #1402) - #1476
Written by an agent (Claude Code), finishing a work-in-progress branch another agent session left.
What changes
1. Every third-party image is pinned by the digest of its multi-arch index (#1400). charts/udsechoclient.image, charts/aetherproxy.authzSidecar.opa.image, the e2e harnesses and manifests, the soak manifests, the mesh conformance overlay and the etcd image of the testcontainers tests named an image by tag. Each reference is now <name>:<tag>@sha256:<index digest>: the digest is what is pulled, the tag stays for the reader. References that were already digest-only (charts/prober, test/e2e, e2e/soak/echo.yaml) are left as they are, so nothing rolls for them.
2. One inventory, a check, and a way to see which pins are behind (#1401).
There is no bot in this repository (Dependabot opens no pull requests because they cannot pass CI without the repository's secrets), and its other pins are held by hermetic pin tests plus a scripts/check-*.sh step in CI's shell job. This follows that pattern:
scripts/third-party-images.txt: one pin <name> <tag> <digest> line per image.
scripts/third-party-images.sh check (offline; a new step of the shell job): fails on an image named by tag only or with no tag, a digest the list does not have for that name, a tag that disagrees with the list, and a pin or exception nothing uses any more. It reads charts/, e2e/, test/ and registry/etcdtest/.
... outdated [--newer-tags] (online, anonymous, run by hand in the upgrade pass): per pin current, MOVED (tag re-pushed, new digest printed) or ERROR (never reported as current), and the registry's newer tags of the same shape.
... resolve <name>:<tag> prints the pin line and says when the index lacks linux/amd64 or linux/arm64; ... list prints where each pin is used.
//scripts:third_party_images_test: 60 hermetic cases (throwaway trees, a fake curl as the registries, and that no call ever carries a credential).
docs/runbook.md, "Refreshing third-party image pins": the procedure and what a moved pin obliges.
Nothing moves a pin by itself; this makes a stale pin visible and an unpinned image a CI failure.
3. Every udsecho object is labelled (#1402).
The chart's seven objects (three ServiceAccounts, three Deployments, the EndpointPolicy) carry helm.sh/chart and the app.kubernetes.io/* set on their own metadata, through the same three helpers as the other charts (selectorLabels / podLabels / labels). Selectors and pod templates render byte for byte as before.
Tag → digest
Each digest was read from its registry twice on the day of this change: with scripts/third-party-images.sh resolve / outdated (hashes the manifest body and compares the registry's Docker-Content-Digest), and with a separate throwaway curl loop reading the header. Both agree for every row, and every index lists linux/amd64 and linux/arm64.
One exception, with its reason in the inventory: skip e2e/soak/testdata/ (canned kubectl -o json fixtures whose image is x). grafana/k6:latest in the retired k6 runner is pinned by digest like the rest (outdated reports it moved at every k6 release; bpalermo/aether-soak#6).
Rendered before and after
helm template of main and of this branch, same values, the {GIT_COMMIT} stamp replaced by a fixed string on both sides. Lines that differ, other than helm.sh/chart: <chart>-<version>:
Chart, values
Difference
udsecho, defaults
7 objects gain a labels: block (8 lines each); uds-client's image: curlimages/curl:8.22.0 becomes curlimages/curl:8.22.0@sha256:58adaa4e…6777. No selector line and no pod-template label line differs
udsecho, client.enabled=false
5 objects gain the labels: block; nothing else
aether, defaults
none
aether, OPA preset on
the authz sidecar's image: "openpolicyagent/opa:1.21.1-envoy-static" becomes "…-envoy-static@sha256:b4a8bbe8…344b"; nothing else
prober, defaults and authzCanary.enabled=true
none (a values comment changed)
What an operator sees on upgrade
aether 2.4.22: with proxy.authzSidecar.opa.enabled=true and the default opa.image, the proxy DaemonSet rolls once (the sidecar is a container of the proxy pod; the OPA version is the same). With the preset off (the default) or opa.image set to your own reference, nothing renders differently. This is the one decision here with a cost: the alternative was an exception in the new check for the only third-party image the chart runs next to the proxy on every node, which is the image a re-pushed tag would hurt most.
udsecho 2.0.3: the one-replica uds-client Deployment rolls once (unless client.image is set). The echo Deployments are not rolled by the chart. All seven objects gain labels; pods are still selected with -l app=<name>.
prober 1.0.7: nothing rolls. The bump is for a values comment that said nothing refreshes the pin.
docs/runbook.md has the kubectl queries to run before and after for each ("Chart 2.4.22", "The udsecho chart").
Versions: main is at aether 2.4.21, prober 1.0.6, udsecho 2.0.2, and no other pull request is open, so these are the next free numbers.
Tests, red first
New template tests, run against main's templates and values (red), then against this branch (green):
udsecho_documents_test's three ServiceAccount patterns ended in $ (the object ended at namespace:); they now end in \n, because labels follow. The exact shape of each ServiceAccount is held by udsecho_object_labels_test instead.
The check itself: the branch's script and inventory over main's tree exits 1 with 36 "pinned by tag only" findings; over this branch it prints OK: 47 image reference(s) in 243 file(s): 16 pinned image(s), 0 allowed exception(s), 1 skipped path(s). It also caught, during the rebase, a tag-only registry.k8s.io/pause:3.10 that a harness merged the same day had added (e2e/first-install.sh; pinned here).
Also run: bazel test //charts/... //e2e:all //e2e/soak:all //scripts:all (259 pass), the lint build over //scripts:all //e2e/... //charts/... //registry/etcdtest/..., make format-check, make actionlint, scripts/check-shell-lint.sh, scripts/check-registry-config.sh, scripts/check-chart-version-bump.sh.
Measured, inferred, not verified
Measured: every digest (above). The renders. docker run accepts quay.io/coreos/etcd:v3.7.2@sha256:…. //registry/internal/etcd:etcd_test (testcontainers) started gcr.io/etcd-development/etcd:v3.7.2@sha256:… and passed.
Inferred: that the kubelet / containerd accept <name>:<tag>@<digest> for every manifest changed here (it is a standard reference form; the tag is ignored once a digest is present). No harness side-loads a third-party image with kind load, so none depends on the local image name.
Not verified: nothing here ran on a cluster. A kind run of the changed harnesses (e2e/uds.sh, uds-csi.sh, authz.sh, l4routes.sh, multiprotocol.sh, eastwest-quic*.sh, the multicluster_* scripts, first-install.sh) and of the mesh conformance suite would show each pinned image is pulled and starts on the pinned node image; the nightly e2e workflow does that after merge. The soak manifests were not applied anywhere. The proxy roll for an OPA-preset install was not exercised.
outdated reads public registries anonymously; Docker Hub rate limits apply to it like to any anonymous pull, and it reports ERROR (exit 2), not current, when a registry does not answer.
…nd in a block scalar
An unquoted `image:` inside `[{name: p, image: x}]` was skipped as prose, and
the value of `image: >-` / `image: |` on the next line was never read, so a
tag-only image in either spelling passed the check. Fixtures for both, and for
the spellings that were already read (quoted flow mapping, trailing comment,
JSON, --overrides, quoted --image=); the header says what a line scan still
cannot see.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…gest with a suffix, and a skip over files it never reads
- the inventory accepted a second line for an existing name:tag with another
digest, so a half-done refresh passed with both digests in use
- the known-name net cut a digest at its last hex digit, and the key net
dropped a reference whose digest held a character outside [A-Za-z0-9:]:
`a/b:1@sha256:<64 hex>-x` passed as its valid prefix or was not read at all
- a skip prefix holding only files the scan never reads (README.md,
BUILD.bazel, *_test.sh) counted as used
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
The “same shape” expression varies only decimal runs, so it cannot discover newer versions of the two inventory tags that contain generated Git hashes (for example, ...-g40c666fd): a newer hash normally changes alphabetic hex characters too and is filtered out. Consequently outdated --newer-tags can keep reporting no newer Gateway API echo tag even when one exists. Treat the g<hex> suffix as a variable token while preserving fixed tag text, and add a different-hash fixture.
Ignore Go block comments when extracting image references
scripts/third-party-images.sh:296
The comment filter only removes # and //, so Go block comments are still treated as live references. A scanned .go file containing only /* var c = Container{Image: "a/b:1@<listed digest>"} */ makes check exit 0 and records the pin as used, instead of reporting the stale inventory entry as promised. Strip /* ... */ spans (while respecting quoted strings) before both extraction passes, and add a regression where a pin exists only in a multiline block comment.
Validate registry responses against supported manifest schemas
scripts/third-party-images.sh:609
This check accepts any JSON object as a manifest. For example, a registry returning HTTP 200 with {} (or a JSON error envelope) is hashed and resolve prints a usable-looking pin line, while outdated reports MOVED/NOT-MULTI-ARCH instead of ERROR. Validate a schema-2 image index (manifests array) or image manifest (config object and layers array), and add a fake-registry case for an unrelated JSON object.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The scanner misclassifies valid no-space Go and JavaScript comments, allowing stale pins to pass, and the PR description no longer matches the inventory.
Quote this dynamic label value. Valid Helm release names can be numeric or YAML booleans (for example 123 or true); emitted unquoted, those become non-string label values and Kubernetes rejects all seven newly labelled objects during install.
Inventory digest-only image references under non-image keys
scripts/third-party-images.sh:372
The known-name pass only searches for name:, so digest-only references under non-image keys are invisible. This already omits e2e/soak/sortie-values.yaml:45,53 (quay.io/sortie/{sortie,engine}@sha256:...) from the advertised single inventory even though they are runtime images under a scanned path. Teach the extractor to follow image.ref/name@digest references and inventory them (or record an explicit exception for their dedicated provenance mechanism).
…a known name by digest alone (#1400)
- A repository written out under a computed digest (`x/y:2@${D}`, `x/y@$D`,
`x/y:2@{{ .Values.d }}`) was dropped as "not a literal"; it is now emitted
and refused, as a computed tag already was.
- The known-name pass looked for `name:` only, so `docker run a/b@sha256:<an
unlisted digest>` behind no image key was not seen. It reads `name@` too,
under the same longer-name and comment rules, and a listed digest written
that way counts as a use of its pin.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…in inventory (#1400)
e2e/soak/sortie-values.yaml names quay.io/sortie/sortie and
quay.io/sortie/engine by digest under `image.ref`, a key the scan does not
read, and no pin named them, so `list` and `outdated` did not cover them.
Both are now pinned in the inventory (tag: the sortie commit the soak is on),
which makes the known-name pass hold the values file to it. The reader is not
extended: a whole reference under a child key of `image:` for an image no pin
names yet is listed in the header as not read.
The real tree now reads 59 references (57 + these two): 18 pins.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Recognize shell comments beginning at command boundaries
scripts/third-party-images.sh:272
Shell comments can begin at a command boundary without whitespace (for example, true;# retired image ...), but this condition recognizes # only after a space or tab. In a representative fixture where a pin's only occurrence followed ;#, check returned OK and counted the comment as a live use, so stale inventory entries can still bypass the advertised unused-pin gate. Recognize shell comment boundaries here and add a regression case.
Reject JSON objects that are not valid registry manifests
scripts/third-party-images.sh:629
This accepts every JSON object as a registry manifest. A 200 response such as {} or {"errors":[]} is therefore hashed, and resolve can print that hash as a pin (only warning that it is single-platform) instead of returning ERROR. Validate schemaVersion and a recognized index/manifest structure and media type before computing the digest, and cover an object-shaped non-manifest response in the fake-registry tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1400
Closes #1401
Closes #1402
Written by an agent (Claude Code), finishing a work-in-progress branch another agent session left.
What changes
1. Every third-party image is pinned by the digest of its multi-arch index (#1400).
charts/udsechoclient.image,charts/aetherproxy.authzSidecar.opa.image, the e2e harnesses and manifests, the soak manifests, the mesh conformance overlay and the etcd image of the testcontainers tests named an image by tag. Each reference is now<name>:<tag>@sha256:<index digest>: the digest is what is pulled, the tag stays for the reader. References that were already digest-only (charts/prober,test/e2e,e2e/soak/echo.yaml) are left as they are, so nothing rolls for them.2. One inventory, a check, and a way to see which pins are behind (#1401).
There is no bot in this repository (Dependabot opens no pull requests because they cannot pass CI without the repository's secrets), and its other pins are held by hermetic pin tests plus a
scripts/check-*.shstep in CI'sshelljob. This follows that pattern:scripts/third-party-images.txt: onepin <name> <tag> <digest>line per image.scripts/third-party-images.sh check(offline; a new step of theshelljob): fails on an image named by tag only or with no tag, a digest the list does not have for that name, a tag that disagrees with the list, and a pin or exception nothing uses any more. It readscharts/,e2e/,test/andregistry/etcdtest/.... outdated [--newer-tags](online, anonymous, run by hand in the upgrade pass): per pincurrent,MOVED(tag re-pushed, new digest printed) orERROR(never reported as current), and the registry's newer tags of the same shape.... resolve <name>:<tag>prints thepinline and says when the index lackslinux/amd64orlinux/arm64;... listprints where each pin is used.//scripts:third_party_images_test: 60 hermetic cases (throwaway trees, a fakecurlas the registries, and that no call ever carries a credential).docs/runbook.md, "Refreshing third-party image pins": the procedure and what a moved pin obliges.Nothing moves a pin by itself; this makes a stale pin visible and an unpinned image a CI failure.
3. Every
udsechoobject is labelled (#1402).The chart's seven objects (three ServiceAccounts, three Deployments, the
EndpointPolicy) carryhelm.sh/chartand theapp.kubernetes.io/*set on their own metadata, through the same three helpers as the other charts (selectorLabels/podLabels/labels). Selectors and pod templates render byte for byte as before.Tag → digest
Each digest was read from its registry twice on the day of this change: with
scripts/third-party-images.sh resolve/outdated(hashes the manifest body and compares the registry'sDocker-Content-Digest), and with a separate throwawaycurlloop reading the header. Both agree for every row, and every index listslinux/amd64andlinux/arm64.curlimages/curl8.22.0sha256:58adaa4e8dca9c988bae2aba4ab3434a0bb2da16bbe3f92dec39ec7785166777openpolicyagent/opa1.21.1-envoy-staticsha256:b4a8bbe87c9405419d03d1a8b6b9f4b540e7ea8ff8832248d6339b30594b344bhashicorp/http-echo1.0sha256:fcb75f691c8b0414d670ae570240cbf95502cc18a9ba57e982ecac589760a186istio/tcp-echo-server1.3sha256:782259608d5ce934e1a07ce4a3f2664934b6806d50430fd20b7bf429ea500272alpine/socat1.8.0.3sha256:beb4a68d9e4fe6b0f21ea774a0fde6c31f580dde6368939ed70100c5385b015eregistry.k8s.io/e2e-test-images/agnhost2.53sha256:99c6b4bb4a1e1df3f0b3752168c89358794d02258ebebc26bf21c29399011a85registry.k8s.io/pause3.10sha256:ee6521f290b2168b6e0935a181d4cff9be1ac3f505666ef0e3c98fae8199917agcr.io/k8s-staging-gateway-api/echo-advancedv20240412-v1.0.0-394-g40c666fdsha256:5efb54877c2280c51b971857ea9a6256b355822ab84a4edbef9ec1c876587068ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector0.159.0sha256:7725a7a10c87d8853208bdd4bb3439ad3c0d7b32b4292b9300ac07c8daba14a2ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygenv0.159.0sha256:bad7fde3119476a9177cc4b9f04307c9876fca5b5584e009aebd7123d7557658quay.io/coreos/etcdv3.7.2sha256:e9afa62b1e914f02db62e5c46a7a140d8cdf026f2ed888cab4e5a142ec4d06fdgcr.io/etcd-development/etcdv3.7.2sha256:7c6c239825d00e3f6328a69caafd54be92063acf0c2ce78b8394699f52b75dc3gcr.io/k8s-staging-gateway-api/echo-basicv20260102-monthly-2025.12-44-g8174882asha256:eb7396722956640221e856b8e8cf44179da131d5bd6fc27a4f0cb91f60c237c3busybox1.37.0-muslsha256:5cec3fc171c87218698e85a52af7087de727372aae264a787b8112901a5b0092kindest/nodev1.35.8sha256:07b2536e30b803ed61d1677a79df6115f798ce64c80f9e22f6ed45afd09323c0e2e/kind-version.showns it)One exception, with its reason in the inventory:
skip e2e/soak/testdata/(cannedkubectl -o jsonfixtures whose image isx).grafana/k6:latestin the retired k6 runner is pinned by digest like the rest (outdatedreports it moved at every k6 release; bpalermo/aether-soak#6).Rendered before and after
helm templateofmainand of this branch, same values, the{GIT_COMMIT}stamp replaced by a fixed string on both sides. Lines that differ, other thanhelm.sh/chart: <chart>-<version>:udsecho, defaultslabels:block (8 lines each);uds-client'simage: curlimages/curl:8.22.0becomescurlimages/curl:8.22.0@sha256:58adaa4e…6777. No selector line and no pod-template label line differsudsecho,client.enabled=falselabels:block; nothing elseaether, defaultsaether, OPA preset onauthzsidecar'simage: "openpolicyagent/opa:1.21.1-envoy-static"becomes"…-envoy-static@sha256:b4a8bbe8…344b"; nothing elseprober, defaults andauthzCanary.enabled=trueWhat an operator sees on upgrade
aether2.4.22: withproxy.authzSidecar.opa.enabled=trueand the defaultopa.image, the proxy DaemonSet rolls once (the sidecar is a container of the proxy pod; the OPA version is the same). With the preset off (the default) oropa.imageset to your own reference, nothing renders differently. This is the one decision here with a cost: the alternative was an exception in the new check for the only third-party image the chart runs next to the proxy on every node, which is the image a re-pushed tag would hurt most.udsecho2.0.3: the one-replicauds-clientDeployment rolls once (unlessclient.imageis set). The echo Deployments are not rolled by the chart. All seven objects gain labels; pods are still selected with-l app=<name>.prober1.0.7: nothing rolls. The bump is for a values comment that said nothing refreshes the pin.docs/runbook.mdhas thekubectlqueries to run before and after for each ("Chart 2.4.22", "The udsecho chart").Versions:
mainis ataether2.4.21,prober1.0.6,udsecho2.0.2, and no other pull request is open, so these are the next free numbers.Tests, red first
New template tests, run against
main's templates and values (red), then against this branch (green):main's chart//charts/udsecho:udsecho_object_labels_testlabels:on any object)//charts/udsecho:udsecho_pod_template_version_test,…_policy_path_off_test//charts/udsecho:udsecho_client_image_pinned_testimage: curlimages/curl:8.22.0)//charts/aether:aether_opa_image_pinned_testimage: "openpolicyagent/opa:1.21.1-envoy-static")udsecho_selectors_unchanged_test,udsecho_client_image_override_test,udsecho_client_off_test,aether_opa_image_override_test,aether_default_render_no_third_party_image_testudsecho_documents_test's three ServiceAccount patterns ended in$(the object ended atnamespace:); they now end in\n, because labels follow. The exact shape of each ServiceAccount is held byudsecho_object_labels_testinstead.The check itself: the branch's script and inventory over
main's tree exits 1 with 36 "pinned by tag only" findings; over this branch it printsOK: 47 image reference(s) in 243 file(s): 16 pinned image(s), 0 allowed exception(s), 1 skipped path(s). It also caught, during the rebase, a tag-onlyregistry.k8s.io/pause:3.10that a harness merged the same day had added (e2e/first-install.sh; pinned here).Also run:
bazel test //charts/... //e2e:all //e2e/soak:all //scripts:all(259 pass), the lint build over//scripts:all //e2e/... //charts/... //registry/etcdtest/...,make format-check,make actionlint,scripts/check-shell-lint.sh,scripts/check-registry-config.sh,scripts/check-chart-version-bump.sh.Measured, inferred, not verified
docker runacceptsquay.io/coreos/etcd:v3.7.2@sha256:….//registry/internal/etcd:etcd_test(testcontainers) startedgcr.io/etcd-development/etcd:v3.7.2@sha256:…and passed.<name>:<tag>@<digest>for every manifest changed here (it is a standard reference form; the tag is ignored once a digest is present). No harness side-loads a third-party image withkind load, so none depends on the local image name.e2e/uds.sh,uds-csi.sh,authz.sh,l4routes.sh,multiprotocol.sh,eastwest-quic*.sh, themulticluster_*scripts,first-install.sh) and of the mesh conformance suite would show each pinned image is pulled and starts on the pinned node image; the nightly e2e workflow does that after merge. The soak manifests were not applied anywhere. The proxy roll for an OPA-preset install was not exercised.outdatedreads public registries anonymously; Docker Hub rate limits apply to it like to any anonymous pull, and it reportsERROR(exit 2), notcurrent, when a registry does not answer.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr