23 lines
791 B
YAML
23 lines
791 B
YAML
{{- if and .Values.postgresql.enabled .Values.cloudNativePG.enabled -}}
|
|
{{- fail "postgresql.enabled and cloudNativePG.enabled are mutually exclusive" -}}
|
|
{{- end -}}
|
|
{{- if and .Values.cloudNativePG.enabled .Values.cloudNativePG.create }}
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: {{ .Values.cloudNativePG.name }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
instances: {{ .Values.cloudNativePG.instances }}
|
|
imageName: {{ .Values.cloudNativePG.imageName | quote }}
|
|
bootstrap:
|
|
initdb:
|
|
database: {{ .Values.cloudNativePG.database }}
|
|
owner: {{ .Values.cloudNativePG.owner }}
|
|
storage:
|
|
size: {{ .Values.cloudNativePG.storage.size }}
|
|
{{- with .Values.cloudNativePG.storage.storageClass }}
|
|
storageClass: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|