Skip to content

Commit

Permalink
fix: secret handling (#1864)
Browse files Browse the repository at this point in the history
Signed-off-by: OMPRAKASH MISHRA <omprakashmishra3978@gmail.com>
  • Loading branch information
mishraomp authored Mar 6, 2024
1 parent 5a7c8ab commit 72b2a76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 0 additions & 8 deletions charts/app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,3 @@ app.kubernetes.io/name: {{ include "fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}


{{- define "secretLabels" -}}
{{ include "labels" . }}
{{- if .Values.global.secrets.persist }}
annotations:
"helm.sh/resource-policy": "keep"
{{- end }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/app/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}
labels: {{- include "secretLabels" . | nindent 4 }}

labels: {{- include "labels" . | nindent 4 }}
{{- if .Values.global.secrets.persist }}
annotations:
helm.sh/resource-policy: keep
{{- end }}
data:
databasePassword: {{ $databasePassword | quote }}
postgres-password: {{ $databasePassword | quote }}
Expand Down

0 comments on commit 72b2a76

Please sign in to comment.