Skip to content

Commit

Permalink
add role configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Roby committed Nov 13, 2023
1 parent 1a4f902 commit 6e31a61
Show file tree
Hide file tree
Showing 4 changed files with 24 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.9
version: 0.3.10

maintainers:
- name: "cloudymax"
Expand Down
3 changes: 2 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.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

Expand Down Expand Up @@ -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 |
Expand Down
9 changes: 9 additions & 0 deletions charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

12 changes: 12 additions & 0 deletions charts/cloudnative-pg-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e31a61

Please sign in to comment.