mirror of
https://github.com/rtomik/helm-charts.git
synced 2026-04-05 09:40:38 +00:00
22 lines
1.2 KiB
YAML
22 lines
1.2 KiB
YAML
{{- 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 }} |