feat: add feature flag

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
(cherry picked from commit 72c6741af1a3e5d3488dfd30872297ff970e30cd)

# Conflicts:
#	pkg/harvester/config/feature-flags.js
This commit is contained in:
Yi-Ya Chen 2025-02-11 15:38:41 +08:00 committed by Mergify
parent 6c69579c41
commit 27c0124682
2 changed files with 13 additions and 2 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

@ -49,7 +49,11 @@ const featuresV142 = [
const featuresV150 = [
...featuresV142,
'tpmPersistentState',
<<<<<<< HEAD
'untaggedNetworkSetting'
=======
'skipSingleReplicaDetachedVol'
>>>>>>> 72c6741 (feat: add feature flag)
];
export const RELEASE_FEATURES = {