File tree Expand file tree Collapse file tree 5 files changed +16
-3
lines changed
postgrescluster/templates Expand file tree Collapse file tree 5 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ pgstacBootstrap:
7474| Parameter | Description | Default |
7575|-----------|-------------|---------|
7676| ` postgresql.type` | Database deployment type | `postgrescluster` |
77+ | `postgrescluster.enabled` | Enable PostgreSQL cluster. Must be set to `false` when using external databases | `true` |
7778| `ingress.enabled` | Enable ingress | `true` |
7879| `ingress.className` | Ingress controller class | `nginx` |
7980| `browser.enabled` | Enable STAC Browser interface | `true` |
Original file line number Diff line number Diff line change @@ -315,6 +315,9 @@ Validate PostgreSQL configuration
315315 { {- end } }
316316 { {- include " eoapi.validatePostgresCluster" . } }
317317{ {- else if eq .Values.postgresql.type " external-plaintext" } }
318+ { {- if .Values.postgrescluster.enabled } }
319+ { {- fail " When postgresql.type is 'external-plaintext', postgrescluster.enabled must be set to false" } }
320+ { {- end } }
318321 { {- if not .Values.postgresql.external.host } }
319322 { {- fail " When postgresql.type is 'external-plaintext', postgresql.external.host must be set" } }
320323 { {- end } }
@@ -325,6 +328,9 @@ Validate PostgreSQL configuration
325328 { {- fail " When postgresql.type is 'external-plaintext', postgresql.external.credentials.password must be set" } }
326329 { {- end } }
327330{ {- else if eq .Values.postgresql.type " external-secret" } }
331+ { {- if .Values.postgrescluster.enabled } }
332+ { {- fail " When postgresql.type is 'external-secret', postgrescluster.enabled must be set to false" } }
333+ { {- end } }
328334 { {- if not .Values.postgresql.external.existingSecret.name } }
329335 { {- fail " When postgresql.type is 'external-secret', postgresql.external.existingSecret.name must be set" } }
330336 { {- end } }
Original file line number Diff line number Diff line change 1+ {{- if .Values.enabled }}
12{{- if or .Values.multiBackupRepos .Values.s3 .Values.gcs .Values.azure }}
23apiVersion : v1
34kind : Secret
2223 azure.conf : |-
2324 {{ include "postgres.azure" $args | b64enc }}
2425 {{- end }}
25- {{- end }}
26+ {{- end }}
2627{{- else if .Values.s3 }}
2728 {{- $args := dict "s3" .Values.s3 "index" 0 }}
2829 s3.conf : |-
3940 {{ include "postgres.azure" $args | b64enc }}
4041{{- end }}
4142{{- end }}
43+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.enabled }}
12apiVersion : postgres-operator.crunchydata.com/v1beta1
23kind : PostgresCluster
34metadata :
@@ -227,3 +228,4 @@ spec:
227228 customReplicationTLSSecret :
228229{{ toYaml .Values.customReplicationTLSSecret | indent 4 }}
229230 {{- end }}
231+ {{- end }}
Original file line number Diff line number Diff line change @@ -39,18 +39,20 @@ Using Crunchydata's PostgreSQL Operator (`postgresql.type: "postgrescluster"`):
3939
4040| ** Values Key** | ** Description** | ** Default** | ** Choices** |
4141| :--------------| :----------------| :------------| :------------|
42- | ` postgrescluster.enabled ` | Enable PostgreSQL cluster | true | true/false |
42+ | ` postgrescluster.enabled ` | Enable PostgreSQL cluster. Must be set to ` false ` when using external databases | true | true/false |
4343| ` postgrescluster.name ` | Cluster name | Release name | any valid k8s name |
4444| ` postgrescluster.postgresVersion ` | PostgreSQL version | 16 | supported versions |
4545| ` postgrescluster.postGISVersion ` | PostGIS version | "3.4" | supported versions |
4646
4747### External Database
4848
49- For external databases, set ` postgresql.type ` to either:
49+ For external databases, set ` postgresql.type ` to either ` external-plaintext ` or ` external-secret ` and set ` postgrescluster.enabled: false ` .
5050
5151
52521 . Using plaintext credentials (` external-plaintext ` ):
5353``` yaml
54+ postgrescluster :
55+ enabled : false
5456postgresql :
5557 type : " external-plaintext"
5658 external :
You can’t perform that action at this time.
0 commit comments