Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manually cherry picked affinity for tidb and pump #1278

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,29 @@ tidb:
## please read the affinity document before set your scheduling rule:
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
## If binlog.pump is enabled, the following affinity is recommended to make tidb and pump deploy at the same node in production
## to avoid losing binlog in tidb if there was network partition error.
# podAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: "app.kubernetes.io/component"
# operator: In
# values:
# - "pump"
# - key: "app.kubernetes.io/managed-by"
# operator: In
# values:
# - "tidb-operator"
# - key: "app.kubernetes.io/name"
# operator: In
# values:
# - "tidb-cluster"
# - key: "app.kubernetes.io/instance"
# operator: In
# values:
# - <release-name>
# topologyKey: kubernetes.io/hostname

## nodeSelector ensure pods only assigning to nodes which have each of the indicated key-value pairs as labels
## ref:https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
Expand Down Expand Up @@ -454,6 +477,32 @@ binlog:
# affinity for pump pod assignment, default: empty
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
## The following setting is recommended to make each pump instance be distributed deployed in each node
## Each node is recommended at most have one pump instance deployed.
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: "app.kubernetes.io/component"
# operator: In
# values:
# - "pump"
# - key: "app.kubernetes.io/managed-by"
# operator: In
# values:
# - "tidb-operator"
# - key: "app.kubernetes.io/name"
# operator: In
# values:
# - "tidb-cluster"
# - key: "app.kubernetes.io/instance"
# operator: In
# values:
# - <release-name>
# topologyKey: kubernetes.io/hostname

# tolerations are applied to pods, and allow pods to schedule onto nodes with matching taints.
# refer to https://kubernetes.io/docs/concepts/configuration/taint-and-toleration
tolerations: []
Expand Down