fix(app): no summary for existing pvc on edit [EE-6569] (#11003)

pull/11007/head
Ali 2024-01-24 08:09:59 +13:00 committed by GitHub
parent 8f0f9d7aaa
commit 7bf346bd2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -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 ===