From 187d0eb1ac85f2bbd8e770b043ae6d65421616ee Mon Sep 17 00:00:00 2001 From: Jorge Vidal Date: Mon, 30 Sep 2024 08:50:25 +0000 Subject: [PATCH] fix: deployment checksum annotations (fix hasura#24) --- charts/graphql-engine/templates/configmap.yaml | 4 ---- charts/graphql-engine/templates/deployment.yaml | 5 +++-- charts/graphql-engine/templates/secrets.yaml | 4 ---- charts/graphql-engine/values.yaml | 4 ---- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/charts/graphql-engine/templates/configmap.yaml b/charts/graphql-engine/templates/configmap.yaml index 3e0e4b5..4e599b2 100644 --- a/charts/graphql-engine/templates/configmap.yaml +++ b/charts/graphql-engine/templates/configmap.yaml @@ -8,10 +8,6 @@ kind: ConfigMap metadata: name: {{ template "common.configMapName" $ }} namespace: {{ template "common.namespace" $ }} - annotations: - {{- if not $.Values.disableAnnotationTimestamp }} - deployment-timestamp: "{{ date "20060102150405" now }}" - {{- end }} data: HASURA_GRAPHQL_ENABLE_CONSOLE: {{ coalesce .enableConsole false | quote }} {{- range $key, $value := (coalesce .extraConfigs .additionalConfigs) }} diff --git a/charts/graphql-engine/templates/deployment.yaml b/charts/graphql-engine/templates/deployment.yaml index 7214de9..8560aeb 100644 --- a/charts/graphql-engine/templates/deployment.yaml +++ b/charts/graphql-engine/templates/deployment.yaml @@ -29,9 +29,10 @@ spec: template: metadata: annotations: - {{- if not .Values.disableAnnotationTimestamp }} - deployment-timestamp: "{{ date "20060102150405" now }}" + {{- if or .Values.secret.enabled .Values.postgres.enabled }} + checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} {{- end }} + checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- if .Values.annotations }} {{- toYaml .Values.annotations | nindent 8 }} {{- end }} diff --git a/charts/graphql-engine/templates/secrets.yaml b/charts/graphql-engine/templates/secrets.yaml index c615b18..9f141de 100644 --- a/charts/graphql-engine/templates/secrets.yaml +++ b/charts/graphql-engine/templates/secrets.yaml @@ -11,10 +11,6 @@ kind: Secret metadata: name: {{ template "common.secretsName" $ }} namespace: {{ template "common.namespace" $ }} - annotations: - {{- if not $.Values.disableAnnotationTimestamp }} - deployment-timestamp: "{{ date "20060102150405" now }}" - {{- end }} data: {{- if coalesce .metadataDbUrl ($.Values.config).metadataOnly }} HASURA_GRAPHQL_METADATA_DATABASE_URL: {{ include "db.url" $ | b64enc | quote }} diff --git a/charts/graphql-engine/values.yaml b/charts/graphql-engine/values.yaml index f4dcfa9..f13e70e 100644 --- a/charts/graphql-engine/values.yaml +++ b/charts/graphql-engine/values.yaml @@ -103,10 +103,6 @@ serviceAccount: ## annotations: {} -## Disable the deploy timestamp annotation to skip force rollout -## -disableAnnotationTimestamp: false - ## The deployment strategy to use to replace existing pods with new ones. ## DeploymentStrategy describes how to replace existing pods with new ones. strategy: {}