mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
restruct feature config and add harvester version fallback logic
This commit is contained in:
@@ -1,33 +1,18 @@
|
||||
|
||||
// https://github.com/harvester/harvester/wiki/Roadmap
|
||||
const FEATURES = {
|
||||
cpuPinning: false,
|
||||
usbPassthrough: false,
|
||||
volumeEncryption: false,
|
||||
schedulingVMBackup: false,
|
||||
vmSnapshotQuota: false,
|
||||
longhornV2LVMSupport: false,
|
||||
improveMaintainMode: false,
|
||||
autoRotateRke2CertsSetting: false,
|
||||
kubeconfigDefaultTokenTTLMinutesSetting: false,
|
||||
supportBundleNodeCollectionTimeoutSetting: false
|
||||
};
|
||||
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.3.0
|
||||
const releaseV130 = { ...FEATURES };
|
||||
const featuresV130 = [];
|
||||
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.3.1
|
||||
const releaseV131 = {
|
||||
...releaseV130,
|
||||
autoRotateRke2CertsSetting: true,
|
||||
supportBundleNodeCollectionTimeoutSetting: true
|
||||
};
|
||||
const featuresV131 = [
|
||||
'autoRotateRke2CertsSetting',
|
||||
'supportBundleNodeCollectionTimeoutSetting'
|
||||
];
|
||||
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.3.2
|
||||
const releaseV132 = {
|
||||
...releaseV131,
|
||||
kubeconfigDefaultTokenTTLMinutesSetting: true,
|
||||
};
|
||||
const featuresV132 = [
|
||||
'autoRotateRke2CertsSetting',
|
||||
'supportBundleNodeCollectionTimeoutSetting',
|
||||
'kubeconfigDefaultTokenTTLMinutesSetting',
|
||||
];
|
||||
|
||||
// TODO: change to https://github.com/harvester/dashboard/releases/tag/v1.4.0 after v1.4.0 release
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.4.0-rc5
|
||||
@@ -35,20 +20,22 @@ const releaseV132 = {
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.4.0-rc3
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.4.0-rc2
|
||||
// https://github.com/harvester/dashboard/releases/tag/v1.4.0-rc1
|
||||
const releaseV140 = {
|
||||
...releaseV132,
|
||||
cpuPinning: true,
|
||||
usbPassthrough: true,
|
||||
volumeEncryption: true,
|
||||
schedulingVMBackup: true,
|
||||
vmSnapshotQuota: true,
|
||||
longhornV2LVMSupport: true,
|
||||
improveMaintainMode: true,
|
||||
};
|
||||
const featuresV140 = [
|
||||
'autoRotateRke2CertsSetting',
|
||||
'supportBundleNodeCollectionTimeoutSetting',
|
||||
'kubeconfigDefaultTokenTTLMinutesSetting',
|
||||
'cpuPinning',
|
||||
'usbPassthrough',
|
||||
'volumeEncryption',
|
||||
'schedulingVMBackup',
|
||||
'vmSnapshotQuota',
|
||||
'longhornV2LVMSupport',
|
||||
'improveMaintainMode',
|
||||
];
|
||||
|
||||
export const RELEASE_FEATURES = {
|
||||
'v1.4.0': releaseV140,
|
||||
'v1.3.2': releaseV132,
|
||||
'v1.3.1': releaseV132,
|
||||
'v1.3.0': releaseV130,
|
||||
'v1.3.0': featuresV130,
|
||||
'v1.3.1': featuresV131,
|
||||
'v1.3.2': featuresV132,
|
||||
'v1.4.0': featuresV140,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user