Skip to content

Commit

Permalink
Merge pull request #2165 from AndrewSirenko/tolerate-taints
Browse files Browse the repository at this point in the history
helm: add recommended autoscalar Tolerations to driver DaemonSet
  • Loading branch information
k8s-ci-robot authored Oct 9, 2024
2 parents 7a0a8b5 + 72249ed commit 1dbfba8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions charts/aws-ebs-csi-driver/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,21 @@ Handle http proxy env vars
- name: NO_PROXY
value: {{ .Values.proxy.no_proxy | quote }}
{{- end -}}

{{/*
Recommended daemonset tolerations
*/}}
{{- define "aws-ebs-csi-driver.daemonset-tolerations" -}}
# Prevents stateful workloads from being scheduled to node before CSI Driver reports volume attachment limit
- key: "ebs.csi.aws.com/agent-not-ready"
operator: "Exists"
# Prevents undesired eviction by Cluster Autoscalar
- key: "ToBeDeletedByClusterAutoscaler"
operator: Exists
# Prevents undesired eviction by v1 Karpenter
- key: "karpenter.sh/disrupted"
operator: Exists
# Prevents undesired eviction by v1beta1 Karpenter
- key: "karpenter.sh/disruption"
operator: Exists
{{- end -}}
1 change: 1 addition & 0 deletions charts/aws-ebs-csi-driver/templates/_node-windows.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:
{{- with .Values.node.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "aws-ebs-csi-driver.daemonset-tolerations" . | nindent 8 }}
{{- end }}
{{- if .Values.node.windowsHostProcess }}
securityContext:
Expand Down
3 changes: 1 addition & 2 deletions charts/aws-ebs-csi-driver/templates/_node.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ spec:
{{- with .Values.node.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
- key: "ebs.csi.aws.com/agent-not-ready"
operator: "Exists"
{{- include "aws-ebs-csi-driver.daemonset-tolerations" . | nindent 8 }}
{{- end }}
hostNetwork: {{ .Values.node.hostNetwork }}
{{- with .Values.node.securityContext }}
Expand Down

0 comments on commit 1dbfba8

Please sign in to comment.