Skip to content

Commit 0bb15b9

Browse files
authored
chore(images): refresh stale utility image references (cozystack#2969)
## 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-proxy` `v0.11.0` → `v0.22.0` (etcd metrics scrape proxy, `monitoring-agents`) on the `quay.io/brancz` registry that `etcd-operator` already standardized on. Only the two core flags `--secure-listen-address` / `--upstream` are used; both are stable across the version range. - `matchbox` base image `v0.10.0` → `v0.11.0` (`core/talos` PXE image). v0.11.0 only bumps butane and adds darwin arm64 artifacts; the `COPY` asset paths are unchanged. - `alpine/k8s` tools image `1.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 digest `sha256:44ef4942…`. **Note on the issue text:** cozystack#2903 cites the seaweedfs `alpine/k8s` ref as `1.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-vendored `values.yaml` override, which was already at `1.33.4` and is bumped here to `1.36.2`. Verified: `helm template` renders the new tags (incl. the digest-pinned installer ref); `helm unittest` passes for seaweedfs (7) and cozystack-api (6); no fixture pins any of these tags. Closes cozystack#2903 ### Release note ```release-note chore(images): refresh kube-rbac-proxy (v0.22.0), matchbox (v0.11.0), and alpine/k8s (1.36.2) utility images ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated container images across system components, operational hooks, and monitoring utilities to newer stable versions. * **Security** * Hardened several lifecycle hook Jobs and related pod templates to run as non-root, use `seccompProfile: RuntimeDefault`, disallow privilege escalation, and drop all Linux capabilities. * **Tests** * Added Helm unit test coverage to verify hook Jobs’ non-root security settings and related Job fields. * **Documentation** * Added `helm unittest`-based `test` targets for relevant charts to support the new coverage. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents 82db4e9 + aed0162 commit 0bb15b9

16 files changed

Lines changed: 244 additions & 11 deletions

File tree

‎hack/e2e-cilium-leak-healer.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ spec:
8181
- name: healer
8282
# Reuse the in-tree, digest-pinned kubectl+jq image already shipped by
8383
# the installer (packages/core/installer/templates/cozy-system-labels.yaml).
84-
image: docker.io/alpine/k8s:1.33.4@sha256:b0523f0a244ddc4c8e055aa335c040d3d78b3ead5528f4544395f7f9f69c7b68
84+
image: docker.io/alpine/k8s:1.36.2@sha256:44ef4942e171939b9c665a4a84beb80e2dcdb9a24330d4651cfdfd2e9deecc47
8585
command: ["/bin/sh", "/opt/healer/heal.sh"]
8686
env:
8787
- name: CILIUM_NS

‎packages/apps/vm-disk/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
include ../../../hack/package.mk
22

3+
test:
4+
helm unittest .
5+
36
generate:
47
cozyvalues-gen -m 'vmdisk' -v values.yaml -s values.schema.json -r README.md -g ../../../api/apps/v1alpha1/vmdisk/types.go
58
../../../hack/update-crd.sh

‎packages/apps/vm-disk/templates/pvc-resize-hook.yaml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,26 @@ metadata:
2121
helm.sh/hook-weight: "0"
2222
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation
2323
spec:
24+
backoffLimit: 1
2425
template:
2526
metadata:
2627
labels:
2728
policy.cozystack.io/allow-to-apiserver: "true"
2829
spec:
2930
serviceAccountName: {{ .Release.Name }}-volume-resize-hook
3031
restartPolicy: Never
31-
backoffLimit: 1
32+
securityContext:
33+
runAsNonRoot: true
34+
runAsUser: 65534
35+
seccompProfile:
36+
type: RuntimeDefault
3237
containers:
3338
- name: resize
34-
image: docker.io/alpine/k8s:1.33.4
39+
image: docker.io/alpine/k8s:1.36.2
40+
securityContext:
41+
allowPrivilegeEscalation: false
42+
capabilities:
43+
drop: ["ALL"]
3544
command: ["sh", "-xec"]
3645
args:
3746
- |
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
suite: vm-disk pvc-resize hook runs non-root
2+
3+
# The resize hook only renders when an existing PVC is being grown
4+
# (lookup-gated on the PVC + a larger .Values.storage), so mock a smaller PVC
5+
# and request a larger size to drive the render, then pin the non-root
6+
# securityContext. Scope to the hook template so the chart's tenant-identifier
7+
# lookups elsewhere don't need a live cluster.
8+
release:
9+
name: test-vm-disk
10+
namespace: tenant-test
11+
templates:
12+
- templates/pvc-resize-hook.yaml
13+
set:
14+
storage: 2Gi
15+
kubernetesProvider:
16+
scheme:
17+
"v1/PersistentVolumeClaim":
18+
gvr:
19+
group: ""
20+
version: "v1"
21+
resource: "persistentvolumeclaims"
22+
namespaced: true
23+
objects:
24+
- kind: PersistentVolumeClaim
25+
apiVersion: v1
26+
metadata:
27+
name: test-vm-disk
28+
namespace: tenant-test
29+
spec:
30+
resources:
31+
requests:
32+
storage: 1Gi
33+
tests:
34+
- it: pvc-resize hook Job runs under a restrictive non-root securityContext
35+
documentSelector:
36+
path: kind
37+
value: Job
38+
asserts:
39+
- equal:
40+
path: spec.template.spec.securityContext.runAsNonRoot
41+
value: true
42+
- equal:
43+
path: spec.template.spec.securityContext.runAsUser
44+
value: 65534
45+
- equal:
46+
path: spec.template.spec.securityContext.seccompProfile.type
47+
value: RuntimeDefault
48+
- equal:
49+
path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation
50+
value: false
51+
- contains:
52+
path: spec.template.spec.containers[0].securityContext.capabilities.drop
53+
content: ALL
54+
55+
- it: backoffLimit is set at Job.spec, not silently dropped under the pod spec
56+
documentSelector:
57+
path: kind
58+
value: Job
59+
asserts:
60+
- equal:
61+
path: spec.backoffLimit
62+
value: 1
63+
- notExists:
64+
path: spec.template.spec.backoffLimit

‎packages/apps/vm-instance/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
include ../../../hack/package.mk
22

3+
test:
4+
helm unittest .
5+
36
generate:
47
cozyvalues-gen -m 'vminstance' -v values.yaml -s values.schema.json -r README.md -g ../../../api/apps/v1alpha1/vminstance/types.go
58
../../../hack/update-crd.sh

‎packages/apps/vm-instance/templates/vm-update-hook.yaml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,18 @@ spec:
5656
spec:
5757
serviceAccountName: {{ $.Release.Name }}-update-hook
5858
restartPolicy: Never
59+
securityContext:
60+
runAsNonRoot: true
61+
runAsUser: 65534
62+
seccompProfile:
63+
type: RuntimeDefault
5964
containers:
6065
- name: update-resources
61-
image: docker.io/alpine/k8s:1.33.4
66+
image: docker.io/alpine/k8s:1.36.2
67+
securityContext:
68+
allowPrivilegeEscalation: false
69+
capabilities:
70+
drop: ["ALL"]
6271
resources:
6372
requests:
6473
memory: "16Mi"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
suite: vm-instance update-hook runs non-root
2+
3+
# The update hook only renders when an existing VM/Service needs reconciling
4+
# (lookup-gated). Mock a Service whose type differs from the desired one
5+
# (existing LoadBalancer vs desired ClusterIP) to drive the render, then pin
6+
# the non-root securityContext. Scope to the hook template so the chart's
7+
# instanceType lookups elsewhere don't need a live cluster.
8+
release:
9+
name: test-vm
10+
namespace: tenant-test
11+
templates:
12+
- templates/vm-update-hook.yaml
13+
set:
14+
fullnameOverride: test-vm
15+
external: false
16+
kubernetesProvider:
17+
scheme:
18+
"v1/Service":
19+
gvr:
20+
group: ""
21+
version: "v1"
22+
resource: "services"
23+
namespaced: true
24+
objects:
25+
- kind: Service
26+
apiVersion: v1
27+
metadata:
28+
name: test-vm
29+
namespace: tenant-test
30+
spec:
31+
type: LoadBalancer
32+
tests:
33+
- it: update-hook Job runs under a restrictive non-root securityContext
34+
documentSelector:
35+
path: kind
36+
value: Job
37+
asserts:
38+
- equal:
39+
path: spec.template.spec.securityContext.runAsNonRoot
40+
value: true
41+
- equal:
42+
path: spec.template.spec.securityContext.runAsUser
43+
value: 65534
44+
- equal:
45+
path: spec.template.spec.securityContext.seccompProfile.type
46+
value: RuntimeDefault
47+
- equal:
48+
path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation
49+
value: false
50+
- contains:
51+
path: spec.template.spec.containers[0].securityContext.capabilities.drop
52+
content: ALL

‎packages/core/installer/templates/cozy-system-labels.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ spec:
111111
type: RuntimeDefault
112112
containers:
113113
- name: kubectl
114-
image: docker.io/alpine/k8s:1.33.4@sha256:b0523f0a244ddc4c8e055aa335c040d3d78b3ead5528f4544395f7f9f69c7b68
114+
image: docker.io/alpine/k8s:1.36.2@sha256:44ef4942e171939b9c665a4a84beb80e2dcdb9a24330d4651cfdfd2e9deecc47
115115
imagePullPolicy: IfNotPresent
116116
securityContext:
117117
allowPrivilegeEscalation: false

‎packages/core/talos/images/matchbox/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/poseidon/matchbox:v0.10.0
1+
FROM quay.io/poseidon/matchbox:v0.11.0
22

33
COPY _out/assets/initramfs-metal-amd64.xz /var/lib/matchbox/assets/initramfs.xz
44
COPY _out/assets/kernel-amd64 /var/lib/matchbox/assets/vmlinuz

‎packages/system/cozystack-api/templates/hook.yaml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@ spec:
1616
policy.cozystack.io/allow-to-apiserver: "true"
1717
spec:
1818
serviceAccountName: "cozystack-api-hook"
19+
securityContext:
20+
runAsNonRoot: true
21+
runAsUser: 65534
22+
seccompProfile:
23+
type: RuntimeDefault
1924
containers:
2025
- name: kubectl
21-
image: docker.io/alpine/k8s:1.33.4
26+
image: docker.io/alpine/k8s:1.36.2
27+
securityContext:
28+
allowPrivilegeEscalation: false
29+
capabilities:
30+
drop: ["ALL"]
2231
command:
2332
- sh
2433
args:

0 commit comments

Comments
 (0)