From c8ffa93adaf3d6203f6df08c287bcd3d193834d3 Mon Sep 17 00:00:00 2001
From: Justin Riley <justin.t.riley@gmail.com>
Date: Thu, 30 Jan 2025 12:25:22 -0500
Subject: [PATCH] ocp-test: add ODF daemonset tolerations for GPU nodes

See nerc-project/operations#903
---
 .../configmaps/rook-ceph-operator-config.yaml | 36 +++++++++++++++++++
 .../feature/odf/kustomization.yaml            |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 cluster-scope/overlays/nerc-ocp-test/feature/odf/configmaps/rook-ceph-operator-config.yaml

diff --git a/cluster-scope/overlays/nerc-ocp-test/feature/odf/configmaps/rook-ceph-operator-config.yaml b/cluster-scope/overlays/nerc-ocp-test/feature/odf/configmaps/rook-ceph-operator-config.yaml
new file mode 100644
index 00000000..6692b12a
--- /dev/null
+++ b/cluster-scope/overlays/nerc-ocp-test/feature/odf/configmaps/rook-ceph-operator-config.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+data:
+  ROOK_CSI_ENABLE_CEPHFS: "true"
+  ROOK_LOG_LEVEL: DEBUG
+  CSI_PLUGIN_TOLERATIONS: |2-
+
+    - key: node.ocs.openshift.io/storage
+      operator: Equal
+      value: "true"
+      effect: NoSchedule
+    - key: nvidia.com/gpu.product
+      operator: Equal
+      value: "Tesla-V100-PCIE-32GB"
+      effect: NoSchedule
+    - key: nvidia.com/gpu.product
+      operator: Equal
+      value: "NVIDIA-A100-SXM4-40GB"
+      effect: NoSchedule
+  CSI_PROVISIONER_TOLERATIONS: |2-
+
+    - key: node.ocs.openshift.io/storage
+      operator: Equal
+      value: "true"
+      effect: NoSchedule
+    - key: nvidia.com/gpu.product
+      operator: Equal
+      value: "Tesla-V100-PCIE-32GB"
+      effect: NoSchedule
+    - key: nvidia.com/gpu.product
+      operator: Equal
+      value: "NVIDIA-A100-SXM4-40GB"
+      effect: NoSchedule
+kind: ConfigMap
+metadata:
+  name: rook-ceph-operator-config
+  namespace: openshift-storage
diff --git a/cluster-scope/overlays/nerc-ocp-test/feature/odf/kustomization.yaml b/cluster-scope/overlays/nerc-ocp-test/feature/odf/kustomization.yaml
index 296c0839..bbdbd06f 100644
--- a/cluster-scope/overlays/nerc-ocp-test/feature/odf/kustomization.yaml
+++ b/cluster-scope/overlays/nerc-ocp-test/feature/odf/kustomization.yaml
@@ -12,6 +12,7 @@ resources:
   - ../../../../bundles/odf-external
   - externalsecrets/rook-ceph-external-cluster-details.yaml
   - redhatcop.redhat.io/odf-node-patcher.yaml
+  - configmaps/rook-ceph-operator-config.yaml
 
 patches:
   - path: storageclasses/ocs-external-storagecluster-ceph-rbd_patch.yaml