From d8ea9be1742f901b3d34621457a26093b6eab207 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:19:44 +0800 Subject: [PATCH] feat: introduce rwxNetwork setting (#746) (#750) * feat: add rwxNetwork setting * fix: network payload --------- (cherry picked from commit d1949641a7b6f5055a0eba210196d5e83db08f1a) Signed-off-by: Andy Lee Co-authored-by: Andy Lee --- .../components/settings/rwx-network.vue | 371 ++++++++++++++++++ pkg/harvester/config/feature-flags.js | 1 + pkg/harvester/config/settings.ts | 4 + pkg/harvester/l10n/en-us.yaml | 6 + 4 files changed, 382 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..6185fd11 --- /dev/null +++ b/pkg/harvester/components/settings/rwx-network.vue @@ -0,0 +1,371 @@ + + + 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.