-
Notifications
You must be signed in to change notification settings - Fork 230
Open
Labels
chart( cluster )Related to the cluster chartRelated to the cluster chart
Description
[Cluster chart] Add support for tolerations
Summary
The cluster chart exposes affinity in values.yaml (see values.yaml around line 247) but does not expose tolerations. The CloudNative-PG Cluster CRD supports tolerations so that instance pods can be scheduled on tainted nodes (e.g. dedicated DB nodes). It would be useful to be able to set them via the Helm chart values instead of patching the Cluster resource.
Use case
- Schedule PostgreSQL instance pods on nodes with taints (e.g.
dedicated=postgres:NoSchedule) by adding the corresponding tolerations through chart values. - Align with the operator chart, which already supports
tolerationsin cloudnative-pg/values.yaml (line 173-174).
Proposed change
- In
charts/cluster/values.yaml(undercluster): add atolerationskey, e.g.:
# -- Tolerations for the instance pods. Allows scheduling on tainted nodes.
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-ClusterSpec
# Example: schedule on nodes with dedicated=postgres
# tolerations:
# - key: "dedicated"
# operator: "Equal"
# value: "postgres"
# effect: "NoSchedule"
tolerations: []- In the cluster template that renders the Cluster manifest: pass
cluster.tolerationsinto the Cluster spec (spec.tolerations), following the same pattern asaffinity.
References
- Cluster CRD scheduling: https://cloudnative-pg.io/documentation/current/scheduling/
- Operator chart tolerations:
charts/cloudnative-pg/values.yaml(tolerations: [])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
chart( cluster )Related to the cluster chartRelated to the cluster chart