Skip to content

Commit

Permalink
Merge pull request #770 from arcivanov/chart_tscs
Browse files Browse the repository at this point in the history
Add ability to specify topologySpreadConstraints
  • Loading branch information
k8s-ci-robot authored Feb 26, 2021
2 parents c159142 + 25193d7 commit ca5d05e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/aws-ebs-csi-driver/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ spec:
{{- with .Values.tolerations }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.topologySpreadConstraints }}
{{- $tscLabelSelector := dict "labelSelector" ( dict "matchLabels" ( dict "app" "ebs-csi-controller" ) ) }}
topologySpreadConstraints:
{{- range .Values.topologySpreadConstraints }}
- {{ mergeOverwrite . $tscLabelSelector | toJson }}
{{- end }}
{{- end }}
containers:
- name: ebs-plugin
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
Expand Down
14 changes: 14 additions & 0 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ tolerateAllTaints: true
tolerations: []
affinity: {}

# TSCs without the label selector stanza
#
# Example:
#
# topologySpreadConstraints:
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: ScheduleAnyway
# - maxSkew: 1
# topologyKey: kubernetes.io/hostname
# whenUnsatisfiable: ScheduleAnyway

topologySpreadConstraints: []

# Extra volume tags to attach to each dynamically provisioned volume.
# ---
# extraVolumeTags:
Expand Down

0 comments on commit ca5d05e

Please sign in to comment.