mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
feat: drop striped LVM volume group type from v1.9.1 (#1167)
The LVM add-on reaches GA in v1.9.1 and only supports dm-thin.
Gate the striped option behind a v1.9.1 feature flag, default new
LVM storage classes to dm-thin, and reset a cloned striped type so
older clusters keep the current behaviour.
Related issue: harvester/harvester#11731
Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
This commit is contained in:
@@ -77,7 +77,9 @@ const FEATURE_FLAGS = {
|
|||||||
'staticIPForVM',
|
'staticIPForVM',
|
||||||
'fsFreezeDeadline',
|
'fsFreezeDeadline',
|
||||||
],
|
],
|
||||||
'v1.9.1': [],
|
'v1.9.1': [
|
||||||
|
'lvmDmThinOnly',
|
||||||
|
],
|
||||||
'v1.10.0': [],
|
'v1.10.0': [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -7,8 +7,12 @@ import { allHash } from '@shell/utils/promise';
|
|||||||
import { clone } from '@shell/utils/object';
|
import { clone } from '@shell/utils/object';
|
||||||
import { HCI } from '../../../types';
|
import { HCI } from '../../../types';
|
||||||
import { NODE } from '@shell/config/types';
|
import { NODE } from '@shell/config/types';
|
||||||
|
import { _CREATE, _CLONE } from '@shell/config/query-params';
|
||||||
import { LVM_TOPOLOGY_LABEL } from '../index.vue';
|
import { LVM_TOPOLOGY_LABEL } from '../index.vue';
|
||||||
|
|
||||||
|
const STRIPED_TYPE = 'striped';
|
||||||
|
const DM_THIN_TYPE = 'dm-thin';
|
||||||
|
|
||||||
const DEFAULT_PARAMETERS = [
|
const DEFAULT_PARAMETERS = [
|
||||||
'type',
|
'type',
|
||||||
'vgName'
|
'vgName'
|
||||||
@@ -54,8 +58,17 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
const node = (this.value.allowedTopologies?.[0]?.matchLabelExpressions || []).find((t) => t.key === LVM_TOPOLOGY_LABEL)?.values[0];
|
const node = (this.value.allowedTopologies?.[0]?.matchLabelExpressions || []).find((t) => t.key === LVM_TOPOLOGY_LABEL)?.values[0];
|
||||||
|
|
||||||
|
// striped is dropped once the LVM add-on reaches GA (v1.9.1); dm-thin is the only supported type.
|
||||||
|
const dmThinOnly = this.$store.getters['harvester-common/getFeatureEnabled']('lvmDmThinOnly');
|
||||||
|
const volumeGroupTypes = dmThinOnly ? [DM_THIN_TYPE] : [STRIPED_TYPE, DM_THIN_TYPE];
|
||||||
|
|
||||||
|
// Default new storage classes to dm-thin, and reset a cloned striped type that is no longer selectable.
|
||||||
|
if (dmThinOnly && [_CREATE, _CLONE].includes(this.realMode) && !volumeGroupTypes.includes(this.value.parameters.type)) {
|
||||||
|
this.value.parameters.type = DM_THIN_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
volumeGroupTypes: ['striped', 'dm-thin'],
|
volumeGroupTypes,
|
||||||
node,
|
node,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user