From 5500ec664276098e56ae64a9028354a40eceb5a0 Mon Sep 17 00:00:00 2001 From: Konstantin Grachev Date: Wed, 16 Nov 2022 16:32:16 +0300 Subject: [PATCH] Fix: checksum must be on pod template --- templates/n8n-deployment.yaml | 4 +++- templates/webhook-deployment.yaml | 7 +++---- templates/worker-deployment.yaml | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/templates/n8n-deployment.yaml b/templates/n8n-deployment.yaml index acc8984..868be3f 100644 --- a/templates/n8n-deployment.yaml +++ b/templates/n8n-deployment.yaml @@ -14,8 +14,10 @@ spec: {{- include "n8n.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.n8n.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + {{- with .Values.n8n.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: diff --git a/templates/webhook-deployment.yaml b/templates/webhook-deployment.yaml index 1d3a5ff..aeedb1a 100644 --- a/templates/webhook-deployment.yaml +++ b/templates/webhook-deployment.yaml @@ -4,9 +4,6 @@ metadata: name: {{ include "n8n.fullname" . }}-webhook labels: {{- include "n8n.labels" . | nindent 4 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} spec: {{- if not .Values.webhook.autoscaling.enabled }} replicas: {{ .Values.webhook.replicaCount }} @@ -16,8 +13,10 @@ spec: {{- include "n8n.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.webhook.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + {{- with .Values.webhook.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: diff --git a/templates/worker-deployment.yaml b/templates/worker-deployment.yaml index 43229dc..894d94b 100644 --- a/templates/worker-deployment.yaml +++ b/templates/worker-deployment.yaml @@ -16,8 +16,10 @@ spec: {{- include "n8n.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.worker.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + {{- with .Values.worker.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: