Skip to content

Commit 6e31a61

Browse files
author
Max Roby
committed
add role configuration options
1 parent 1a4f902 commit 6e31a61

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-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.9
5+
version: 0.3.10
66

77
maintainers:
88
- name: "cloudymax"

charts/cloudnative-pg-cluster/README.md

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

3-
![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)
3+
![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)
44

55
Create postgres tenant clusters managed by the CNPG Operator
66

@@ -38,6 +38,7 @@ Create postgres tenant clusters managed by the CNPG Operator
3838
| externalClusters | list | `[]` | |
3939
| imageName | string | `"ghcr.io/cloudnative-pg/postgresql:16.0"` | image to use for all tenant pods |
4040
| instances | int | `3` | number of postgres replicas minimum 1 required |
41+
| managed | object | `{"roles":null}` | See https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-RoleConfiguration for explanation of all options |
4142
| monitoring.enablePodMonitor | bool | `false` | enable monitoring via Prometheus |
4243
| name | string | `"cnpg"` | |
4344
| 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 |

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@ spec:
6464
{{- end }}
6565
{{- end }}
6666
{{- end }}
67+
{{- if .Values.managed.roles }}
68+
managed:
69+
roles:
70+
{{- range $reg, $props := .Values.managed.roles }}
71+
- name: {{ $props.name }}
72+
{{- toYaml . | nindent 6 }}
73+
{{- end }}
74+
{{- end }}
75+

charts/cloudnative-pg-cluster/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ bootstrap:
3737
# recovery:
3838
# source: clusterBackup
3939

40+
# -- See https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-RoleConfiguration for explanation of all options
41+
managed:
42+
roles:
43+
# - name: friend
44+
# ensure: present
45+
# comment: "friendly user"
46+
# login: true
47+
# superuser: false
48+
# createdb: false
49+
# createrole: false
50+
# inRoles: []
51+
4052
externalClusters: []
4153
# # -- name of external/existing cluster
4254
# - name: clusterBackup

0 commit comments

Comments
 (0)