From e8e84f5ffcf192bc850c7bcdd55bcec0cb876df5 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Thu, 30 Jan 2025 15:16:20 +0100 Subject: [PATCH] fix(template/helm): Add checksum/config annotation Add the dynamic `checksum/config` annotation back in. Previously, this annotation only appeared when `.Values.podAnnotations` was set. It was only discovered broken by adding podAnnotations and seeing that the `include` context was invalid, leading to this error: ``` Error: template: trino-operator/templates/deployment.yaml:20:28: executing "trino-operator/templates/deployment.yaml" at : error calling include: template: trino-operator/templates/configmap.yaml:4:10: executing "trino-operator/templates/configmap.yaml" at <.Files.Glob>: nil pointer evaluating interface {}.Glob ``` Note, this was always broken since inception in #7. --- template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 index 6bbd1e5e..f690680f 100644 --- a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 +++ b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 @@ -17,8 +17,8 @@ spec: metadata: annotations: internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - {{- with .Values.podAnnotations }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: