Skip to main content
CYBERTEC-PG-Operator
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Support
latest Latest stable release View changelog ->

Custom Labels

Updated Dec 2023 1 min read

To manage and organise pods flexibly within a cluster, the operator allows labels to be defined at various levels. This enables both global labelling and specific metadata for individual components. Unlike environment variables, labels always refer to the pod as a whole, not to individual containers.

objectScopeDescription
spec.labelsGlobalThese labels are adopted by all pods within the cluster (PostgreSQL, Backup, Pooler, etc.).
spec.postgresql.labelsPostgreSQLThese labels apply exclusively to the PostgreSQL pods. PostgreSQL pods.
spec.backup.pgbackrest.labelspgBackRestThese labels apply exclusively to the backup pods pgBackRest pods.
spec.connectionPooler.labelsConnectionPoolerThese labels apply exclusively to the ConnectionPooler pods.
Warning
Updating the labels triggers a rolling update to the respective pods.

Configuration Logic

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

labels: 
  custom_label: ‘value’