From 36fe5d9992c6e1489f9280a29961c434abbd9324 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Wed, 15 Sep 2021 12:39:00 -0700 Subject: [PATCH] (dev-v2.6-archive) Change tolerations to match upstream and allow override (partially cherry picked from commit 2b4eccc46acc76703059478fc97f5e63528cfb6f) --- .../vsphere-csi-controller-deployment.yaml | 26 +++++++------------ .../rancher-vsphere-csi/charts/values.yaml | 11 ++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/packages/rancher-vsphere-csi/charts/templates/vsphere-csi-controller-deployment.yaml b/packages/rancher-vsphere-csi/charts/templates/vsphere-csi-controller-deployment.yaml index 7cc78cd8a..da017cbbc 100644 --- a/packages/rancher-vsphere-csi/charts/templates/vsphere-csi-controller-deployment.yaml +++ b/packages/rancher-vsphere-csi/charts/templates/vsphere-csi-controller-deployment.yaml @@ -39,25 +39,17 @@ spec: - "true" {{- end }} serviceAccountName: vsphere-csi-controller + {{- if .Values.csiController.tolerations }} tolerations: - # Rancher specific change: These tolerations are intentionally different from upstream to avoid lessening the scope to only NoSchedule with a specific key - # - key: node-role.kubernetes.io/master - # operator: Exists - # effect: NoSchedule - - operator: "Exists" + {{- with .Values.csiController.tolerations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- else }} + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists effect: NoSchedule - - operator: "Exists" - effect: NoExecute - # uncomment below toleration if you need an aggressive pod eviction in case when - # node becomes not-ready or unreachable. Default is 300 seconds if not specified. - #- key: node.kubernetes.io/not-ready - # operator: Exists - # effect: NoExecute - # tolerationSeconds: 30 - #- key: node.kubernetes.io/unreachable - # operator: Exists - # effect: NoExecute - # tolerationSeconds: 30 + {{- end }} dnsPolicy: "Default" containers: - name: csi-attacher diff --git a/packages/rancher-vsphere-csi/charts/values.yaml b/packages/rancher-vsphere-csi/charts/values.yaml index 77947dfa9..a1c865b0c 100644 --- a/packages/rancher-vsphere-csi/charts/values.yaml +++ b/packages/rancher-vsphere-csi/charts/values.yaml @@ -42,6 +42,17 @@ csiController: repository: rancher/mirrored-k8scsi-csi-provisioner tag: v2.1.0 nodeSelector: {} + # Uncomment below toleration if you need an aggressive pod eviction in case when + # node becomes not-ready or unreachable. Default is 300 seconds if not specified. + # tolerations: + # - key: node.kubernetes.io/not-ready + # operator: Exists + # effect: NoExecute + # tolerationSeconds: 30 + # - key: node.kubernetes.io/unreachable + # operator: Exists + # effect: NoExecute + # tolerationSeconds: 30 # Internal features csiMigration: