From 003a09d0a9f89052a610b4797c1b3ba14c78f0ee Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 12:15:10 +0800 Subject: [PATCH] fix: update cdiSettings (#444) (#445) (cherry picked from commit 1b362f570bd9448e3bc1794e6c91001cfadf0b30) Signed-off-by: Yi-Ya Chen Co-authored-by: Yiya Chen --- pkg/harvester/edit/harvesterhci.io.storage/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/harvester/edit/harvesterhci.io.storage/index.vue b/pkg/harvester/edit/harvesterhci.io.storage/index.vue index 40f0067d..818d2e63 100644 --- a/pkg/harvester/edit/harvesterhci.io.storage/index.vue +++ b/pkg/harvester/edit/harvesterhci.io.storage/index.vue @@ -297,18 +297,26 @@ export default { if (Object.keys(volumeModeAccessModes).length > 0) { annotations[HCI_ANNOTATIONS.VOLUME_MODE_ACCESS_MODES] = JSON.stringify(volumeModeAccessModes); + } else { + delete annotations[HCI_ANNOTATIONS.VOLUME_MODE_ACCESS_MODES]; } if (this.cdiSettings.volumeSnapshotClass) { annotations[HCI_ANNOTATIONS.VOLUME_SNAPSHOT_CLASS] = this.cdiSettings.volumeSnapshotClass; + } else { + delete annotations[HCI_ANNOTATIONS.VOLUME_SNAPSHOT_CLASS]; } if (this.cdiSettings.cloneStrategy) { annotations[HCI_ANNOTATIONS.CLONE_STRATEGY] = this.cdiSettings.cloneStrategy; + } else { + delete annotations[HCI_ANNOTATIONS.CLONE_STRATEGY]; } if (this.cdiSettings.filesystemOverhead) { annotations[HCI_ANNOTATIONS.FILESYSTEM_OVERHEAD] = this.cdiSettings.filesystemOverhead; + } else { + delete annotations[HCI_ANNOTATIONS.FILESYSTEM_OVERHEAD]; } this.value.metadata.annotations = annotations;