Skip to content

Commit e3b39a5

Browse files
knan-nrkFxKu
authored andcommitted
document configmap variant of inherited_labels (zalando#678)
* document configmap varient of inherited_labels and remove application label from cluster example since we will get application:spilo by default
1 parent baae188 commit e3b39a5

File tree

6 files changed

+18
-4
lines changed

6 files changed

+18
-4
lines changed

charts/postgres-operator/values-crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ configKubernetes:
6666
# list of labels that can be inherited from the cluster manifest
6767
# inherited_labels:
6868
# - application
69-
# - app
69+
# - environment
7070

7171
# timeout for successful migration of master pods from unschedulable node
7272
# master_pod_move_timeout: 20m

charts/postgres-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ configKubernetes:
6262
# infrastructure_roles_secret_name: postgresql-infrastructure-roles
6363

6464
# list of labels that can be inherited from the cluster manifest
65-
# inherited_labels: ""
65+
# inherited_labels: application,environment
6666

6767
# timeout for successful migration of master pods from unschedulable node
6868
# master_pod_move_timeout: 20m

docs/administrator.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,18 @@ Postgres cluster, in order to identify its child objects. The typical use case
200200
is to add labels that identifies the `Pods` created by the operator, in order
201201
to implement fine-controlled `NetworkPolicies`.
202202

203+
**postgres-operator ConfigMap**
204+
205+
```yaml
206+
apiVersion: v1
207+
kind: ConfigMap
208+
metadata:
209+
name: postgres-operator
210+
data:
211+
inherited_labels: application,environment
212+
...
213+
```
214+
203215
**OperatorConfiguration**
204216

205217
```yaml

manifests/complete-postgres-manifest.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: "acid.zalan.do/v1"
22
kind: postgresql
33
metadata:
44
name: acid-test-cluster
5+
# labels:
6+
# environment: demo
57
spec:
68
dockerImage: registry.opensource.zalan.do/acid/spilo-11:1.6-p1
79
initContainers:

manifests/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ data:
3131
enable_teams_api: "false"
3232
# etcd_host: ""
3333
# infrastructure_roles_secret_name: postgresql-infrastructure-roles
34-
# inherited_labels: ""
34+
# inherited_labels: application,environment
3535
# kube_iam_role: ""
3636
# log_s3_bucket: ""
3737
# logical_backup_docker_image: "registry.opensource.zalan.do/acid/logical-backup"

manifests/postgresql-operator-default-configuration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ configuration:
2727
# infrastructure_roles_secret_name: ""
2828
# inherited_labels:
2929
# - application
30-
# - app
30+
# - environment
3131
# node_readiness_label: ""
3232
oauth_token_secret_name: postgresql-operator
3333
pdb_name_format: "postgres-{cluster}-pdb"

0 commit comments

Comments
 (0)