Skip to main content
CYBERTEC-PG-Operator
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Support
latest Latest stable release View changelog ->
CPO (CYBERTEC-PG-Operator) Customize Cluster Environment variables

Environment variables

Updated Dec 2023 1 min read

To flexibly manage containers within a cluster, the operator allows environment variables to be defined at various levels. This enables both global settings and specific configurations for individual components. Hierarchy and Scope The variables are defined within the Custom Resource (CR). The following logic applies for inheritance and assignment:

objectScopeDescription
spec.envGlobalThese ENVs are inherited by all containers within the cluster (PostgreSQL, Backup, Monitoring, etc.).
spec.postgresql.envPostgreSQLThese ENVs apply exclusively to the PostgreSQL containers.
spec.backup.pgbackrest.envpgBackRestThese ENVs apply exclusively to the Backup containers.
spec.monitor.envExporter-SidecarThese ENVs apply exclusively to the ConnectionPooler containers.
spec.connectionPooler.envConnectionPoolerThese ENVs apply exclusively to the Monitoring sidecars.
Warning
Updating the ENVs triggers a rolling update to the respective containers.

Configuration Logic

The definition of variables follows the standard Kubernetes schema for key-value pairs.

env: 
  - name: ENV_NAME 
    value: ‘value’