From b61296ae657d4db9a4006b2102ad11a137f1109d Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Wed, 18 Mar 2026 17:32:47 +0800 Subject: [PATCH] feat: add rwxNetwork setting Signed-off-by: Andy Lee --- .../components/settings/rwx-network.vue | 367 ++++++++++++++++++ pkg/harvester/config/feature-flags.js | 1 + pkg/harvester/config/settings.ts | 4 + pkg/harvester/l10n/en-us.yaml | 6 + 4 files changed, 378 insertions(+) create mode 100644 pkg/harvester/components/settings/rwx-network.vue diff --git a/pkg/harvester/components/settings/rwx-network.vue b/pkg/harvester/components/settings/rwx-network.vue new file mode 100644 index 00000000..5374b732 --- /dev/null +++ b/pkg/harvester/components/settings/rwx-network.vue @@ -0,0 +1,367 @@ + + + diff --git a/pkg/harvester/config/feature-flags.js b/pkg/harvester/config/feature-flags.js index 75a7e536..b6e0d944 100644 --- a/pkg/harvester/config/feature-flags.js +++ b/pkg/harvester/config/feature-flags.js @@ -64,6 +64,7 @@ const FEATURE_FLAGS = { 'clusterRegistrationTLSVerify', 'vGPUAsPCIDevice', 'instanceManagerResourcesSetting', + 'rwxNetworkSetting', ], }; diff --git a/pkg/harvester/config/settings.ts b/pkg/harvester/config/settings.ts index ac73427e..42cba1c5 100644 --- a/pkg/harvester/config/settings.ts +++ b/pkg/harvester/config/settings.ts @@ -20,6 +20,7 @@ export const HCI_SETTING = { SUPPORT_BUNDLE_IMAGE: 'support-bundle-image', SUPPORT_BUNDLE_NODE_COLLECTION_TIMEOUT: 'support-bundle-node-collection-timeout', STORAGE_NETWORK: 'storage-network', + RWX_NETWORK: 'rwx-network', VM_FORCE_RESET_POLICY: 'vm-force-reset-policy', SSL_CERTIFICATES: 'ssl-certificates', SSL_PARAMETERS: 'ssl-parameters', @@ -81,6 +82,9 @@ export const HCI_ALLOWED_SETTINGS = { [HCI_SETTING.STORAGE_NETWORK]: { kind: 'custom', from: 'import', canReset: true }, + [HCI_SETTING.RWX_NETWORK]: { + kind: 'custom', from: 'import', canReset: true, featureFlag: 'rwxNetworkSetting' + }, [HCI_SETTING.VM_FORCE_RESET_POLICY]: { kind: 'json', from: 'import' }, [HCI_SETTING.SSL_CERTIFICATES]: { kind: 'json', from: 'import' }, [HCI_SETTING.SSL_PARAMETERS]: { diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index cb16baa3..a5b8babd 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -1280,6 +1280,11 @@ harvester: addIp: Add Exclude IP warning: 'WARNING:
Any change to storage-network requires shutting down all virtual machines before applying this setting.
Users have to ensure the cluster network is configured and VLAN Configuration will cover all nodes and ensure the network connectivity is working and expected in all nodes.' tip: 'Specify an IP range in the IPv4 CIDR format. Number of IPs Required = Number of Nodes * 2 + Number of Disks * 2 + Number of Images to Download/Upload . For more information about storage network settings, see the documentation.' + rwxNetwork: + warning: 'WARNING:
Any change to rwx-network requires longhorn RWX volumes detached before applying this setting.
Users have to ensure the cluster network is configured and VLAN Configuration will cover all nodes and ensure the network connectivity is working and expected in all nodes.' + shareStorageNetwork: Share Storage Network + dedicatedRwxNetwork: Dedicated RWX Network + shareStorageNetworkWarning: The rwx-network is governed by storage-network, and changes here won't take effect until share-storage-network is set to false. vmForceDeletionPolicy: period: Period vmMigrationTimeout: VM Migration Timeout @@ -1998,6 +2003,7 @@ advancedSettings: 'harv-vm-force-reset-policy': Configuration for the force-reset action when a virtual machine is stuck on a node that is down. 'harv-ssl-parameters': Custom SSL Parameters for TLS validation. 'harv-storage-network': 'Longhorn storage-network setting.' + 'harv-rwx-network': 'Configure RWX network behavior for shared or dedicated storage network usage.' 'harv-support-bundle-namespaces': Select additional namespaces to include in the support bundle. 'harv-auto-disk-provision-paths': Specify the disks(using glob pattern) that Harvester will automatically add as virtual machine storage. 'harv-support-bundle-image': Support bundle image configuration. Find different versions in rancher/support-bundle-kit.