diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index c6c79fe5d..0d67e62d2 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 + # toleration: + # 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" 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")