From 75f6cae63d6cabe3dca789bfd76655e4ce7c526b Mon Sep 17 00:00:00 2001 From: Witold Duranek Date: Thu, 29 Aug 2024 15:58:57 +0200 Subject: [PATCH] fix: restart on secret map changes (#437) --- charts/netdata/templates/child/daemonset.yaml | 2 +- charts/netdata/templates/k8s-state/deployment.yaml | 2 +- charts/netdata/templates/parent/deployment.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/netdata/templates/child/daemonset.yaml b/charts/netdata/templates/child/daemonset.yaml index d3dfb76..f244bd4 100644 --- a/charts/netdata/templates/child/daemonset.yaml +++ b/charts/netdata/templates/child/daemonset.yaml @@ -25,7 +25,7 @@ spec: {{- if .Values.child.podAnnotationAppArmor.enabled }} container.apparmor.security.beta.kubernetes.io/{{ .Chart.Name }}: unconfined {{- end }} - checksum/config: {{ include (print $.Template.BasePath "/child/configmap.yaml") . | sha256sum }} + checksum/config: {{ print (include (print $.Template.BasePath "/child/configmap.yaml") .) (include (print $.Template.BasePath "/child/secrets.yaml") .) | sha256sum }} {{- with .Values.child.podAnnotations }} {{ toYaml . | trim | indent 8 }} {{- end }} diff --git a/charts/netdata/templates/k8s-state/deployment.yaml b/charts/netdata/templates/k8s-state/deployment.yaml index c0d4b9a..fbc1a36 100644 --- a/charts/netdata/templates/k8s-state/deployment.yaml +++ b/charts/netdata/templates/k8s-state/deployment.yaml @@ -25,7 +25,7 @@ spec: {{- if .Values.k8sState.podAnnotationAppArmor.enabled }} container.apparmor.security.beta.kubernetes.io/{{ .Chart.Name }}: unconfined {{- end }} - checksum/config: {{ include (print $.Template.BasePath "/k8s-state/configmap.yaml") . | sha256sum }} + checksum/config: {{ print (include (print $.Template.BasePath "/k8s-state/configmap.yaml") .) (include (print $.Template.BasePath "/k8s-state/secrets.yaml") .) | sha256sum }} {{- with .Values.k8sState.podAnnotations }} {{ toYaml . | trim | indent 8 }} {{- end }} diff --git a/charts/netdata/templates/parent/deployment.yaml b/charts/netdata/templates/parent/deployment.yaml index 4f99cde..8d23cd8 100644 --- a/charts/netdata/templates/parent/deployment.yaml +++ b/charts/netdata/templates/parent/deployment.yaml @@ -29,7 +29,7 @@ spec: {{ toYaml . | trim | indent 8 }} {{- end }} annotations: - checksum/config: {{ include (print $.Template.BasePath "/parent/configmap.yaml") . | sha256sum }} + checksum/config: {{ print (include (print $.Template.BasePath "/parent/configmap.yaml") .) (include (print $.Template.BasePath "/parent/secrets.yaml") .) | sha256sum }} {{- with .Values.parent.podAnnotations }} {{ toYaml . | trim | indent 8 }} {{- end }}