From 7bf346bd2d865790b3bc3606bb4b1832cd386914 Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:09:59 +1300 Subject: [PATCH] fix(app): no summary for existing pvc on edit [EE-6569] (#11003) --- .../components/ApplicationSummarySection/utils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/react/kubernetes/applications/components/ApplicationSummarySection/utils.ts b/app/react/kubernetes/applications/components/ApplicationSummarySection/utils.ts index c9c99fe68..f69328f23 100644 --- a/app/react/kubernetes/applications/components/ApplicationSummarySection/utils.ts +++ b/app/react/kubernetes/applications/components/ApplicationSummarySection/utils.ts @@ -94,7 +94,7 @@ function getCreatedApplicationResourcesNew( // https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage formValues.DataAccessPolicy === 'Shared' ? formValues.PersistedFolders?.filter( - // only create pvc summaries for new pvcss + // only create pvc summaries for new pvcs (volume) => !volume.existingVolume?.PersistentVolumeClaim.Name ).map((volume) => ({ action: 'Create', @@ -186,7 +186,10 @@ function getUpdatedApplicationResources( // statefulset pvcs are defined in spec.volumeClaimTemplates. // https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage newFormValues.DataAccessPolicy === 'Shared' - ? newFormValues.PersistedFolders?.flatMap((newVolume) => { + ? newFormValues.PersistedFolders?.filter( + // only create pvc summaries for new pvcs + (volume) => !volume.existingVolume?.PersistentVolumeClaim.Name + ).flatMap((newVolume) => { const oldVolume = oldFormValues.PersistedFolders?.find( (oldVolume) => oldVolume.persistentVolumeClaimName ===