Skip to content

Commit 3914c4c

Browse files
authored
Merge pull request #26 from small-hack/postgres-user
add options to enable the postgres user
2 parents 0169023 + 5e60157 commit 3914c4c

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

charts/cloudnative-pg-cluster/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cnpg-cluster
33
description: Create postgres tenant clusters managed by the CNPG Operator
44
type: application
5-
version: 0.3.7
5+
version: 0.3.8
66

77
maintainers:
88
- name: "cloudymax"

charts/cloudnative-pg-cluster/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cnpg-cluster
22

3-
![Version: 0.3.7](https://img.shields.io/badge/Version-0.3.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
3+
![Version: 0.3.8](https://img.shields.io/badge/Version-0.3.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
44

55
Create postgres tenant clusters managed by the CNPG Operator
66

@@ -34,6 +34,7 @@ Create postgres tenant clusters managed by the CNPG Operator
3434
| certificates.server.serverTLSSecret | string | `""` | name of existing Kubernetes Secret for the postgresql server TLS cert, ignored if certificates.generate is true |
3535
| certificates.user.enabled | bool | `false` | create a certificate for a user to connect to postgres using CertManager requires server and client certificate generation enabled |
3636
| certificates.user.username | string | `"app"` | name of the user to create a cert for, eg: the DbOwner specified earlier. This data populated into the commonName field of the certificate. |
37+
| enableSuperuserAccess | bool | `false` | CNPG disables the postgres superuser by default must be explicitly enabled |
3738
| externalClusters | list | `[]` | |
3839
| imageName | string | `"ghcr.io/cloudnative-pg/postgresql:16.0"` | image to use for all tenant pods |
3940
| instances | int | `3` | number of postgres replicas minimum 1 required |
@@ -46,6 +47,7 @@ Create postgres tenant clusters managed by the CNPG Operator
4647
| scheduledBackup.spec.cluster.name | string | `"pg-backup"` | |
4748
| scheduledBackup.spec.schedule | string | `"0 0 0 * * *"` | crontab style schedule to run the backups |
4849
| storage.size | string | `"1Gi"` | how much storage to allocate to the postgresql cluster |
50+
| superuserSecret | string | `""` | name of existing secret to use as superuser redentials will be randomly generated if not specified. |
4951
| testApp.enabled | bool | `false` | |
5052

5153
----------------------------------------------

charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ metadata:
66
spec:
77
instances: {{ .Values.instances }}
88
imageName: {{ .Values.imageName }}
9+
enableSuperuserAccess: {{ .Values.enableSuperuserAccess }}
10+
superuserSecret: {{ .Values.superuserSecret }}
911
primaryUpdateStrategy: {{ .Values.primaryUpdateStrategy }}
1012
{{- if .Values.backup }}
1113
{{- with .Values.backup }}

charts/cloudnative-pg-cluster/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ instances: 3
77
# -- image to use for all tenant pods
88
imageName: ghcr.io/cloudnative-pg/postgresql:16.0
99

10+
# -- CNPG disables the postgres superuser by default
11+
# must be explicitly enabled
12+
enableSuperuserAccess: false
13+
14+
# -- name of existing secret to use as superuser redentials
15+
# will be randomly generated if not specified.
16+
superuserSecret: ""
17+
1018
# Examples of rolling update strategy:
1119
# unsupervised: automated update of the primary once all
1220
# replicas have been upgraded (default)

0 commit comments

Comments
 (0)