Skip to content

Commit f79003c

Browse files
carlydfclaude
andauthored
Add CI check to verify Helm chart image references are pullable (#222)
<!--- Note to EXTERNAL Contributors --> <!-- Thanks for opening a PR! If it is a significant code change, please **make sure there is an open issue** for this. We work best with you when we have accepted the idea first before you code. --> <!--- For ALL Contributors 👇 --> ## What was changed Uses crane to verify all container image references rendered by the Helm chart exist in their registries, catching broken or deprecated registry paths (e.g. gcr.io deprecation) on every PR and weekly. ## Why? We missed an un-pullable image (maintainer changed the image registry) which needed to be fixed by #219 . Don't want that to happen again ## Checklist <!--- add/delete as needed ---> 1. Closes <!-- add issue number here --> 2. How was this tested: <!--- Please describe how you tested your changes/how we can test them --> 3. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 66153f1 commit f79003c

2 files changed

Lines changed: 76 additions & 1 deletion

File tree

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Helm Image Check
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ["helm/**"]
7+
pull_request:
8+
paths: ["helm/**"]
9+
schedule:
10+
- cron: "0 9 * * 1" # Weekly Monday 9am UTC — catches registry deprecations
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
check-images:
18+
name: Verify Helm Chart Images Exist
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install Helm
24+
uses: azure/setup-helm@v4
25+
with:
26+
version: v3.14.3
27+
28+
- name: Install crane
29+
uses: imjasonh/setup-crane@v0.4
30+
31+
- name: Render chart and verify images
32+
run: |
33+
set -euo pipefail
34+
35+
# Render all config variants (mirrors helm-validate.yml) so images behind
36+
# non-default flags are also checked
37+
helm template test-release helm/temporal-worker-controller \
38+
> /tmp/rendered-default.yaml
39+
helm template test-release helm/temporal-worker-controller \
40+
--set namespace.create=true \
41+
> /tmp/rendered-namespace.yaml
42+
helm template test-release helm/temporal-worker-controller \
43+
--set authProxy.enabled=false \
44+
--set metrics.disableAuth=true \
45+
> /tmp/rendered-no-auth.yaml
46+
47+
# Union all image: values across all renders
48+
images=$(cat /tmp/rendered-default.yaml /tmp/rendered-namespace.yaml /tmp/rendered-no-auth.yaml \
49+
| grep -E '^\s+image:' \
50+
| sed 's/.*image:[[:space:]]*//' \
51+
| tr -d '"' \
52+
| sort -u)
53+
54+
echo "Images to verify:"
55+
echo "$images"
56+
echo ""
57+
58+
failed=0
59+
while IFS= read -r image; do
60+
[ -z "$image" ] && continue
61+
echo -n "Checking $image ... "
62+
if crane manifest "$image" > /dev/null 2>&1; then
63+
echo "OK"
64+
else
65+
echo "FAILED"
66+
failed=1
67+
fi
68+
done <<< "$images"
69+
70+
if [ "$failed" -ne 0 ]; then
71+
echo ""
72+
echo "One or more images could not be verified."
73+
echo "Update image references to valid, accessible registry paths."
74+
exit 1
75+
fi

helm/temporal-worker-controller/templates/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ spec:
107107
capabilities:
108108
drop:
109109
- "ALL"
110-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
110+
image: registry.k8s.io/kubebuilder/kube-rbac-proxy:v0.14.1
111111
args:
112112
- "--secure-listen-address=0.0.0.0:8443"
113113
- --upstream=http://127.0.0.1:{{ .Values.metrics.port }}/

0 commit comments

Comments
 (0)