From 2c9d1894c14dacc5733e557c464e709318adc53a Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Thu, 14 Oct 2021 11:50:22 +0200 Subject: [PATCH 1/3] import PodToleration from opConfig to internal config --- pkg/controller/operator_config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/controller/operator_config.go b/pkg/controller/operator_config.go index 673a59246..af4aa6c6e 100644 --- a/pkg/controller/operator_config.go +++ b/pkg/controller/operator_config.go @@ -113,6 +113,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur result.MasterPodMoveTimeout = util.CoalesceDuration(time.Duration(fromCRD.Kubernetes.MasterPodMoveTimeout), "10m") result.EnablePodAntiAffinity = fromCRD.Kubernetes.EnablePodAntiAffinity result.PodAntiAffinityTopologyKey = util.Coalesce(fromCRD.Kubernetes.PodAntiAffinityTopologyKey, "kubernetes.io/hostname") + result.PodToleration = fromCRD.Kubernetes.PodToleration // Postgres Pod resources result.DefaultCPURequest = util.Coalesce(fromCRD.PostgresPodResources.DefaultCPURequest, "100m") From 19326d8c44c272e1c89e4c2ce960fed06c84a710 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Thu, 14 Oct 2021 12:06:45 +0200 Subject: [PATCH 2/3] add examples to manifests and values.yaml --- charts/postgres-operator/values.yaml | 6 ++++++ manifests/configmap.yaml | 2 +- manifests/postgresql-operator-default-configuration.yaml | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index c6c79fe5d..f708ffe29 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -168,6 +168,12 @@ configKubernetes: spilo_allow_privilege_escalation: true # storage resize strategy, available options are: ebs, pvc, off storage_resize_mode: pvc + # pod toleration assigned to instances of every Postgres cluster + # tolaration: + # key: db-only + # operator: Exists + # effect: NoSchedule + # operator watches for postgres objects in the given namespace watched_namespace: "*" # listen to all namespaces diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index e1bee04a6..7d8a180bb 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -128,7 +128,7 @@ data: # team_admin_role: "admin" # team_api_role_configuration: "log_statement:all" # teams_api_url: http://fake-teams-api.default.svc.cluster.local - # toleration: "" + # toleration: "key:db-only,operator:Exists,effect:NoSchedule" # wal_az_storage_account: "" # wal_gs_bucket: "" # wal_s3_bucket: "" diff --git a/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgresql-operator-default-configuration.yaml index dde3c3020..6433e510a 100644 --- a/manifests/postgresql-operator-default-configuration.yaml +++ b/manifests/postgresql-operator-default-configuration.yaml @@ -86,7 +86,10 @@ configuration: # spilo_fsgroup: 103 spilo_privileged: false storage_resize_mode: pvc - # toleration: {} + # toleration: + # key: db-only + # operator: Exists + # effect: NoSchedule # watched_namespace: "" postgres_pod_resources: default_cpu_limit: "1" From 8b738a0dd73188ea7cc49839c39f1b184a9cc07f Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Thu, 14 Oct 2021 12:09:38 +0200 Subject: [PATCH 3/3] Update charts/postgres-operator/values.yaml --- charts/postgres-operator/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index f708ffe29..0d67e62d2 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -169,7 +169,7 @@ configKubernetes: # storage resize strategy, available options are: ebs, pvc, off storage_resize_mode: pvc # pod toleration assigned to instances of every Postgres cluster - # tolaration: + # toleration: # key: db-only # operator: Exists # effect: NoSchedule