mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-21 16:22:08 +08:00
* feat: add shutdownVMOnMigrationFailure to the upgrade-config setting Add a control for the new field, which decides whether a VM that fails to live migrate during the node pre-drain phase is shut down so that the upgrade can continue. The field is only shown and defaulted on v1.10.0 or later clusters. * fix: name the upgrade-config radio groups for screen readers Pass the labels of the Restore VM and Shut Down VM on Migration Failure radio groups as their aria-label, so that screen readers can tell them apart. Select the value through the radio group in the tests, so that they catch a group that isn't bound to its field. --------- Signed-off-by: Tim Liou <tim.liou@suse.com> Co-authored-by: Tim Liou <tim.liou@suse.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
108 lines
2.5 KiB
JavaScript
108 lines
2.5 KiB
JavaScript
import semver from 'semver';
|
|
|
|
const FEATURE_FLAGS = {
|
|
'v1.3.0': [
|
|
'supportHarvesterClusterVersion'
|
|
],
|
|
'v1.3.1': [
|
|
'autoRotateRke2CertsSetting',
|
|
'supportBundleNodeCollectionTimeoutSetting'
|
|
],
|
|
'v1.3.2': [
|
|
'kubeconfigDefaultTokenTTLMinutesSetting',
|
|
'improveMaintenanceMode',
|
|
],
|
|
'v1.3.3': [],
|
|
'v1.4.0': [
|
|
'cpuPinning',
|
|
'usbPassthrough',
|
|
'volumeEncryption',
|
|
'schedulingVMBackup',
|
|
'vmSnapshotQuota',
|
|
'longhornV2LVMSupport',
|
|
'improveMaintenanceMode',
|
|
'upgradeConfigSetting'
|
|
],
|
|
'v1.4.1': [],
|
|
'v1.4.2': [
|
|
'refreshIntervalInSecond',
|
|
'allowEmptySnapshotClassName'
|
|
],
|
|
'v1.4.3': [],
|
|
'v1.5.0': [
|
|
'tpmPersistentState',
|
|
'efiPersistentState',
|
|
'untaggedNetworkSetting',
|
|
'skipSingleReplicaDetachedVol',
|
|
'thirdPartyStorage',
|
|
'liveMigrationProgress'
|
|
],
|
|
'v1.5.1': [],
|
|
'v1.6.0': [
|
|
'customSupportBundle',
|
|
'csiOnlineExpandValidation',
|
|
'vmNetworkMigration',
|
|
'kubeovnVpcSubnet',
|
|
'rancherClusterSetting',
|
|
'cpuMemoryHotplug',
|
|
'cdiSettings',
|
|
'vmCloneRunStrategy',
|
|
],
|
|
'v1.6.1': [],
|
|
'v1.7.0': [
|
|
'vmMachineTypeAuto',
|
|
'lhV2VolExpansion',
|
|
'l2VlanTrunkMode',
|
|
'kubevirtMigration',
|
|
'hotplugNic',
|
|
'resumeUpgradePausedNode',
|
|
'vncPreserveSession',
|
|
],
|
|
'v1.7.1': [],
|
|
'v1.8.0': [
|
|
'hotplugCdRom',
|
|
'supportBundleFileNameSetting',
|
|
'clusterRegistrationTLSVerify',
|
|
'vGPUAsPCIDevice',
|
|
'instanceManagerResourcesSetting',
|
|
'rwxNetworkSetting',
|
|
'createPVCWithDataVolume',
|
|
'clusterPodSecurityStandardSetting',
|
|
],
|
|
'v1.8.1': [],
|
|
'v1.9.0': [
|
|
'supportFilesystem',
|
|
'disableResourcePooling',
|
|
'expandOnlineEncryptedVolume',
|
|
'longhornV2HugepageSettings',
|
|
'staticIPForVM',
|
|
'fsFreezeDeadline',
|
|
],
|
|
'v1.9.1': [
|
|
'lvmDmThinOnly',
|
|
'highPerformanceStorage',
|
|
],
|
|
'v1.10.0': [
|
|
'maintenanceModeConditions',
|
|
'maintenanceModeDrainTimeoutSetting',
|
|
'componentHealth',
|
|
'shutdownVMOnMigrationFailure',
|
|
],
|
|
};
|
|
|
|
const generateFeatureFlags = () => {
|
|
const versions = [...Object.keys(FEATURE_FLAGS)].filter((version) => semver.valid(version)).sort(semver.compare);
|
|
|
|
const generatedFlags = {};
|
|
|
|
versions.forEach((version, index) => {
|
|
const previousVersion = versions[index - 1];
|
|
|
|
generatedFlags[version] = previousVersion ? [...generatedFlags[previousVersion], ...FEATURE_FLAGS[version]] : [...FEATURE_FLAGS[version]];
|
|
});
|
|
|
|
return generatedFlags;
|
|
};
|
|
|
|
export const RELEASE_FEATURES = generateFeatureFlags();
|