From e3b39a5cbeafcadae5c9535f573a277e5ff779b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Inge=20Bols=C3=B8?= Date: Sat, 5 Oct 2019 10:10:02 +0200 Subject: [PATCH] document configmap variant of inherited_labels (#678) * document configmap varient of inherited_labels and remove application label from cluster example since we will get application:spilo by default --- charts/postgres-operator/values-crd.yaml | 2 +- charts/postgres-operator/values.yaml | 2 +- docs/administrator.md | 12 ++++++++++++ manifests/complete-postgres-manifest.yaml | 2 ++ manifests/configmap.yaml | 2 +- .../postgresql-operator-default-configuration.yaml | 2 +- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/charts/postgres-operator/values-crd.yaml b/charts/postgres-operator/values-crd.yaml index 5a8fe951a..2728b245c 100644 --- a/charts/postgres-operator/values-crd.yaml +++ b/charts/postgres-operator/values-crd.yaml @@ -66,7 +66,7 @@ configKubernetes: # list of labels that can be inherited from the cluster manifest # inherited_labels: # - application - # - app + # - environment # timeout for successful migration of master pods from unschedulable node # master_pod_move_timeout: 20m diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index a3d4edf95..a14c8ab92 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -62,7 +62,7 @@ configKubernetes: # infrastructure_roles_secret_name: postgresql-infrastructure-roles # list of labels that can be inherited from the cluster manifest - # inherited_labels: "" + # inherited_labels: application,environment # timeout for successful migration of master pods from unschedulable node # master_pod_move_timeout: 20m diff --git a/docs/administrator.md b/docs/administrator.md index 5eaf3ff71..e7ac1bd7b 100644 --- a/docs/administrator.md +++ b/docs/administrator.md @@ -200,6 +200,18 @@ Postgres cluster, in order to identify its child objects. The typical use case is to add labels that identifies the `Pods` created by the operator, in order to implement fine-controlled `NetworkPolicies`. +**postgres-operator ConfigMap** + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-operator +data: + inherited_labels: application,environment + ... +``` + **OperatorConfiguration** ```yaml diff --git a/manifests/complete-postgres-manifest.yaml b/manifests/complete-postgres-manifest.yaml index 2c600fc3e..d1bd471db 100644 --- a/manifests/complete-postgres-manifest.yaml +++ b/manifests/complete-postgres-manifest.yaml @@ -2,6 +2,8 @@ apiVersion: "acid.zalan.do/v1" kind: postgresql metadata: name: acid-test-cluster +# labels: +# environment: demo spec: dockerImage: registry.opensource.zalan.do/acid/spilo-11:1.6-p1 initContainers: diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index 9ee80016c..f9223f3fe 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -31,7 +31,7 @@ data: enable_teams_api: "false" # etcd_host: "" # infrastructure_roles_secret_name: postgresql-infrastructure-roles - # inherited_labels: "" + # inherited_labels: application,environment # kube_iam_role: "" # log_s3_bucket: "" # logical_backup_docker_image: "registry.opensource.zalan.do/acid/logical-backup" diff --git a/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgresql-operator-default-configuration.yaml index 5ad156e3c..ad4d028c3 100644 --- a/manifests/postgresql-operator-default-configuration.yaml +++ b/manifests/postgresql-operator-default-configuration.yaml @@ -27,7 +27,7 @@ configuration: # infrastructure_roles_secret_name: "" # inherited_labels: # - application - # - app + # - environment # node_readiness_label: "" oauth_token_secret_name: postgresql-operator pdb_name_format: "postgres-{cluster}-pdb"