From 7595d5bd24dfac46cd3fa2a4c6142f3e66ce8cd4 Mon Sep 17 00:00:00 2001 From: jgyselov Date: Wed, 24 Sep 2025 15:30:31 +0200 Subject: [PATCH] Fix patches when there were 0 nodes in hypershift nodepool --- .../lib/cim/components/Hypershift/modals/ManageHostsModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ui-lib/lib/cim/components/Hypershift/modals/ManageHostsModal.tsx b/libs/ui-lib/lib/cim/components/Hypershift/modals/ManageHostsModal.tsx index fb7639dd7a..70ce7c61ed 100644 --- a/libs/ui-lib/lib/cim/components/Hypershift/modals/ManageHostsModal.tsx +++ b/libs/ui-lib/lib/cim/components/Hypershift/modals/ManageHostsModal.tsx @@ -66,7 +66,7 @@ const getPatches = (values: NodePoolFormValues, nodePool: NodePoolK8sResource) = ); } } else { - if (!!nodePool.spec.replicas) { + if (nodePool.spec.replicas !== undefined) { patches.push({ op: 'replace', value: values.count, @@ -127,7 +127,7 @@ const ManageHostsModal = ({ agentLabels: labelsToFormikValue( nodePool.spec.platform?.agent?.agentLabelSelector?.matchLabels || {}, ), - count: nodePool.spec.replicas || 1, + count: nodePool.spec.replicas || 0, useAutoscaling: !!nodePool.spec.autoScaling, autoscaling: { minReplicas: nodePool.spec.autoScaling?.min || 1,