fix(pod): pipe secret correctly to func sha256sum

The privious implemented feature pipe the secret not correctly to the sha256sum
function. This leads everytime to the same sha256 sum.

This patch fixes this bug.
This commit is contained in:
2025-11-30 13:49:15 +01:00
parent 28c1e37e13
commit 502c78296e

View File

@@ -6,7 +6,8 @@
{{- include "athens-proxy.annotations" . }}
{{- if and .Values.certificate.enabled (not .Values.certificate.existingSecret.enabled) }}
{{- $secretName := include "athens-proxy.certificates.server.name" $ }}
{{ printf "checksum/secret-%s: %s" $secretName (print (lookup "v1" "Secret" .Release.Namespace $secretName) | sha256sum) }}
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{ printf "checksum/secret-%s: %s" $secretName ($secret | toYaml | sha256sum) }}
{{- end }}
{{- if and .Values.config.env.enabled (not .Values.config.env.existingSecret.enabled) }}
{{ printf "checksum/secret-%s: %s" (include "athens-proxy.secrets.env.name" $) (include (print $.Template.BasePath "/secretEnv.yaml") . | sha256sum) }}