fix: vpc topology should consume NAD labels (#975) (#976)

(cherry picked from commit 59f260eab8bf134ad57f21caac3030ac02cb603f)

Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
mergify[bot] 2026-07-08 13:50:17 +08:00 committed by GitHub
parent 495e80267d
commit d47bf1d712
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ export const HCI = {
CREATOR: 'harvesterhci.io/creator', CREATOR: 'harvesterhci.io/creator',
OS: 'harvesterhci.io/os', OS: 'harvesterhci.io/os',
GOLDEN_IMAGE: 'harvesterhci.io/goldenImage', GOLDEN_IMAGE: 'harvesterhci.io/goldenImage',
CLUSTER_NETWORK: 'network.harvesterhci.io/clusternetwork',
NETWORK_TYPE: 'network.harvesterhci.io/type', NETWORK_TYPE: 'network.harvesterhci.io/type',
VM_NAME: 'harvesterhci.io/vmName', VM_NAME: 'harvesterhci.io/vmName',
VM_NAME_PREFIX: 'harvesterhci.io/vmNamePrefix', VM_NAME_PREFIX: 'harvesterhci.io/vmNamePrefix',

View File

@ -7,6 +7,7 @@ import { MiniMap } from '@vue-flow/minimap';
import { allHash } from '@shell/utils/promise'; import { allHash } from '@shell/utils/promise';
import { NETWORK_ATTACHMENT } from '@shell/config/types'; import { NETWORK_ATTACHMENT } from '@shell/config/types';
import Checkbox from '@components/Form/Checkbox/Checkbox.vue'; import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
import { HCI } from '../types'; import { HCI } from '../types';
import { NETWORK_TYPE } from '../config/types'; import { NETWORK_TYPE } from '../config/types';
@ -454,10 +455,10 @@ export default {
const overlayName = nad?.parseConfig?.name || nad?.metadata?.name; const overlayName = nad?.parseConfig?.name || nad?.metadata?.name;
const clusterNetwork = const clusterNetwork =
nad?.metadata?.labels?.[HCI.CLUSTER_NETWORK] || 'mgmt'; nad?.metadata?.labels?.[HCI_ANNOTATIONS.CLUSTER_NETWORK] || 'mgmt';
const nadType = 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 }`; const overlayNodeId = `overlay-${ provider }`;
nodes.push({ nodes.push({