From 9bd1d1c823855e27ae325279f78f8ae4261684bf Mon Sep 17 00:00:00 2001 From: Michael Sekamanya Date: Sat, 3 Jun 2023 02:54:12 +0100 Subject: [PATCH] feat: compute config checksum --- charts/agent/Chart.yaml | 2 +- charts/agent/templates/agent-deploy.yaml | 5 ++++- charts/agent/templates/agent-rbac.yaml | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/agent/Chart.yaml b/charts/agent/Chart.yaml index 5b2662f..f49564d 100644 --- a/charts/agent/Chart.yaml +++ b/charts/agent/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cloud-agent description: A Helm chart for Ametnes Cloud Agent type: application -version: 0.1.33 +version: 0.1.34 appVersion: 0.3.2731 dependencies: - name: memcached diff --git a/charts/agent/templates/agent-deploy.yaml b/charts/agent/templates/agent-deploy.yaml index 7bb94ea..20a77a1 100644 --- a/charts/agent/templates/agent-deploy.yaml +++ b/charts/agent/templates/agent-deploy.yaml @@ -23,8 +23,11 @@ spec: {{- end }} template: metadata: - {{- with .podAnnotations }} annotations: + {{- if .config }} + checksum/config: {{ sha256sum (toYaml .config) }} + {{- end }} + {{- with .podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: diff --git a/charts/agent/templates/agent-rbac.yaml b/charts/agent/templates/agent-rbac.yaml index c7ade94..64a336d 100644 --- a/charts/agent/templates/agent-rbac.yaml +++ b/charts/agent/templates/agent-rbac.yaml @@ -4,8 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ $ReleaseName }}-{{ .Values.agent.name }} - namespace: {{ $ReleaseNamespace }} + name: {{ $ReleaseNamespace }}-{{ $ReleaseName }} labels: {{- with .Values.agent.labels }} {{- toYaml . | nindent 4 }}