diff --git a/pkg/harvester/config/feature-flags.js b/pkg/harvester/config/feature-flags.js index c5a1fb27..1ca4aa22 100644 --- a/pkg/harvester/config/feature-flags.js +++ b/pkg/harvester/config/feature-flags.js @@ -73,7 +73,8 @@ const FEATURE_FLAGS = { 'supportFilesystem', 'disableResourcePooling', 'expandOnlineEncryptedVolume', - 'longhornV2HugepageSettings' + 'longhornV2HugepageSettings', + 'staticIPForVM', ], }; diff --git a/pkg/harvester/config/labels-annotations.js b/pkg/harvester/config/labels-annotations.js index d61d37f9..960038ac 100644 --- a/pkg/harvester/config/labels-annotations.js +++ b/pkg/harvester/config/labels-annotations.js @@ -81,6 +81,7 @@ export const HCI = { VOLUME_MODE_ACCESS_MODES: 'cdi.harvesterhci.io/storageProfileVolumeModeAccessModes', VOLUME_SNAPSHOT_CLASS: 'cdi.harvesterhci.io/storageProfileVolumeSnapshotClass', MAC_ADDRESS: 'harvesterhci.io/mac-address', + STATIC_IP: 'static-ip.harvesterhci.io', NODE_UPGRADE_PAUSE_MAP: 'harvesterhci.io/node-upgrade-pause-map', CDI_POPULATOR_KIND: 'cdi.kubevirt.io/storage.populator.kind', CNI_NETWORKS: 'k8s.v1.cni.cncf.io/networks', diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/base.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/base.vue index 358e38f7..7d6e5cb0 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/base.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/base.vue @@ -133,6 +133,10 @@ export default { }]; return this.isMasquerade ? masquerade : other; + }, + + staticIPForVMEnabled() { + return this.$store.getters['harvester-common/getFeatureEnabled']('staticIPForVM'); } }, @@ -150,6 +154,7 @@ export default { isSingle(neu) { if (!neu) { this.value['macAddress'] = ''; + this.value['staticIp'] = ''; this.update(); } } @@ -163,6 +168,7 @@ export default { if (neu === MANAGEMENT_NETWORK) { this.value.isPod = true; this.value.macAddress = ''; + this.value.staticIp = ''; } else { this.value.isPod = false; } @@ -289,9 +295,30 @@ export default { -