From 0ca5f5991e7358c6016b6f6cba95334116935236 Mon Sep 17 00:00:00 2001 From: "andy.lee" Date: Mon, 2 Sep 2024 17:40:09 +0800 Subject: [PATCH] Add additional-guest-memory-overhead-ratio setting Signed-off-by: andy.lee --- ...additional-guest-memory-overhead-ratio.vue | 39 +++++++++++++++++++ pkg/harvester/config/settings.js | 6 ++- pkg/harvester/l10n/en-us.yaml | 2 + 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 pkg/harvester/components/settings/additional-guest-memory-overhead-ratio.vue diff --git a/pkg/harvester/components/settings/additional-guest-memory-overhead-ratio.vue b/pkg/harvester/components/settings/additional-guest-memory-overhead-ratio.vue new file mode 100644 index 00000000000..c2441982f5a --- /dev/null +++ b/pkg/harvester/components/settings/additional-guest-memory-overhead-ratio.vue @@ -0,0 +1,39 @@ + + + diff --git a/pkg/harvester/config/settings.js b/pkg/harvester/config/settings.js index d893b3df0fa..aabdd8723c8 100644 --- a/pkg/harvester/config/settings.js +++ b/pkg/harvester/config/settings.js @@ -33,6 +33,7 @@ export const HCI_SETTING = { AUTO_ROTATE_RKE2_CERTS: 'auto-rotate-rke2-certs', KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES: 'kubeconfig-default-token-ttl-minutes', LONGHORN_V2_DATA_ENGINE_ENABLED: 'longhorn-v2-data-engine-enabled', + ADDITIONAL_GUEST_MEMORY_OVERHEAD_RATIO: 'additional-guest-memory-overhead-ratio' }; export const HCI_ALLOWED_SETTINGS = { @@ -83,8 +84,9 @@ export const HCI_ALLOWED_SETTINGS = { [HCI_SETTING.NTP_SERVERS]: { kind: 'json', from: 'import', canReset: true }, - [HCI_SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: {}, - [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: { kind: 'boolean', technicalPreview: true }, + [HCI_SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: {}, + [HCI_SETTING.LONGHORN_V2_DATA_ENGINE_ENABLED]: { kind: 'boolean', technicalPreview: true }, + [HCI_SETTING.ADDITIONAL_GUEST_MEMORY_OVERHEAD_RATIO]: { kind: 'string', from: 'import' }, }; export const HCI_SINGLE_CLUSTER_ALLOWED_SETTING = { diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index e182dd05b09..2ab4af6fb06 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -905,6 +905,7 @@ harvester: tip: 'Specify an IP range in the IPv4 CIDR format. Number of IPs Required = Number of Nodes * 4 + Number of Disks * 2 + Number of Images to Download/Upload . For more information about storage network settings, see the documentation.' vmForceDeletionPolicy: period: Period + ratio : Ratio autoRotateRKE2Certs: expiringInHours: Expiring in httpProxy: @@ -1396,6 +1397,7 @@ advancedSettings: '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 administration 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. ' + 'harv-additional-guest-memory-overhead-ratio': 'The ratio for kubevirt to adjust the VM overhead memory. The value could be zero, empty value or floating number between 1.0 and 10.0, default to 1.5.' typeLabel: kubevirt.io.virtualmachine: |-