From 6e29445c138cc3c4e14a5b72f4e1779c81be63b9 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 22 Aug 2024 20:00:56 +1000 Subject: [PATCH 1/2] feat: Add ability to enable Longhorn V2 Data Engine Related issue: https://github.com/harvester/harvester/issues/5274 Signed-off-by: Tim Serong (cherry picked from commit 3de499e1065350322c1aece4204706e82ee49716) --- pkg/harvester/config/settings.js | 4 +++- pkg/harvester/l10n/en-us.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/harvester/config/settings.js b/pkg/harvester/config/settings.js index 9822838c970..5bca95bdbf6 100644 --- a/pkg/harvester/config/settings.js +++ b/pkg/harvester/config/settings.js @@ -31,7 +31,8 @@ export const HCI_SETTING = { VM_TERMINATION_PERIOD: 'default-vm-termination-grace-period-seconds', NTP_SERVERS: 'ntp-servers', AUTO_ROTATE_RKE2_CERTS: 'auto-rotate-rke2-certs', - KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES: 'kubeconfig-default-token-ttl-minutes' + KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES: 'kubeconfig-default-token-ttl-minutes', + LONGHORN_V2_DATA_ENGINE_ENABLED: 'longhorn-v2-data-engine-enabled', }; export const HCI_ALLOWED_SETTINGS = { @@ -83,6 +84,7 @@ export const HCI_ALLOWED_SETTINGS = { kind: 'json', from: 'import', canReset: true }, [HCI_SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: {}, + [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: { kind: 'boolean' }, }; export const HCI_SINGLE_CLUSTER_ALLOWED_SETTING = { diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index 10c1deed23a..945450243e0 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -1370,6 +1370,7 @@ advancedSettings: 'harv-ntp-servers': Configure NTP server. You can configure multiple IPv4 addresses or host addresses. 'harv-auto-rotate-rke2-certs': The certificate rotation mechanism relies on Rancher. Harvester will automatically update certificates generation to trigger rotation. 'harv-kubeconfig-default-token-ttl-minutes': 'TTL (in minutes) applied on Harvester admin kubeconfig files. Default is 0, which means to never expire.' + 'harv-longhorn-v2-data-engine-enabled': 'Enable the Longhorn V2 data engine. Default is false. ' typeLabel: kubevirt.io.virtualmachine: |- From 487f0fcd3119069110baf0eba68c4f3d93b7e60f Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Fri, 23 Aug 2024 18:08:35 +1000 Subject: [PATCH 2/2] feat: Add Tech Preview tag to LH V2 data engine setting Signed-off-by: Tim Serong Co-authored-by: Andy Lee (cherry picked from commit 9a523c438a243970fc014ae8708d73c2b08f8dbe) --- pkg/harvester/components/SettingList.vue | 11 +++++++++++ pkg/harvester/config/settings.js | 2 +- pkg/harvester/l10n/en-us.yaml | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pkg/harvester/components/SettingList.vue b/pkg/harvester/components/SettingList.vue index b2bba63ea47..4dfa8c14257 100644 --- a/pkg/harvester/components/SettingList.vue +++ b/pkg/harvester/components/SettingList.vue @@ -112,6 +112,9 @@ export default { Modified + + Technical Preview +

@@ -200,4 +203,12 @@ export default { padding: 2px 10px; font-size: 12px; } + +.technical-preview { + margin-left: 10px; + border: 1px solid var(--warning); + border-radius: 5px; + padding: 2px 10px; + font-size: 12px; +} diff --git a/pkg/harvester/config/settings.js b/pkg/harvester/config/settings.js index 5bca95bdbf6..d893b3df0fa 100644 --- a/pkg/harvester/config/settings.js +++ b/pkg/harvester/config/settings.js @@ -84,7 +84,7 @@ export const HCI_ALLOWED_SETTINGS = { kind: 'json', from: 'import', canReset: true }, [HCI_SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: {}, - [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: { kind: 'boolean' }, + [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: { kind: 'boolean', technicalPreview: true }, }; export const HCI_SINGLE_CLUSTER_ALLOWED_SETTING = { diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index 945450243e0..611fa6e93a4 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -1339,6 +1339,7 @@ harvester: placeholder: 'topology.kubernetes.io/zone' advancedSettings: + technicalPreview: 'Technical Previews allow users to test and evaluate early-access functionality prior to official supported releases' descriptions: 'harv-vlan': Default Network Interface name of the VLAN network. 'harv-backup-target': Custom backup target to store VM backups. @@ -1370,7 +1371,7 @@ advancedSettings: 'harv-ntp-servers': Configure NTP server. You can configure multiple IPv4 addresses or host addresses. 'harv-auto-rotate-rke2-certs': The certificate rotation mechanism relies on Rancher. Harvester will automatically update certificates generation to trigger rotation. 'harv-kubeconfig-default-token-ttl-minutes': 'TTL (in minutes) applied on Harvester admin kubeconfig files. Default is 0, which means to never expire.' - 'harv-longhorn-v2-data-engine-enabled': 'Enable the Longhorn V2 data engine. Default is false.
  • Changing this setting will restart RKE2 on all nodes. This will not affect running VM workloads.
  • If you see "not enough hugepages-2Mi capacity" errors when enabling this setting, wait a minute for the error to clear. If the error remains, reboot the affected node.
  • WARNING: THIS IS A PREVIEW FEATURE
' + 'harv-longhorn-v2-data-engine-enabled': 'Enable the Longhorn V2 data engine. Default is false.
  • Changing this setting will restart RKE2 on all nodes. This will not affect running VM workloads.
  • If you see "not enough hugepages-2Mi capacity" errors when enabling this setting, wait a minute for the error to clear. If the error remains, reboot the affected node.
' typeLabel: kubevirt.io.virtualmachine: |-