feat: add feature flag

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
Yi-Ya Chen 2025-02-11 15:38:41 +08:00
parent 375127a78a
commit 72c6741af1
No known key found for this signature in database
GPG Key ID: 9A2E6FBD33F68EDE
2 changed files with 11 additions and 3 deletions

View File

@ -71,6 +71,10 @@ export default {
return this.$store.getters['harvester/schemaFor'](HCI.UPGRADE_LOG);
},
skipSingleReplicaDetachedVolFeatureEnabled() {
return this.$store.getters['harvester-common/getFeatureEnabled']('skipSingleReplicaDetachedVol');
},
releaseLink() {
return `https://github.com/harvester/harvester/releases/tag/${ this.version }`;
}
@ -107,7 +111,7 @@ export default {
spec: { version: this.version }
};
if (this.skipSingleReplicaDetachedVol) {
if (this.skipSingleReplicaDetachedVolFeatureEnabled && this.skipSingleReplicaDetachedVol) {
upgradeValue.metadata.annotations =
{ [HCI_ANNOTATIONS.SKIP_SINGLE_REPLICA_DETACHED_VOL]: JSON.stringify(this.skipSingleReplicaDetachedVol) };
}
@ -198,7 +202,10 @@ export default {
/>
</div>
<div class="mb-5">
<div
v-if="skipSingleReplicaDetachedVolFeatureEnabled"
class="mb-5"
>
<Checkbox
v-model:value="skipSingleReplicaDetachedVol"
class="check"

View File

@ -48,7 +48,8 @@ const featuresV142 = [
// TODO: add v1.5.0 official release note
const featuresV150 = [
...featuresV142,
'tpmPersistentState'
'tpmPersistentState',
'skipSingleReplicaDetachedVol'
];
export const RELEASE_FEATURES = {