From b369994339f9f2ba625b8ef96a14c055aecabe55 Mon Sep 17 00:00:00 2001 From: Leela Venkaiah G Date: Fri, 4 Oct 2024 03:02:36 +0000 Subject: [PATCH] controllers: add ocs default toleration to csi driver spec all components deployed as part of odf should tolerate this taint by default "node.ocs.openshift.io/storage=true:NoSchedule" Signed-off-by: Leela Venkaiah G --- pkg/templates/csi.go | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkg/templates/csi.go b/pkg/templates/csi.go index 74a0c022..617c91c6 100644 --- a/pkg/templates/csi.go +++ b/pkg/templates/csi.go @@ -99,6 +99,14 @@ var CSIOperatorConfigSpec = csiopv1a1.OperatorConfigSpec{ PodCommonSpec: csiopv1a1.PodCommonSpec{ PrioritylClassName: ptr.To("system-cluster-critical"), ImagePullPolicy: corev1.PullIfNotPresent, + Tolerations: []corev1.Toleration{ + { + Effect: corev1.TaintEffectNoSchedule, + Key: "node.ocs.openshift.io/storage", + Operator: corev1.TolerationOpEqual, + Value: "true", + }, + }, }, Replicas: ptr.To(int32(2)), }, @@ -115,11 +123,19 @@ var CSIOperatorConfigSpec = csiopv1a1.OperatorConfigSpec{ PodCommonSpec: csiopv1a1.PodCommonSpec{ PrioritylClassName: ptr.To("system-node-critical"), ImagePullPolicy: corev1.PullIfNotPresent, - Tolerations: []corev1.Toleration{{ - Key: "node-role.kubernetes.io/master", - Operator: corev1.TolerationOpExists, - Effect: corev1.TaintEffectNoSchedule, - }}, + Tolerations: []corev1.Toleration{ + { + Key: "node-role.kubernetes.io/master", + Operator: corev1.TolerationOpExists, + Effect: corev1.TaintEffectNoSchedule, + }, + { + Effect: corev1.TaintEffectNoSchedule, + Key: "node.ocs.openshift.io/storage", + Operator: corev1.TolerationOpEqual, + Value: "true", + }, + }, }, }, },