Browse Source

reload on configmap change

Vadim Surkov 3 years ago
parent
commit
1a95a4542a
3 changed files with 7 additions and 2 deletions
  1. 1 1
      helm/Chart.yaml
  2. 2 0
      helm/templates/daemonset.yaml
  3. 4 1
      helm/templates/deployment.yaml

+ 1 - 1
helm/Chart.yaml

@@ -15,7 +15,7 @@ type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 0.1.0
+version: 0.1.1
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to

+ 2 - 0
helm/templates/daemonset.yaml

@@ -12,6 +12,8 @@ spec:
     metadata:
       labels:
         {{- include "openvpn.router.selectorLabels" . | nindent 8 }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/cm-router.yaml") . | sha256sum }}
     spec:
       serviceAccountName: {{ .Release.Name }}-router
       {{- if .Values.registry_secret_data }}

+ 4 - 1
helm/templates/deployment.yaml

@@ -11,8 +11,11 @@ spec:
       {{- include "openvpn.selectorLabels" . | nindent 6 }}
   template:
     metadata:
-    {{- with .Values.openvpn.podAnnotations }}
       annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/cm-configuration.yaml") . | sha256sum }}
+        checksum/config2: {{ include (print $.Template.BasePath "/secret-keys.yaml") . | sha256sum }}
+        checksum/config3: {{ include (print $.Template.BasePath "/cm-openvpnscripts.yaml") . | sha256sum }}
+    {{- with .Values.openvpn.podAnnotations }}
         {{- toYaml . | nindent 8 }}
     {{- end }}
       labels: