Skip to content

Commit

Permalink
Make roles configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Pothier <[email protected]>
  • Loading branch information
gpothier committed Apr 4, 2024
1 parent 0179d31 commit 70bd926
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ spec:
{{- toYaml . | nindent 6 }}
{{ end }}

managed:
{{- with .Values.cluster.roles }}
roles:
{{- toYaml . | nindent 6 }}
{{ end }}

monitoring:
enablePodMonitor: {{ and .Values.cluster.monitoring.enabled .Values.cluster.monitoring.podMonitor.enabled }}
{{- if not (empty .Values.cluster.monitoring.customQueries) }}
Expand Down
3 changes: 3 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@
"resources": {
"type": "object"
},
"roles": {
"type": "array"
},
"storage": {
"type": "object",
"properties": {
Expand Down
13 changes: 13 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,19 @@ cluster:
enableSuperuserAccess: true
superuserSecret: ""

# -- This feature enables declarative management of existing roles, as well as the creation of new roles if they are not
# already present in the database.
# See: https://cloudnative-pg.io/documentation/current/declarative_role_management/
roles: []
# - name: dante
# ensure: present
# comment: Dante Alighieri
# login: true
# superuser: false
# inRoles:
# - pg_monitor
# - pg_signal_backend

monitoring:
# -- Whether to enable monitoring
enabled: false
Expand Down

0 comments on commit 70bd926

Please sign in to comment.