From 59f260eab8bf134ad57f21caac3030ac02cb603f Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Wed, 8 Jul 2026 13:47:25 +0800 Subject: [PATCH] fix: vpc topology should consume NAD labels (#975) Signed-off-by: Andy Lee --- pkg/harvester/config/labels-annotations.js | 1 + pkg/harvester/detail/kubeovn.io.vpc.vue | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/harvester/config/labels-annotations.js b/pkg/harvester/config/labels-annotations.js index fd90c2bd..d61d37f9 100644 --- a/pkg/harvester/config/labels-annotations.js +++ b/pkg/harvester/config/labels-annotations.js @@ -16,6 +16,7 @@ export const HCI = { CREATOR: 'harvesterhci.io/creator', OS: 'harvesterhci.io/os', GOLDEN_IMAGE: 'harvesterhci.io/goldenImage', + CLUSTER_NETWORK: 'network.harvesterhci.io/clusternetwork', NETWORK_TYPE: 'network.harvesterhci.io/type', VM_NAME: 'harvesterhci.io/vmName', VM_NAME_PREFIX: 'harvesterhci.io/vmNamePrefix', diff --git a/pkg/harvester/detail/kubeovn.io.vpc.vue b/pkg/harvester/detail/kubeovn.io.vpc.vue index 51a23834..fcf466be 100644 --- a/pkg/harvester/detail/kubeovn.io.vpc.vue +++ b/pkg/harvester/detail/kubeovn.io.vpc.vue @@ -7,6 +7,7 @@ import { MiniMap } from '@vue-flow/minimap'; import { allHash } from '@shell/utils/promise'; import { NETWORK_ATTACHMENT } from '@shell/config/types'; import Checkbox from '@components/Form/Checkbox/Checkbox.vue'; +import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations'; import { HCI } from '../types'; import { NETWORK_TYPE } from '../config/types'; @@ -454,10 +455,10 @@ export default { const overlayName = nad?.parseConfig?.name || nad?.metadata?.name; const clusterNetwork = - nad?.metadata?.labels?.[HCI.CLUSTER_NETWORK] || 'mgmt'; + nad?.metadata?.labels?.[HCI_ANNOTATIONS.CLUSTER_NETWORK] || 'mgmt'; const nadType = - nad?.metadata?.labels?.[HCI.NETWORK_TYPE] || NETWORK_TYPE.OVERLAY; + nad?.metadata?.labels?.[HCI_ANNOTATIONS.NETWORK_TYPE] || NETWORK_TYPE.OVERLAY; const overlayNodeId = `overlay-${ provider }`; nodes.push({