Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cluster) adds configuration options for services and ldap configuration #409

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,14 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| cluster.postgresql.parameters | object | `{}` | PostgreSQL configuration options (postgresql.conf) |
| cluster.postgresql.pg_hba | list | `[]` | PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file) |
| cluster.postgresql.pg_ident | list | `[]` | PostgreSQL User Name Maps rules (lines to be appended to the pg_ident.conf file) |
| cluster.postgresql.ldap | list | `[]` | PostgreSQL LDAP configuration (see https://cloudnative-pg.io/documentation/current/postgresql_conf/#ldap-configuration) |
| cluster.postgresql.shared_preload_libraries | list | `[]` | Lists of shared preload libraries to add to the default ones |
| cluster.primaryUpdateMethod | string | `"switchover"` | Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated. It can be switchover (default) or restart. |
| cluster.primaryUpdateStrategy | string | `"unsupervised"` | Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be automated (unsupervised - default) or manual (supervised) |
| cluster.priorityClassName | string | `""` | |
| cluster.resources | object | `{}` | Resources requirements of every generated Pod. Please refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for more information. We strongly advise you use the same setting for limits and requests so that your cluster pods are given a Guaranteed QoS. See: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/ |
| cluster.roles | list | `[]` | 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/ |
| cluster.services | object | `{}` | Customization of service definions. Please refer to https://cloudnative-pg.io/documentation/1.24/service_management/ |
| cluster.storage.size | string | `"8Gi"` | |
| cluster.storage.storageClass | string | `""` | |
| cluster.superuserSecret | string | `""` | |
Expand Down
10 changes: 9 additions & 1 deletion charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,19 @@ spec:
{{- toYaml .pg_hba | nindent 6 }}
pg_ident:
{{- toYaml .pg_ident | nindent 6 }}
{{- if .ldap }}
ldap:
{{- toYaml .ldap | nindent 6 }}
{{- end}}
parameters:
{{- toYaml .parameters | nindent 6 }}
{{ end }}

managed:
managed:
{{- with .Values.cluster.services }}
services:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- with .Values.cluster.roles }}
roles:
{{- toYaml . | nindent 6 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@
},
"shared_preload_libraries": {
"type": "array"
},
"ldap": {
"type": "object"
}
}
},
Expand All @@ -288,6 +291,9 @@
"roles": {
"type": "array"
},
"services": {
"type": "object"
},
"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 @@ -160,6 +160,9 @@ cluster:
# -- The GID of the postgres user inside the image, defaults to 26
postgresGID: -1

# -- Customization of service definions. Please refer to https://cloudnative-pg.io/documentation/1.24/service_management/
services: {}

# -- Resources requirements of every generated Pod.
# Please refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for more information.
# We strongly advise you use the same setting for limits and requests so that your cluster pods are given a Guaranteed QoS.
Expand Down Expand Up @@ -263,6 +266,16 @@ cluster:
# - mymap /^(.*)@mydomain\.com$ \1
shared_preload_libraries: []
# - pgaudit
ldap: {}
# https://cloudnative-pg.io/documentation/1.24/postgresql_conf/#ldap-configuration
# server: 'openldap.default.svc.cluster.local'
# bindSearchAuth:
# baseDN: 'ou=org,dc=example,dc=com'
# bindDN: 'cn=admin,dc=example,dc=com'
# bindPassword:
# name: 'ldapBindPassword'
# key: 'data'
# searchAttribute: 'uid'

# -- BootstrapInitDB is the configuration of the bootstrap process when initdb is used.
# See: https://cloudnative-pg.io/documentation/current/bootstrap/
Expand Down