mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 11:06:56 -06:00
21 lines
1.4 KiB
YAML
21 lines
1.4 KiB
YAML
{{- if and (not .Values.global.postgresql.existingSecret) (not .Values.postgresql.existingSecret) }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ include "pipelines.fullname" . }}-database
|
|
labels:
|
|
{{- include "pipelines.labels" . | nindent 4 }}
|
|
type: Opaque
|
|
data:
|
|
{{- if .Values.postgresql.enabled }}
|
|
postgresql-password: {{ .Values.postgresql.postgresqlPassword | b64enc | quote }}
|
|
postgresql-url: {{ (printf "postgres://%s:%s@%s-postgresql:%v/%s?sslmode=disable" .Values.postgresql.postgresqlUsername .Values.postgresql.postgresqlPassword .Release.Name .Values.postgresql.service.port .Values.postgresql.postgresqlDatabase) | b64enc }}
|
|
{{- else if and (not .Values.postgresql.enabled) (.Values.global.postgresql.ssl) }}
|
|
postgresql-password: {{ tpl .Values.global.postgresql.password . | b64enc | quote }}
|
|
postgresql-url: {{ tpl (printf "postgres://%s:%s@%v:%v/%s?sslmode=require" .Values.global.postgresql.user .Values.global.postgresql.password .Values.global.postgresql.host .Values.global.postgresql.port .Values.global.postgresql.database) . | b64enc }}
|
|
{{- else }}
|
|
postgresql-password: {{ tpl .Values.global.postgresql.password . | b64enc | quote }}
|
|
postgresql-url: {{ tpl (printf "postgres://%s:%s@%v:%v/%s?sslmode=disable" .Values.global.postgresql.user .Values.global.postgresql.password .Values.global.postgresql.host .Values.global.postgresql.port .Values.global.postgresql.database) . | b64enc }}
|
|
{{- end }}
|
|
{{- end }}
|