Skip to content

Commit 08665bb

Browse files
authored
import PodToleration from opConfig to internal config (zalando#1647)
* import PodToleration from opConfig to internal config * add examples to manifests and values.yaml
1 parent 2a33bf3 commit 08665bb

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

charts/postgres-operator/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ configKubernetes:
168168
spilo_allow_privilege_escalation: true
169169
# storage resize strategy, available options are: ebs, pvc, off
170170
storage_resize_mode: pvc
171+
# pod toleration assigned to instances of every Postgres cluster
172+
# toleration:
173+
# key: db-only
174+
# operator: Exists
175+
# effect: NoSchedule
176+
171177
# operator watches for postgres objects in the given namespace
172178
watched_namespace: "*" # listen to all namespaces
173179

manifests/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ data:
128128
# team_admin_role: "admin"
129129
# team_api_role_configuration: "log_statement:all"
130130
# teams_api_url: http://fake-teams-api.default.svc.cluster.local
131-
# toleration: ""
131+
# toleration: "key:db-only,operator:Exists,effect:NoSchedule"
132132
# wal_az_storage_account: ""
133133
# wal_gs_bucket: ""
134134
# wal_s3_bucket: ""

manifests/postgresql-operator-default-configuration.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ configuration:
8686
# spilo_fsgroup: 103
8787
spilo_privileged: false
8888
storage_resize_mode: pvc
89-
# toleration: {}
89+
# toleration:
90+
# key: db-only
91+
# operator: Exists
92+
# effect: NoSchedule
9093
# watched_namespace: ""
9194
postgres_pod_resources:
9295
default_cpu_limit: "1"

pkg/controller/operator_config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
113113
result.MasterPodMoveTimeout = util.CoalesceDuration(time.Duration(fromCRD.Kubernetes.MasterPodMoveTimeout), "10m")
114114
result.EnablePodAntiAffinity = fromCRD.Kubernetes.EnablePodAntiAffinity
115115
result.PodAntiAffinityTopologyKey = util.Coalesce(fromCRD.Kubernetes.PodAntiAffinityTopologyKey, "kubernetes.io/hostname")
116+
result.PodToleration = fromCRD.Kubernetes.PodToleration
116117

117118
// Postgres Pod resources
118119
result.DefaultCPURequest = util.Coalesce(fromCRD.PostgresPodResources.DefaultCPURequest, "100m")

0 commit comments

Comments
 (0)