Skip to content

Commit 8277620

Browse files
tarun-etikalaclaude
andcommitted
fix: add image.repository validation and secret checksum annotation (red-hat-data-services#31, red-hat-data-services#51)
- Fail fast with a clear error when image.repository is empty instead of rendering an invalid ":latest" image reference - Add checksum/secret annotation to pod template so pods auto-restart when secret values change (e.g. API_KEY rotation via make deploy) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b2cbd2a commit 8277620

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

charts/agent/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ spec:
1111
{{- include "agent.selectorLabels" . | nindent 6 }}
1212
template:
1313
metadata:
14+
annotations:
15+
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
1416
labels:
1517
{{- include "agent.selectorLabels" . | nindent 8 }}
1618
spec:
1719
securityContext:
1820
runAsNonRoot: true
1921
containers:
2022
- name: {{ include "agent.name" . }}
21-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
23+
image: "{{ required "image.repository is required — set CONTAINER_IMAGE in .env" .Values.image.repository }}:{{ .Values.image.tag }}"
2224
imagePullPolicy: {{ .Values.image.pullPolicy }}
2325
securityContext:
2426
allowPrivilegeEscalation: false

0 commit comments

Comments
 (0)