25 lines
816 B
YAML
25 lines
816 B
YAML
{{- if and (not .Values.database.secrets) (not .Values.postgresql.enabled) (not .Values.artifactory.unifiedSecretInstallation) }}
|
|
{{- if or .Values.database.url .Values.database.user .Values.database.password }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ template "artifactory-ha.fullname" . }}-database-creds
|
|
labels:
|
|
app: {{ template "artifactory-ha.name" . }}
|
|
chart: {{ template "artifactory-ha.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
type: Opaque
|
|
data:
|
|
{{- with .Values.database.url }}
|
|
db-url: {{ tpl . $ | b64enc | quote }}
|
|
{{- end }}
|
|
{{- with .Values.database.user }}
|
|
db-user: {{ tpl . $ | b64enc | quote }}
|
|
{{- end }}
|
|
{{- with .Values.database.password }}
|
|
db-password: {{ tpl . $ | b64enc | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|