Skip to content

Commit

Permalink
Adding tolerations and affinity to the discovery chart template (#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaine Kahlouch authored Mar 17, 2020
1 parent 9dfcce5 commit 4b82827
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/tidb-cluster/templates/discovery-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ spec:
{{- if .Values.rbac.create }}
serviceAccount: {{ template "cluster.name" . }}-discovery
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- end }}
containers:
- name: discovery
Expand Down
9 changes: 9 additions & 0 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ discovery:
cpu: 80m
memory: 50Mi

## affinity defines discovery scheduling rules,it's default settings is empty.
## 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: {}

## 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: []

# Whether enable ConfigMap Rollout management.
# When enabling, change of ConfigMap will trigger a graceful rolling-update of the component.
# This feature is only available in tidb-operator v1.0 or higher.
Expand Down

0 comments on commit 4b82827

Please sign in to comment.