diff --git a/charts/cloudnative-pg-cluster/Chart.yaml b/charts/cloudnative-pg-cluster/Chart.yaml index a4b4dca..b261995 100644 --- a/charts/cloudnative-pg-cluster/Chart.yaml +++ b/charts/cloudnative-pg-cluster/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cnpg-cluster description: Create postgres tenant clusters managed by the CNPG Operator type: application -version: 0.3.9 +version: 0.3.10 maintainers: - name: "cloudymax" diff --git a/charts/cloudnative-pg-cluster/README.md b/charts/cloudnative-pg-cluster/README.md index b75a92f..8485278 100644 --- a/charts/cloudnative-pg-cluster/README.md +++ b/charts/cloudnative-pg-cluster/README.md @@ -1,6 +1,6 @@ # cnpg-cluster -![Version: 0.3.9](https://img.shields.io/badge/Version-0.3.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.3.10](https://img.shields.io/badge/Version-0.3.10-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 @@ -38,6 +38,7 @@ Create postgres tenant clusters managed by the CNPG Operator | 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 | +| managed | object | `{"roles":null}` | See https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-RoleConfiguration for explanation of all options | | monitoring.enablePodMonitor | bool | `false` | enable monitoring via Prometheus | | name | string | `"cnpg"` | | | postgresql.pg_hba | list | `["hostnossl all all 0.0.0.0/0 reject","hostssl all all 0.0.0.0/0 cert clientcert=verify-full"]` | records for the pg_hba.conf file. ref: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html | diff --git a/charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml b/charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml index 0c3ac93..e9e5d0f 100644 --- a/charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml +++ b/charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml @@ -64,3 +64,12 @@ spec: {{- end }} {{- end }} {{- end }} + {{- if .Values.managed.roles }} + managed: + roles: + {{- range $reg, $props := .Values.managed.roles }} + - name: {{ $props.name }} + {{- toYaml . | nindent 6 }} + {{- end }} + {{- end }} + diff --git a/charts/cloudnative-pg-cluster/values.yaml b/charts/cloudnative-pg-cluster/values.yaml index a84c7a3..aebe5e0 100644 --- a/charts/cloudnative-pg-cluster/values.yaml +++ b/charts/cloudnative-pg-cluster/values.yaml @@ -37,6 +37,18 @@ bootstrap: # recovery: # source: clusterBackup +# -- See https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-RoleConfiguration for explanation of all options +managed: + roles: + # - name: friend + # ensure: present + # comment: "friendly user" + # login: true + # superuser: false + # createdb: false + # createrole: false + # inRoles: [] + externalClusters: [] # # -- name of external/existing cluster # - name: clusterBackup