From 8fde16526190d1716180bc74d5a08ec62541ae4e Mon Sep 17 00:00:00 2001 From: yaacov Date: Thu, 2 May 2024 20:39:03 +0300 Subject: [PATCH] Allow to choose NADs from default namespace Signed-off-by: yaacov --- .../Plans/views/details/utils/mapMappingsIdsToLabels.tsx | 2 +- .../Providers/views/migrate/reducer/calculateMappings.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/forklift-console-plugin/src/modules/Plans/views/details/utils/mapMappingsIdsToLabels.tsx b/packages/forklift-console-plugin/src/modules/Plans/views/details/utils/mapMappingsIdsToLabels.tsx index f2fa8dba9..86d2de8b7 100644 --- a/packages/forklift-console-plugin/src/modules/Plans/views/details/utils/mapMappingsIdsToLabels.tsx +++ b/packages/forklift-console-plugin/src/modules/Plans/views/details/utils/mapMappingsIdsToLabels.tsx @@ -103,7 +103,7 @@ export const mapTargetNetworksIdsToLabels = ( plan: V1beta1Plan, ): { [label: string]: string } => { const tuples: [string, string][] = targets - .filter(({ namespace }) => namespace === plan.spec.targetNamespace) + .filter(({ namespace }) => namespace === plan.spec.targetNamespace || namespace === 'default') .map((net) => [net.uid, net.name]); tuples.push(['pod', POD_NETWORK]); diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/calculateMappings.ts b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/calculateMappings.ts index 66dc7ab4e..5d986d6b6 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/calculateMappings.ts +++ b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/calculateMappings.ts @@ -38,7 +38,7 @@ export const calculateNetworks = ( const targetNetworkNameToUid = Object.fromEntries( existingResources.targetNetworks - .filter(({ namespace }) => namespace === plan.spec.targetNamespace) + .filter(({ namespace }) => namespace === plan.spec.targetNamespace || namespace === 'default') .map((net) => [net.name, net.uid]), ); const targetNetworkLabels = [