File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -706,6 +706,35 @@ data:
706706The key-value pairs of the Secret are all accessible as environment variables
707707to the Postgres StatefulSet/pods.
708708
709+ # ## For individual cluster
710+
711+ It is possible to set environment variables in the Spilo pods directly as parameters or
712+ as a link to secrets for each individual cluster, in addition to or instead of the
713+ global parameters given in the examples above.
714+
715+ In order to do this, you need to configure the cluster parameters, as in the example below
716+
717+ ` ` ` yaml
718+ apiVersion: "acid.zalan.do/v1"
719+ kind: postgresql
720+ metadata:
721+ name: acid-test-cluster
722+ spec:
723+ env:
724+ - name: wal_s3_bucket
725+ value: my-custom-bucket
726+ - name: minio_secret_key
727+ valueFrom:
728+ secretKeyRef:
729+ name: my-custom-secret
730+ key: minio_secret_key
731+ ` ` `
732+
733+ If global parameters are set at the level of the entire controller in the form of
734+ a ConfigMap or a Secret, then the individual cluster parameters will have a higher
735+ priority and the same keys will be overridden, and different ones will be merged into
736+ a single array of environment variable parameter values.
737+
709738# # Limiting the number of min and max instances in clusters
710739
711740As a preventive measure, one can restrict the minimum and the maximum number of
Original file line number Diff line number Diff line change 4949 shared_buffers : " 32MB"
5050 max_connections : " 10"
5151 log_statement : " all"
52+ # env:
53+ # - name: wal_s3_bucket
54+ # value: my-custom-bucket
55+
5256 volume :
5357 size : 1Gi
5458# storageClass: my-sc
@@ -120,7 +124,7 @@ spec:
120124# database: foo
121125# plugin: pgoutput
122126 ttl : 30
123- loop_wait : &loop_wait 10
127+ loop_wait : 10
124128 retry_timeout : 10
125129 synchronous_mode : false
126130 synchronous_mode_strict : false
You can’t perform that action at this time.
0 commit comments