From 974d56a3d8683dbfc36b45c39f4baf59a82bb5f2 Mon Sep 17 00:00:00 2001 From: Berto D'Attoma <88311595+bdattoma@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:51:43 +0100 Subject: [PATCH] Default GPU node replicas to 1 avoiding 0 nodes in SNO clusters (#2167) * default node replicas to 1 * add replicas in gcp N1 kustomize * add temp sleep for NFD CRD creation --- ods_ci/tasks/Resources/Provisioning/GPU/NFD/install_nfd.sh | 2 ++ .../Resources/Provisioning/Hive/GPU/overlays/AWS/gpu.yaml | 3 +++ .../Hive/GPU/overlays/GCP/attach-gpu-to-n1/gpu.yaml | 3 +++ .../Resources/Provisioning/Hive/GPU/overlays/GCP/gpu.yaml | 5 ++++- .../Resources/Provisioning/Hive/GPU/overlays/IBM/gpu.yaml | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ods_ci/tasks/Resources/Provisioning/GPU/NFD/install_nfd.sh b/ods_ci/tasks/Resources/Provisioning/GPU/NFD/install_nfd.sh index 7a7108caa..732102609 100644 --- a/ods_ci/tasks/Resources/Provisioning/GPU/NFD/install_nfd.sh +++ b/ods_ci/tasks/Resources/Provisioning/GPU/NFD/install_nfd.sh @@ -26,4 +26,6 @@ else echo "WARNING: I don't know the sha for $xyVersion. Re-using default 4.17 $imageUrl. It might not work!" fi sed -i'' -e "s//$imageUrl/g" $NFD_INSTANCE +# temporary sleep until latest oc binary is available and --for=create is supported +sleep 10s oc apply -f "$NFD_INSTANCE" diff --git a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/AWS/gpu.yaml b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/AWS/gpu.yaml index 44f7c2dec..3f35e9a4d 100644 --- a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/AWS/gpu.yaml +++ b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/AWS/gpu.yaml @@ -1,3 +1,6 @@ - op: replace path: /spec/template/spec/providerSpec/value/instanceType value: INSTANCE_TYPE +- op: replace + path: /spec/replicas + value: 1 \ No newline at end of file diff --git a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/attach-gpu-to-n1/gpu.yaml b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/attach-gpu-to-n1/gpu.yaml index a6249b2ab..cc5059c58 100644 --- a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/attach-gpu-to-n1/gpu.yaml +++ b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/attach-gpu-to-n1/gpu.yaml @@ -9,3 +9,6 @@ - op: replace path: /spec/template/spec/providerSpec/value/machineType value: INSTANCE_TYPE +- op: replace + path: /spec/replicas + value: 1 \ No newline at end of file diff --git a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/gpu.yaml b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/gpu.yaml index a14dc82c0..519a0665b 100644 --- a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/gpu.yaml +++ b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/GCP/gpu.yaml @@ -3,4 +3,7 @@ value: INSTANCE_TYPE - op: add path: /spec/template/spec/providerSpec/value/onHostMaintenance - value: Terminate \ No newline at end of file + value: Terminate +- op: replace + path: /spec/replicas + value: 1 \ No newline at end of file diff --git a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/IBM/gpu.yaml b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/IBM/gpu.yaml index c69a8c810..b40765c51 100644 --- a/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/IBM/gpu.yaml +++ b/ods_ci/tasks/Resources/Provisioning/Hive/GPU/overlays/IBM/gpu.yaml @@ -1,3 +1,6 @@ - op: replace path: /spec/template/spec/providerSpec/value/profile value: INSTANCE_TYPE +- op: replace + path: /spec/replicas + value: 1 \ No newline at end of file