From ee920b798af968b46a80969852a6a6ad3d199114 Mon Sep 17 00:00:00 2001 From: Konstantin Grachev Date: Tue, 28 Feb 2023 22:06:33 +0300 Subject: [PATCH] fix: ref ConfigMap and Secret to Deployment --- templates/deployment.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index ceb758c..2d3db4d 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -13,8 +13,10 @@ spec: {{- include "hedgedoc.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -33,6 +35,16 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.registry}}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + envFrom: + - configMapRef: + name: {{ include "hedgedoc.fullname" . }} + {{- if .Values.existingSecret }} + - secretRef: + name: {{ .Values.existingSecret }} + {{- else }} + - secretRef: + name: {{ include "hedgedoc.fullname" . }} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }}