1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 22:39:41 +02:00

fix(app): no summary for existing pvc on edit [EE-6569] (#11003)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run

This commit is contained in:
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

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