Skip to content

Commit

Permalink
Merge pull request #26 from small-hack/postgres-user
Browse files Browse the repository at this point in the history
add options to enable the postgres user
  • Loading branch information
cloudymax authored Nov 13, 2023
2 parents 0169023 + 5e60157 commit 3914c4c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/cloudnative-pg-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cnpg-cluster
description: Create postgres tenant clusters managed by the CNPG Operator
type: application
version: 0.3.7
version: 0.3.8

maintainers:
- name: "cloudymax"
Expand Down
4 changes: 3 additions & 1 deletion charts/cloudnative-pg-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cnpg-cluster

![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)
![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)

Create postgres tenant clusters managed by the CNPG Operator

Expand Down Expand Up @@ -34,6 +34,7 @@ Create postgres tenant clusters managed by the CNPG Operator
| certificates.server.serverTLSSecret | string | `""` | name of existing Kubernetes Secret for the postgresql server TLS cert, ignored if certificates.generate is true |
| certificates.user.enabled | bool | `false` | create a certificate for a user to connect to postgres using CertManager requires server and client certificate generation enabled |
| 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. |
| enableSuperuserAccess | bool | `false` | CNPG disables the postgres superuser by default must be explicitly enabled |
| externalClusters | list | `[]` | |
| imageName | string | `"ghcr.io/cloudnative-pg/postgresql:16.0"` | image to use for all tenant pods |
| instances | int | `3` | number of postgres replicas minimum 1 required |
Expand All @@ -46,6 +47,7 @@ Create postgres tenant clusters managed by the CNPG Operator
| scheduledBackup.spec.cluster.name | string | `"pg-backup"` | |
| scheduledBackup.spec.schedule | string | `"0 0 0 * * *"` | crontab style schedule to run the backups |
| storage.size | string | `"1Gi"` | how much storage to allocate to the postgresql cluster |
| superuserSecret | string | `""` | name of existing secret to use as superuser redentials will be randomly generated if not specified. |
| testApp.enabled | bool | `false` | |

----------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
spec:
instances: {{ .Values.instances }}
imageName: {{ .Values.imageName }}
enableSuperuserAccess: {{ .Values.enableSuperuserAccess }}
superuserSecret: {{ .Values.superuserSecret }}
primaryUpdateStrategy: {{ .Values.primaryUpdateStrategy }}
{{- if .Values.backup }}
{{- with .Values.backup }}
Expand Down
8 changes: 8 additions & 0 deletions charts/cloudnative-pg-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ instances: 3
# -- image to use for all tenant pods
imageName: ghcr.io/cloudnative-pg/postgresql:16.0

# -- CNPG disables the postgres superuser by default
# must be explicitly enabled
enableSuperuserAccess: false

# -- name of existing secret to use as superuser redentials
# will be randomly generated if not specified.
superuserSecret: ""

# Examples of rolling update strategy:
# unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
Expand Down

0 comments on commit 3914c4c

Please sign in to comment.