Define environment variables¶
You can configure environment variables in Percona Operator for PostgreSQL for the following purposes:
- Operator environment variables – To control the Operator’s behavior, such as logging, telemetry, and which namespaces it watches. You set these in the Operator Deployment (for example in
deploy/bundle.yamlor via the Helm chart values). - Cluster component environment variables – To customize the behavior of cluster components (PostgreSQL, pgBackRest, pgBouncer). You define these in your cluster Custom Resource and, when needed, store sensitive values in Kubernetes Secrets.
- Backup and restore environment variables – To customize backup and restore flows. You can specify the environment variables either directly in the backup / restore manifest, or reference a Kubernetes Secret that stores sensitive values.
When to use environment variables¶
| Type | Use cases |
|---|---|
| Operator environment variables | - Control logging for debugging and log aggregation - Manage telemetry - Configure which namespaces the Operator watches (single-namespace vs cluster-wide) - Set the number of concurrent reconciliation workers for multi-cluster environments - Enable feature gates such as auto-growable volumes - Set the cert-manager namespace used for Operator-managed ClusterIssuer CA resources |
| Cluster component environment variables | - Customize PostgreSQL, pgBackRest, or pgBouncer behavior - Pass configuration or secrets into Pods - Integrate with external systems or monitoring. |
| Backup and restore environment variables | - Customize backup and restore operations - Pass configuration or secrets into backup / restore Jobs |
Next steps¶
Configure Operator environment variables Environment variables for cluster components
Last update:
September 9, 2026
Created: February 19, 2026
Created: February 19, 2026