55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
---
|
|
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
|
kind: OCIRepository
|
|
metadata:
|
|
name: "{{ .Release.Name }}-postgresql"
|
|
spec:
|
|
url: oci://codeberg.org/wrenix/helm-charts/postgresql
|
|
interval: 10m
|
|
ref:
|
|
semver: "^0.2.6"
|
|
---
|
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
kind: HelmRelease
|
|
metadata:
|
|
name: "{{ .Release.Name }}-postgresql"
|
|
spec:
|
|
chartRef:
|
|
kind: OCIRepository
|
|
name: "{{ .Release.Name }}-postgresql"
|
|
install:
|
|
{{- toYaml .Values.commons.helm.release.install | nindent 4 }}
|
|
test:
|
|
{{- toYaml .Values.commons.helm.release.test | nindent 4 }}
|
|
upgrade:
|
|
{{- toYaml .Values.commons.helm.release.upgrade | nindent 4 }}
|
|
driftDetection:
|
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
|
interval: 10m
|
|
valuesFrom:
|
|
- kind: Secret
|
|
name: mycloud-services-postgresql
|
|
values:
|
|
persistence:
|
|
size: {{ .Values.postgresql.persistence.size }}
|
|
{{- with .Values.postgresql.persistence.storageClass | default .Values.commons.persistence.storageClass }}
|
|
storageClass: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.commons.persistence.hostPath.enabled }}
|
|
hostPath: "{{ .Values.commons.persistence.hostPath.prefix }}/services/postgresql"
|
|
{{- end }}
|
|
|
|
postgres:
|
|
password: {{ .Values.postgresql.password | default (derivePassword 1 "long" .Values.commons.masterPassword "services" "postgresql_password") | quote }}
|
|
|
|
job:
|
|
databases:
|
|
{{- range $database, $config := .Values.databases }}
|
|
{{- if (eq $config.type "postgresql") }}
|
|
{{ $database }}:
|
|
owner: {{ $config.username | default $database }}
|
|
{{- with $config.additionalParams }}
|
|
additionalParams: {{ . | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|