From fd8c3fffc6418823df082ea8b61392d2587a3827 Mon Sep 17 00:00:00 2001 From: Caleb <23466706+caleb-devops@users.noreply.github.com> Date: Tue, 30 Jan 2024 22:20:59 -0700 Subject: [PATCH] Automatically roll deployment on config change --- charts/palworld/Chart.yaml | 2 +- charts/palworld/templates/deployment.yaml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/charts/palworld/Chart.yaml b/charts/palworld/Chart.yaml index 5fd22af..8b36b4d 100644 --- a/charts/palworld/Chart.yaml +++ b/charts/palworld/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: palworld -version: 0.1.1 +version: 0.1.2 description: Palworld Helm chart for Kubernetes home: https://github.com/caleb-devops/palworld-helm sources: diff --git a/charts/palworld/templates/deployment.yaml b/charts/palworld/templates/deployment.yaml index 3976a68..4d9f28c 100644 --- a/charts/palworld/templates/deployment.yaml +++ b/charts/palworld/templates/deployment.yaml @@ -14,10 +14,14 @@ spec: {{- include "palworld.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} - {{- end }} + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- if .Values.config.secretEnv.create }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + {{- end }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} + {{- end }} labels: {{- include "palworld.labels" . | nindent 8 }} {{- with .Values.podLabels }}