-
+
+ {{ scope.row.metadata.name }}
+
+
{{ scope.row.metadata.name }}
-
diff --git a/pkg/harvester/models/harvester/persistentvolumeclaim.js b/pkg/harvester/models/harvester/persistentvolumeclaim.js
index 816a7b29..645b1586 100644
--- a/pkg/harvester/models/harvester/persistentvolumeclaim.js
+++ b/pkg/harvester/models/harvester/persistentvolumeclaim.js
@@ -214,11 +214,7 @@ export default class HciPv extends HarvesterResource {
}
get isEncrypted() {
- const inStore = this.$rootGetters['currentProduct'].inStore;
-
- const longhornVolume = this.$rootGetters[`${ inStore }/all`](LONGHORN.VOLUMES).find(v => v.metadata?.name === this.spec?.volumeName);
-
- return longhornVolume?.spec.encrypted || false;
+ return this.relatedPV?.spec.csi.volumeAttributes.encrypted || false;
}
get longhornVolume() {
diff --git a/pkg/harvester/models/kubevirt.io.virtualmachine.js b/pkg/harvester/models/kubevirt.io.virtualmachine.js
index f7a02958..82652bd0 100644
--- a/pkg/harvester/models/kubevirt.io.virtualmachine.js
+++ b/pkg/harvester/models/kubevirt.io.virtualmachine.js
@@ -574,6 +574,29 @@ export default class VirtVm extends HarvesterResource {
return vmis.find(VMI => VMI.id === this.id);
}
+ get isVMImageEncrypted() {
+ const inStore = this.productInStore;
+ const imageList = this.$rootGetters[`${ inStore }/all`](HCI.IMAGE);
+ const rootImage = imageList.find(image => this.rootImageId === image.id);
+
+ return rootImage?.isEncrypted || false;
+ }
+
+ get isVolumeEncrypted() {
+ const inStore = this.productInStore;
+ const pvcs = this.$rootGetters[`${ inStore }/all`](PVC);
+
+ // filter out the root image PVC
+ const nonRootImagePVCs = pvcs.filter(pvc => !pvc.metadata.annotations[HCI_ANNOTATIONS.IMAGE_ID]);
+
+ const volumeClaimNames = this.spec.template.spec.volumes?.map(v => v.persistentVolumeClaim?.claimName).map(v => v) || [];
+
+ const pvcVolumes = nonRootImagePVCs.filter(pvc => volumeClaimNames.includes(pvc.metadata.name));
+
+ // if any non-rootImage PCV volume is encrypted, return true, otherwise return false
+ return pvcVolumes.some(pvcVol => pvcVol.isEncrypted) ;
+ }
+
get isError() {
const conditions = get(this.vmi, 'status.conditions');
const vmiFailureCond = findBy(conditions, 'type', 'Failure');