diff --git a/charts/cluster/templates/cluster.yaml b/charts/cluster/templates/cluster.yaml index a2cd09853..60c818f6b 100644 --- a/charts/cluster/templates/cluster.yaml +++ b/charts/cluster/templates/cluster.yaml @@ -135,3 +135,9 @@ spec: {{- end }} {{ include "cluster.bootstrap" . | nindent 2 }} {{ include "cluster.backup" . | nindent 2 }} + {{- with .Values.cluster.projectedVolumeTemplate.sources }} + projectedVolumeTemplate: + sources: + {{- . | toYaml | nindent 6 -}} + {{ end }} + diff --git a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml index e97b431f7..b722b8a6e 100644 --- a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml +++ b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml @@ -109,3 +109,11 @@ spec: metadata: annotations: my-annotation: my-service-account + projectedVolumeTemplate: + sources: + - secret: + items: + - key: ca.crt + path: crt/ca-01.pem + name: ca-secret + diff --git a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml index 67a38a698..57ab0e7ce 100644 --- a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml +++ b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml @@ -106,5 +106,12 @@ cluster: annotations: my-annotation: my-service-account + projectedVolumeTemplate: + sources: + - secret: + name: ca-secret + items: + - key: ca.crt + path: crt/ca-01.pem backups: enabled: false diff --git a/charts/cluster/values.schema.json b/charts/cluster/values.schema.json index 2caa381ed..af3e147a6 100644 --- a/charts/cluster/values.schema.json +++ b/charts/cluster/values.schema.json @@ -294,6 +294,9 @@ "priorityClassName": { "type": "string" }, + "projectedVolumeTemplate": { + "type": "object" + }, "resources": { "type": "object" }, diff --git a/charts/cluster/values.yaml b/charts/cluster/values.yaml index 9b5009acf..becb03edf 100644 --- a/charts/cluster/values.yaml +++ b/charts/cluster/values.yaml @@ -366,6 +366,17 @@ cluster: additionalLabels: {} annotations: {} + # -- mounting custom files inside the Postgres pods through .spec.projectedVolumeTemplate + # See https://cloudnative-pg.io/documentation/current/cluster_conf/#projected-volumes + projectedVolumeTemplate: {} + # sources: + # - secret: + # name: sample-secret + # items: + # - key: tls.crt + # path: certificate/tls.crt + # - key: tls.key + # path: certificate/tls.key backups: # -- You need to configure backups manually, so backups are disabled by default.