3 repository: chainguard-private/postgres-operator
4 tag: 2.0.3-r5@sha256:7372760bde14699b97b26498d9c93641abbca5b3413c8a6bdcfb450a63b7e6e7
5 pullPolicy: "IfNotPresent"
6# Optionally specify an array of imagePullSecrets.
7# Secrets must be manually created in the namespace.
8# ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
10# - name: myRegistryKeySecretName
13configTarget: "OperatorConfigurationCRD"
15enableJsonLogging: false
16# Command-line options for the operator
18# general configuration parameters
20 # the deployment should create/update the CRDs
21 enable_crd_registration: true
22 # specify categories under which crds should be listed
25 # update only the statefulsets without immediately doing the rolling update
26 enable_lazy_spilo_upgrade: false
27 # toogle to use maintenance windows feature
28 enable_maintenance_windows: true
29 # set the PGVERSION env var instead of providing the version via postgresql.bin_dir in SPILO_CONFIGURATION
30 enable_pgversion_env_var: true
31 # start any new database pod without limitations on shm memory
32 enable_shm_volume: true
33 # operator will sync only clusters where name starts with teamId prefix
34 enable_team_id_clustername_prefix: false
35 # etcd connection string for Patroni. Empty uses K8s-native DCS.
38 docker_image: cgr.dev/chainguard-private/spilo:18-4.1.2-r29@sha256:d7c1fb6e186f4c077b87a5ccc17b18b79529f04ecc389abfef20031c641187df
39 # key name for annotation to ignore globally configured instance limits
40 # ignore_instance_limits_annotation_key: ""
42 # key name for annotation to ignore globally configured resources thresholds
43 # ignore_resources_limits_annotation_key: ""
45 # Select if setup uses endpoints (default), or configmaps to manage leader (DCS=k8s)
46 kubernetes_use_configmaps: true
47 # maintenance windows applied to all Postgres clusters unless overridden in the manifest
48 # maintenance_windows:
51 # min number of instances in Postgres cluster. -1 = no limit
53 # max number of instances in Postgres cluster. -1 = no limit
55 # period between consecutive repair requests
57 # period between consecutive sync requests
59 # can prevent certain cases of memory overcommitment
60 # set_memory_request_to_limit: false
62 # map of sidecar names to docker images
63 # sidecar_docker_images:
64 # example: "exampleimage:exampletag"
66 # number of routines the operator spawns to process requests concurrently
68# parameters describing Postgres users
70 # roles to be granted to database owners
71 # additional_owner_roles:
74 # enable password rotation for app users that are not database owners
75 enable_password_rotation: false
76 # rotation interval for updating credentials in K8s secrets of app users
77 password_rotation_interval: 90
78 # retention interval to keep rotation users
79 password_rotation_user_retention: 180
80 # postgres username used for replication between instances
81 replication_username: standby
82 # postgres superuser name to be created by initdb
83 super_username: postgres
84configMajorVersionUpgrade:
85 # "off": no upgrade, "manual": manifest triggers action, "full": minimal version violation triggers too
86 major_version_upgrade_mode: "manual"
87 # upgrades will only be carried out for clusters of listed teams when mode is "off"
88 # major_version_upgrade_team_allow_list:
91 # minimal Postgres major version that will not automatically be upgraded
92 minimal_major_version: "14"
93 # target Postgres major version when upgrading clusters automatically
94 target_major_version: "18"
96 # list of additional capabilities for postgres container
97 # additional_pod_capabilities:
100 # default DNS domain of K8s cluster where operator is running
101 cluster_domain: cluster.local
102 # additional labels assigned to the cluster objects
105 # label assigned to Kubernetes objects created by the operator
106 cluster_name_label: cluster-name
107 # additional annotations to add to every database pod
108 # custom_pod_annotations:
112 # key name for annotation that compares manifest value with current date
113 # delete_annotation_date_key: "delete-date"
115 # key name for annotation that compares manifest value with cluster name
116 # delete_annotation_name_key: "delete-clustername"
118 # list of annotations propagated from cluster manifest to statefulset and deployment
119 # downscaler_annotations:
123 # allow user secrets in other namespaces than the Postgres cluster
124 enable_cross_namespace_secret: false
125 # use finalizers to ensure all managed resources are deleted prior to the postgresql CR
126 # this avoids stale resources in case the operator misses a delete event or is not running
128 enable_finalizers: false
129 # enables initContainers to run actions before Spilo is started
130 enable_init_containers: true
131 # toggles if child resources should have an owner reference to the postgresql CR
132 enable_owner_references: false
133 # toggles if operator should delete PVCs on cluster deletion
134 enable_persistent_volume_claim_deletion: true
135 # toggles pod anti affinity on the Postgres pods
136 enable_pod_antiaffinity: false
137 # toggles PDB to set to MinAvailabe 0 or 1
138 enable_pod_disruption_budget: true
139 # toogles readiness probe for database pods
140 enable_readiness_probe: false
141 # toggles if operator should delete secrets on cluster deletion
142 enable_secrets_deletion: true
143 # enables sidecar containers to run alongside Spilo in the same pod
144 enable_sidecars: true
145 # annotations to be ignored when comparing statefulsets, services etc.
146 # ignored_annotations:
147 # - k8s.v1.cni.cncf.io/network-status
149 # namespaced name of the secret containing infrastructure roles names and passwords
150 # infrastructure_roles_secret_name: postgresql-infrastructure-roles
152 # list of annotation keys that can be inherited from the cluster manifest
153 # inherited_annotations:
156 # list of label keys that can be inherited from the cluster manifest
161 # timeout for successful migration of master pods from unschedulable node
162 # master_pod_move_timeout: 20m
164 # set of labels that a running and active node should possess to be considered ready
165 # node_readiness_label:
168 # defines how nodeAffinity from manifest should be merged with node_readiness_label
169 # node_readiness_label_merge: "OR"
171 # namespaced name of the secret containing the OAuth2 token to pass to the teams API
172 # oauth_token_secret_name: postgresql-operator
174 # toggle if `spilo-role=master` selector should be added to the PDB (Pod Disruption Budget)
175 pdb_master_label_selector: true
176 # defines the template for PDB names
177 pdb_name_format: "postgres-{cluster}-pdb"
178 # specify the PVC retention policy when scaling down and/or deleting
179 persistent_volume_claim_retention_policy:
180 when_deleted: "retain"
181 when_scaled: "retain"
182 # switches pod anti affinity type to `preferredDuringSchedulingIgnoredDuringExecution`
183 pod_antiaffinity_preferred_during_scheduling: false
184 # override topology key for pod anti affinity
185 pod_antiaffinity_topology_key: "kubernetes.io/hostname"
186 # namespaced name of the ConfigMap with environment variables to populate on every pod
187 # pod_environment_configmap: "default/my-custom-config"
188 # name of the Secret (in cluster namespace) with environment variables to populate on every pod
189 # pod_environment_secret: "my-custom-secret"
191 # specify the pod management policy of stateful sets of Postgres clusters
192 pod_management_policy: "ordered_ready"
193 # label assigned to the Postgres pods (and services/endpoints)
194 pod_role_label: spilo-role
195 # service account definition as JSON/YAML string to be used by postgres cluster pods
196 # pod_service_account_definition: ""
198 # role binding definition as JSON/YAML string to be used by pod service account
199 # pod_service_account_role_binding_definition: ""
201 # Postgres pods are terminated forcefully after this timeout
202 pod_terminate_grace_period: 5m
203 # template for database user secrets generated by the operator,
204 # here username contains the namespace in the format namespace.username
205 # if the user is in different namespace than cluster and cross namespace secrets
206 # are enabled via `enable_cross_namespace_secret` flag in the configuration.
207 secret_name_template: "{username}.{cluster}.credentials.{tprkind}.{tprgroup}"
208 # sharing unix socket of PostgreSQL (`pg_socket`) with the sidecars
209 share_pgsocket_with_sidecars: false
210 # set user and group for the spilo container (required to run Spilo as non-root process)
211 # spilo_runasuser: 101
212 # spilo_runasgroup: 103
214 # group ID with write-access to volumes (required to run Spilo as non-root process)
217 # whether the Spilo container should run in privileged mode
218 spilo_privileged: false
219 # whether the Spilo container should run with additional permissions other than parent.
220 # required by cron which needs setuid
221 spilo_allow_privilege_escalation: true
222 # liveness probe for the spilo pod
228 # initialDelaySeconds: 10
231 # successThreshold: 1
232 # failureThreshold: 3
234 # storage resize strategy, available options are: ebs, pvc, off or mixed
235 storage_resize_mode: pvc
236 # pod toleration assigned to instances of every Postgres cluster
242 # operator watches for postgres objects in the given namespace
243 watched_namespace: "*" # listen to all namespaces
244# configure resource requests for the Postgres pods
245configPostgresPodResources:
246 # CPU limits for the postgres containers
247 default_cpu_limit: "1"
248 # CPU request value for the postgres containers
249 default_cpu_request: 100m
250 # memory limits for the postgres containers
251 default_memory_limit: 500Mi
252 # memory request value for the postgres containers
253 default_memory_request: 100Mi
254 # optional upper boundary for CPU request
255 # max_cpu_request: "1"
257 # optional upper boundary for memory request
258 # max_memory_request: 4Gi
260 # hard CPU minimum required to properly run a Postgres cluster
262 # hard memory minimum required to properly run a Postgres cluster
263 min_memory_limit: 250Mi
264# timeouts related to some operator actions
266 # interval between consecutive attempts of operator calling the Patroni API
267 patroni_api_check_interval: 1s
268 # timeout when waiting for successful response from Patroni API
269 patroni_api_check_timeout: 5s
270 # timeout when waiting for the Postgres pods to be deleted
271 pod_deletion_wait_timeout: 10m
272 # timeout when waiting for pod role and cluster labels
273 pod_label_wait_timeout: 10m
274 # interval between consecutive attempts waiting for postgresql CRD to be created
275 ready_wait_interval: 3s
276 # timeout for the complete postgres CRD creation
277 ready_wait_timeout: 30s
278 # interval to wait between consecutive attempts to check for some K8s resources
279 resource_check_interval: 3s
280 # timeout when waiting for the presence of a certain K8s resource (e.g. Sts, PDB)
281 resource_check_timeout: 10m
282# configure behavior of load balancers
284 # DNS zone for cluster DNS name when load balancer is configured for cluster
285 db_hosted_zone: db.example.com
286 # annotations to apply to service when load balancing is enabled
287 # custom_service_annotations:
291 # toggles service type load balancer pointing to the master pod of the cluster
292 enable_master_load_balancer: false
293 # toggles service type load balancer pointing to the master pooler pod of the cluster
294 enable_master_pooler_load_balancer: false
295 # toggles service type load balancer pointing to the replica pod of the cluster
296 enable_replica_load_balancer: false
297 # toggles service type load balancer pointing to the replica pooler pod of the cluster
298 enable_replica_pooler_load_balancer: false
299 # define external traffic policy for the load balancer
300 external_traffic_policy: "Cluster"
301 # defines the DNS name string template for the master load balancer cluster
302 master_dns_name_format: "{cluster}.{namespace}.{hostedzone}"
303 # deprecated DNS template for master load balancer using team name
304 master_legacy_dns_name_format: "{cluster}.{team}.{hostedzone}"
305 # defines the DNS name string template for the replica load balancer cluster
306 replica_dns_name_format: "{cluster}-repl.{namespace}.{hostedzone}"
307 # deprecated DNS template for replica load balancer using team name
308 replica_legacy_dns_name_format: "{cluster}-repl.{team}.{hostedzone}"
309# options to aid debugging of the operator itself
311 # toggles verbose debug logs from the operator
313 # toggles operator functionality that require access to the postgres database
314 enable_database_access: true
315# parameters affecting logging and REST API listener
317 # REST API listener listens to this port
319 # number of entries in the cluster history ring buffer
320 cluster_history_entries: 1000
321 # number of lines in the ring buffer used to store cluster logs
323# configure interaction with non-Kubernetes objects from AWS or GCP
325 # Additional Secret (aws or gcp credentials) to mount in the pod
326 # additional_secret_mount: "some-secret-name"
328 # Path to mount the above Secret in the filesystem of the container(s)
329 # additional_secret_mount_path: "/some/dir"
331 # AWS region used to store EBS volumes
332 aws_region: eu-central-1
333 # GCP credentials that will be used by the operator / pods
334 # gcp_credentials: ""
336 # AWS IAM role to supply in the iam.amazonaws.com/role annotation of Postgres pods
339 # Full ARN for IRSA (IAM Roles for Service Accounts) on EKS
342 # S3 bucket to use for shipping postgres daily logs
345 # S3 bucket to use for shipping WAL segments with WAL-E
348 # GCS bucket to use for shipping WAL segments with WAL-E
351 # Azure Storage Account to use for shipping WAL segments with WAL-G
352 # wal_az_storage_account: ""
353# configure K8s cron job managed by the operator
355 # Azure Storage Account specs to store backup results
356 # logical_backup_azure_storage_account_name: ""
357 # logical_backup_azure_storage_container: ""
358 # logical_backup_azure_storage_account_key: ""
360 # resources for logical backup pod, if empty configPostgresPodResources will be used
361 # logical_backup_cpu_limit: ""
362 # logical_backup_cpu_request: ""
363 # logical_backup_memory_limit: ""
364 # logical_backup_memory_request: ""
366 # image for pods of the logical backup job (example runs pg_dumpall)
367 logical_backup_docker_image: cgr.dev/chainguard-private/postgres-operator-logical-backup:2.0.3-r5@sha256:e8195dc29c4c118acbff8ff8dcb0dee1d013493ed464038c5a8137c807f72e94
368 # path of google cloud service account json file
369 # logical_backup_google_application_credentials: ""
371 # prefix for the backup job name
372 logical_backup_job_prefix: "logical-backup-"
373 # storage provider - either "s3", "gcs" or "az"
374 logical_backup_provider: "s3"
376 logical_backup_s3_access_key_id: ""
377 # S3 bucket to store backup results
378 logical_backup_s3_bucket: "my-bucket-url"
379 # S3 bucket prefix to use
380 logical_backup_s3_bucket_prefix: "spilo"
381 # S3 region of bucket
382 logical_backup_s3_region: ""
383 # S3 endpoint url when not using AWS
384 logical_backup_s3_endpoint: ""
385 # S3 Secret Access Key
386 logical_backup_s3_secret_access_key: ""
387 # S3 server side encryption
388 logical_backup_s3_sse: "AES256"
389 # S3 retention time for stored backups for example "2 week" or "7 days"
390 logical_backup_s3_retention_time: ""
391 # backup schedule in the cron format
392 logical_backup_schedule: "30 00 * * *"
393 # secret to be used as reference for env variables in cronjob
394 logical_backup_cronjob_environment_secret: ""
395 # number of successful backup jobs to keep in cronjob history
396 logical_backup_successful_jobs_history_limit: 3
397 # number of failed backup jobs to keep in cronjob history
398 logical_backup_failed_jobs_history_limit: 3
399 # TTL in seconds after which finished backup jobs are automatically deleted
400 logical_backup_ttl_seconds_after_finished: 86400
401# automate creation of human users with teams API service
403 # team_admin_role will have the rights to grant roles coming from PG manifests
404 enable_admin_role_for_users: true
405 # operator watches for PostgresTeam CRs to assign additional teams and members to clusters
406 enable_postgres_team_crd: false
407 # toogle to create additional superuser teams from PostgresTeam CRs
408 enable_postgres_team_crd_superusers: false
409 # toggle to automatically rename roles of former team members and deny LOGIN
410 enable_team_member_deprecation: false
411 # toggle to grant superuser to team members created from the Teams API
412 enable_team_superuser: false
413 # toggles usage of the Teams API by the operator
414 enable_teams_api: false
415 # should contain a URL to use for authentication (username and token)
416 # pam_configuration: https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees
418 # operator will add all team member roles to this group and add a pg_hba line
419 pam_role_name: zalandos
420 # List of teams which members need the superuser role in each Postgres cluster
421 postgres_superuser_teams:
422 - postgres_superusers
423 # List of roles that cannot be overwritten by an application, team or infrastructure role
424 protected_role_names:
427 # Suffix to add if members are removed from TeamsAPI or PostgresTeam CRD
428 role_deletion_suffix: "_deleted"
429 # role name to grant to team members created from the Teams API
430 team_admin_role: admin
431 # postgres config parameters to apply to each team member role
432 team_api_role_configuration:
434 # URL of the Teams API service
435 # teams_api_url: http://fake-teams-api.default.svc.cluster.local
436# configure connection pooler deployment created by the operator
437configConnectionPooler:
438 # db schema to install lookup function into
439 connection_pooler_schema: "pooler"
440 # db user for pooler to use
441 connection_pooler_user: "pooler"
443 connection_pooler_image: cgr.dev/chainguard-private/zalando-pgbouncer:2.0.3-r5@sha256:03da484177a76ef3719f63c6ccd7e99420843c5abb448c7f48de3d730177902b
444 # max db connections the pooler should hold
445 connection_pooler_max_db_connections: 60
446 # default pooling mode
447 connection_pooler_mode: "transaction"
448 # number of pooler instances
449 connection_pooler_number_of_instances: 2
451 connection_pooler_default_cpu_request: 500m
452 connection_pooler_default_memory_request: 100Mi
453 connection_pooler_default_cpu_limit: "1"
454 connection_pooler_default_memory_limit: 100Mi
456 # enable Patroni DCS failsafe_mode feature
457 enable_patroni_failsafe_mode: false
458# Zalando's internal CDC stream feature
461 # Specifies whether RBAC resources should be created
463 # Specifies whether ClusterRoles that are aggregated into the K8s default roles should be created. (https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings)
464 createAggregateClusterRoles: false
466 # Specifies whether a ServiceAccount should be created
468 # The name of the ServiceAccount to use.
469 # If not set and create is true, a name is generated using the fullname template
472 # The name of the ServiceAccount to be used by postgres cluster pods
473 # If not set a name is generated using the fullname template and "-pod" suffix
475# priority class for operator pod
477# priority class for database pods
479 # If create is false with no name set, no podPriorityClassName is specified.
480 # Hence, the pod priorityClass is the one with globalDefault set.
481 # If there is no PriorityClass with globalDefault set, the priority of Pods with no priorityClassName is zero.
483 # If not set a name is generated using the fullname template and "-pod" suffix
495 readOnlyRootFilesystem: true
496 allowPrivilegeEscalation: false
497# Allow to setup operator Deployment readiness probe
499 initialDelaySeconds: 5
501# configure extra environment variables
502# Extra environment variables are writen in kubernetes format and added "as is" to the pod's env variables
503# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
504# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables
506# Exemple of settings maximum amount of memory / cpu that can be used by go process (to match resources.limits)
512# resource: limits.cpu
516# resource: limits.memory
518# Affinity for pod assignment
519# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
521# Node labels for pod assignment
522# Ref: https://kubernetes.io/docs/user-guide/node-selection/
524# Tolerations for pod assignment
525# Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
528 # Specifies whether a controller ID should be defined for the operator
529 # Note, all postgres manifest must then contain the following annotation to be found by this operator
530 # "acid.zalan.do/controller": <controller-ID-of-the-operator>
532 # The name of the controller ID to use.
533 # If not set and create is true, a name is generated using the fullname template