fix: preserve per-volume storage class when editing image-sourced volumes and fallback to the image StorageClass for new volumes (#1144)

Signed-off-by: Siva Kanakala <siva.kanakala@suse.com>
This commit is contained in:
Siva Kanakala
2026-09-10 13:08:53 +08:00
committed by GitHub
parent bbe0c4643f
commit cba37194b6
+2 -1
View File
@@ -1317,8 +1317,9 @@ export default {
case SOURCE_TYPE.IMAGE: {
const image = this.images.find( (I) => R.image === I.id);
out.spec.storageClassName = R.realName ? R.storageClassName : (R.storageClassName || image?.storageClassName);
if (image) {
out.spec.storageClassName = image.storageClassName;
out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: image.id };
} else {
out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: '' };