mirror of
https://github.com/rtomik/helm-charts.git
synced 2026-04-05 17:50:38 +00:00
improved helm chart
This commit is contained in:
22
charts/donetick/templates/secret.yaml
Normal file
22
charts/donetick/templates/secret.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
{{- if or (not .Values.config.jwt.existingSecret) (and (not .Values.config.oauth2.existingSecret) (or .Values.config.oauth2.client_id .Values.config.oauth2.client_secret)) (and (eq .Values.config.database.type "postgres") (not .Values.config.database.existingSecret)) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "donetick.fullname" . }}-secrets
|
||||
labels:
|
||||
{{- include "donetick.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if not .Values.config.jwt.existingSecret }}
|
||||
{{ .Values.config.jwt.secretKey }}: {{ .Values.config.jwt.secret | b64enc }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.config.database.type "postgres") (not .Values.config.database.existingSecret) }}
|
||||
{{ .Values.config.database.passwordKey }}: {{ .Values.config.database.password | b64enc }}
|
||||
{{- end }}
|
||||
{{- if and (not .Values.config.oauth2.existingSecret) .Values.config.oauth2.client_id }}
|
||||
{{ .Values.config.oauth2.clientIdKey }}: {{ .Values.config.oauth2.client_id | b64enc }}
|
||||
{{- end }}
|
||||
{{- if and (not .Values.config.oauth2.existingSecret) .Values.config.oauth2.client_secret }}
|
||||
{{ .Values.config.oauth2.clientSecretKey }}: {{ .Values.config.oauth2.client_secret | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user