chore(images): refresh stale utility image references - #2969
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughContainer image versions are bumped across ten files: ChangesContainer Image Bumps and Hook Security Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refreshes several stale utility image references that were previously using outdated versions. By standardizing these images, the repository improves security and ensures consistent tooling across various system components and hooks. The changes have been validated through helm testing to confirm that all deployments and hooks remain functional with the updated versions. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates several container images across multiple packages, notably upgrading alpine/k8s from 1.33.4 to 1.36.2, matchbox to v0.11.0, and kube-rbac-proxy to v0.22.0. The review feedback highlights several containers that lack resource requests/limits and proper securityContext configurations, which are required by the repository's security and workload guidelines.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| containers: | ||
| - name: resize | ||
| image: docker.io/alpine/k8s:1.33.4 | ||
| image: docker.io/alpine/k8s:1.36.2 |
There was a problem hiding this comment.
To align with the repository guidelines and security best practices, please add resource requests/limits and a securityContext to the resize container. This ensures predictable resource allocation and adheres to the principle of least privilege.
image: docker.io/alpine/k8s:1.36.2
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]There was a problem hiding this comment.
Added the securityContext in aed0162 — the resize hook now runs non-root (pod runAsNonRoot + runAsUser 65534 + seccompProfile RuntimeDefault; container allowPrivilegeEscalation: false + drop ["ALL"]), mirroring the dashboard adopt hook, and pinned in a new helm-unittest. I left resource requests/limits out: the cited dashboard precedent doesn't set them either, and a consistent resources pass across these short-lived hooks fits better as its own change.
| containers: | ||
| - name: kubectl | ||
| image: docker.io/alpine/k8s:1.33.4 | ||
| image: docker.io/alpine/k8s:1.36.2 |
There was a problem hiding this comment.
To align with the repository guidelines and security best practices, please add resource requests/limits and a securityContext to the kubectl container. This ensures predictable resource allocation and adheres to the principle of least privilege.
image: docker.io/alpine/k8s:1.36.2
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]There was a problem hiding this comment.
Added the securityContext in aed0162 — the hook now runs non-root (runAsUser 65534, runAsNonRoot, seccompProfile RuntimeDefault, drop ["ALL"]), mirroring the dashboard adopt hook, pinned in a helm-unittest that mocks the gating DaemonSet. Resource requests/limits left out for the same reason as the other hooks (not in the precedent; separate pass).
| containers: | ||
| - name: kubectl | ||
| image: docker.io/alpine/k8s:1.33.4 | ||
| image: docker.io/alpine/k8s:1.36.2 |
There was a problem hiding this comment.
To align with the repository guidelines and security best practices, please add resource requests/limits and a securityContext to the kubectl container. This ensures predictable resource allocation and adheres to the principle of least privilege.
image: docker.io/alpine/k8s:1.36.2
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]There was a problem hiding this comment.
Added the securityContext in aed0162 — the update hook now runs non-root (runAsUser 65534, runAsNonRoot, seccompProfile RuntimeDefault, drop ["ALL"]), pinned in a helm-unittest. Resource requests/limits left out (not in the dashboard precedent; separate pass).
| containers: | ||
| - name: update-resources | ||
| image: docker.io/alpine/k8s:1.33.4 | ||
| image: docker.io/alpine/k8s:1.36.2 |
There was a problem hiding this comment.
To align with the repository guidelines and security best practices, please add a securityContext to the update-resources container. This adheres to the principle of least privilege.
image: docker.io/alpine/k8s:1.36.2
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]References
- RBAC, ServiceAccounts, and SecurityContext: flag missing securityContext. (link)
There was a problem hiding this comment.
Added the securityContext in aed0162 — the update-resources hook now runs non-root (runAsUser 65534, runAsNonRoot, seccompProfile RuntimeDefault, drop ["ALL"]), mirroring the dashboard adopt hook, pinned in a helm-unittest that mocks the gating Service.
| # Reuse the in-tree, digest-pinned kubectl+jq image already shipped by | ||
| # the installer (packages/core/installer/templates/cozy-system-labels.yaml). | ||
| image: docker.io/alpine/k8s:1.33.4@sha256:b0523f0a244ddc4c8e055aa335c040d3d78b3ead5528f4544395f7f9f69c7b68 | ||
| image: docker.io/alpine/k8s:1.36.2@sha256:44ef4942e171939b9c665a4a84beb80e2dcdb9a24330d4651cfdfd2e9deecc47 |
There was a problem hiding this comment.
To align with the repository guidelines and security best practices, please add a securityContext to the healer container. This adheres to the principle of least privilege.
image: docker.io/alpine/k8s:1.36.2@sha256:44ef4942e171939b9c665a4a84beb80e2dcdb9a24330d4651cfdfd2e9deecc47
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]References
- RBAC, ServiceAccounts, and SecurityContext: flag missing securityContext. (link)
There was a problem hiding this comment.
Deferring this one. hack/e2e-cilium-leak-healer.yaml is an e2e test fixture (it runs with hostNetwork: true and execs /opt/healer/heal.sh), not a shipped chart, so its security posture is low-stakes here. A leak healer on the host network plausibly needs elevation, and whether it still works non-root can't be confirmed without running the e2e suite — so it's out of scope for this image-ref refresh.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/talos/images/matchbox/Dockerfile`:
- Line 1: The Dockerfile uses the base image quay.io/poseidon/matchbox:v0.11.0
which does not specify a non-root user, causing the container to run as root by
default. After the FROM instruction, add commands to create a non-root user
group and user (e.g., matchbox) using addgroup and adduser commands, then add a
USER instruction to switch to that non-root user before any subsequent commands
or at the end of the Dockerfile. This ensures the container runs with reduced
privileges adhering to security best practices.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b819b68e-a030-47e6-8b4a-d79c18b8ec6c
📒 Files selected for processing (10)
hack/e2e-cilium-leak-healer.yamlpackages/apps/vm-disk/templates/pvc-resize-hook.yamlpackages/apps/vm-instance/templates/vm-update-hook.yamlpackages/core/installer/templates/cozy-system-labels.yamlpackages/core/talos/images/matchbox/Dockerfilepackages/system/cozystack-api/templates/hook.yamlpackages/system/monitoring-agents/templates/etcd-proxy-scrape.yamlpackages/system/seaweedfs/templates/hook.yamlpackages/system/seaweedfs/values.yamlpackages/system/vertical-pod-autoscaler/values.yaml
Refreshes the matchbox PXE image base from the 2021-era v0.10.0 to v0.11.0, clearing the long-fixed golang.org/x/crypto and x/net versions baked into the old build. v0.11.0 only bumps butane (v0.17->v0.18) and adds darwin arm64 artifacts; no behavior change for Talos PXE boot. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
…roxy to v0.22.0 Bumps the etcd metrics scrape proxy from the 2021-era v0.11.0 to v0.22.0 on the same quay.io/brancz registry that etcd-operator already standardized on. The two flags used here (--secure-listen-address, --upstream) are core and stable across the version range. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
Bumps the alpine/k8s tools image used by the seaweedfs resize hook and the kubectl hook job from 1.33.4 to 1.36.2 (current). This non-vendored override is the effective runtime value; the vendored chart's stale 1.28.4 default is unused and left untouched per the vendoring rules. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
…36.2 Six further references to the alpine/k8s tools image were still pinned at 1.33.4 across the installer, the cozystack-api post-upgrade hook, the vm-disk and vm-instance resize hooks, the vertical-pod-autoscaler CRD-install override, and the e2e cilium leak healer. Move them all to 1.36.2 so the whole repo runs a single current tools-image version (the two digest-pinned refs get the matching multi-arch digest sha256:44ef4942...). Same stale-stdlib remediation as the seaweedfs bump in this PR. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
The vm-disk pvc-resize, cozystack-api, seaweedfs and vm-instance update hooks (whose alpine/k8s image this PR refreshes) ran as root with no securityContext. Add a pod-level runAsNonRoot + runAsUser 65534 + seccompProfile RuntimeDefault and a container-level allowPrivilegeEscalation: false + capabilities drop ALL, mirroring the dashboard adopt hook. kubectl needs no root, so this is behavior-neutral. Each hook is lookup-gated; pin the securityContext in a per-chart helm-unittest that mocks the gating object (DaemonSet / PVC / Service) via kubernetesProvider so the guard renders without a cluster. vm-disk and vm-instance had no Makefile test target, so add 'test: helm unittest .' to both so CI runs the new suites. Scope note: other kubectl hooks on clastix/kubectl (mariadb, keycloak, kubernetes, tenant) are untouched here — they are not part of this alpine/k8s refresh and belong to a separate hardening pass. Also fix the vm-disk resize hook's backoffLimit: it was nested under the pod spec (silently ignored, leaving the Job at the default 6 retries) instead of Job.spec. Move it to Job.spec and pin it in the test. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
303ca96 to
aed0162
Compare
myasnikovdaniil
left a comment
There was a problem hiding this comment.
LGTM. Verified every refreshed reference against the registries:
alpine/k8s:1.36.2resolves tosha256:44ef4942e171939b9c665a4a84beb80e2dcdb9a24330d4651cfdfd2e9deecc47, which exactly matches both digest-pinned refs (installer + e2e healer), and keeps the samelinux/amd64+linux/arm64coverage as the oldb0523f0a…pin.quay.io/brancz/kube-rbac-proxy:v0.22.0exists; only--secure-listen-address/--upstreamare used and both are stable across v0.11→v0.22 — no deprecated flags involved. Registry choice is consistent with etcd-operator and opensearch-operator.quay.io/poseidon/matchbox:v0.11.0exists with an identical entrypoint (/matchbox) and exposed port (8080/tcp) vs v0.10.0; theCOPYasset paths are unchanged — drop-in.
Consistency: grep finds no stragglers on the old tags anywhere non-vendored. The remaining alpine/k8s:1.28.4 is the vendored seaweedfs subchart default, correctly overridden by the non-vendored resizeHook.image — the PR body's note on #2903 is accurate.
The bundled non-root hardening on the kubectl hooks is safe: smoke-tested alpine/k8s:1.36.2 under --user 65534 --read-only, and every hook body is pure kubectl patch/delete with no filesystem writes. Nice catch relocating vm-disk's backoffLimit from the (ignored) pod spec to the Job spec, with a test that guards the regression. make test passes for all four affected charts; git status is clean.
Optional nit: the release-note only mentions the image refresh — consider noting the hooks now run non-root, since that's a user-visible posture change.
What this PR does
Refreshes the stale utility image references the issue flags (2021-era builds carrying long-fixed
golang.org/x/crypto/golang.org/x/net):kube-rbac-proxyv0.11.0→v0.22.0(etcd metrics scrape proxy,monitoring-agents) on thequay.io/branczregistry thatetcd-operatoralready standardized on. Only the two core flags--secure-listen-address/--upstreamare used; both are stable across the version range.matchboxbase imagev0.10.0→v0.11.0(core/talosPXE image). v0.11.0 only bumps butane and adds darwin arm64 artifacts; theCOPYasset paths are unchanged.alpine/k8stools image1.33.4→1.36.2, applied to every non-vendored reference so the repo runs a single current tools-image version: seaweedfs resize/kubectl hooks, the cozystack-api post-upgrade hook, the installer, the vm-disk and vm-instance resize hooks, the vertical-pod-autoscaler CRD-install override, and the e2e cilium leak healer. The two digest-pinned refs (installer, e2e healer) get the matching multi-arch digestsha256:44ef4942….Note on the issue text: #2903 cites the seaweedfs
alpine/k8sref as1.28.4, but that value only exists as the vendored subchart default (charts/seaweedfs/values.yaml), which is left untouched per the vendoring rules. The effective runtime value comes from the non-vendoredvalues.yamloverride, which was already at1.33.4and is bumped here to1.36.2.Verified:
helm templaterenders the new tags (incl. the digest-pinned installer ref);helm unittestpasses for seaweedfs (7) and cozystack-api (6); no fixture pins any of these tags.Closes #2903
Release note
Summary by CodeRabbit
Chores
Security
seccompProfile: RuntimeDefault, disallow privilege escalation, and drop all Linux capabilities.Tests
Documentation
helm unittest-basedtesttargets for relevant charts to support the new coverage.