CNPG Cluster
- Examples under each key are only to be used as a placement guide
- See the Full Examples section for complete examples.
- This page is targeted primarily at chart developers. If you are looking for how to configure a CNPG backup/restore, visit the dedicated guide page
Appears in
Section titled “Appears in”.Values.cnpg.$name.cluster
- Replace references to
$namewith the actual name you want to use.
labels
Section titled “labels”Additional labels for CNPG cluster
| Key | cnpg.$name.cluster.labels |
| Type | map |
| Required | ❌ |
Helm tpl | ✅ (On value only) |
| Default | {} |
Example
cnpg: cnpg-name: cluster: labels: key: valueannotations
Section titled “annotations”Additional annotations for CNPG cluster
| Key | cnpg.$name.cluster.annotations |
| Type | map |
| Required | ❌ |
Helm tpl | ✅ (On value only) |
| Default | {} |
Example
cnpg: cnpg-name: cluster: annotations: key: valueDefine additional environment variables for the cluster’s pods
See container env options in the container env section.
| Key | cnpg.$name.cluster.env |
| Type | map |
| Required | ❌ |
Helm tpl | ❌ |
| Default | {} |
Example
cnpg: cnpg-name: cluster: env: key: valueenvFrom
Section titled “envFrom”Define additional environment variables for the cluster’s pods
See container envFrom options in the container envFrom section.
| Key | cnpg.$name.cluster.envFrom |
| Type | map |
| Required | ❌ |
Helm tpl | ❌ |
| Default | [] |
Example
cnpg: cnpg-name: cluster: envFrom: - secretRef: name: secret-name expandObjectName: false - configMapRef: name: configmap-name expandObjectName: trueinstances
Section titled “instances”Number of instances
| Key | cnpg.$name.cluster.instances |
| Type | int |
| Required | ❌ |
Helm tpl | ❌ |
| Default | 2 |
Example
cnpg: cnpg-name: cluster: instances: 2singleNode
Section titled “singleNode”Whether this is a single-node cluster.
Setting this to true would allow PVCs to be kept on instance restart.
If you are a chart developer, changing the default value is not recommended, as users are expected to change this themselves if they are running your chart on a single-node cluster.
| Key | cnpg.$name.cluster.singleNode |
| Type | bool |
| Required | ❌ |
Helm tpl | ❌ |
| Default | false |
Example
cnpg: cnpg-name: cluster: singleNode: truelogLevel
Section titled “logLevel”The cluster log level. Available values:
errorwarninginfodebugtrace
If you are a chart developer, changing the default value is not recommended, as users are expected to change this themselves if they are running into issues with CNPG.
| Key | cnpg.$name.cluster.logLevel |
| Type | enum |
| Required | ❌ |
Helm tpl | ❌ |
| Default | info |
Example
cnpg: cnpg-name: cluster: logLevel: infoprimaryUpdateMethod
Section titled “primaryUpdateMethod”TODO
primaryUpdateStrategy
Section titled “primaryUpdateStrategy”TODO
certificates
Section titled “certificates”TODO
postgresql
Section titled “postgresql”TODO
initdb
Section titled “initdb”TODO
Full Examples
Section titled “Full Examples”cnpg: $name: cluster: labels: label1: label1 label2: label2 annotations: annotation1: annotation1 annotation2: annotation2 env: key: value envList: - name: key value: value envFrom: - secretRef: name: my-secret expandObjectName: true - configMapRef: name: my-configmap expandObjectName: false instances: 2 singleNode: false logLevel: info primaryUpdateMethod: # TODO primaryUpdateStrategy: # TODO certificates: # TODO postgresql: # TODO initdb: # TODO primaryUpdateStrategy: # TODO