mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
fix(application): Can't update application with persisted data, after the storage option is disabled on cluster (#4861)
* fix(application): Can't update application with persisted data, after the storage option is disabled on cluster * refacto(application): Some code extraction requested for better maintenance
This commit is contained in:
parent
93eaccc878
commit
cc9dd55b5c
4 changed files with 13 additions and 5 deletions
|
@ -349,6 +349,14 @@ class KubernetesApplicationHelper {
|
|||
app.Volumes.push(volume);
|
||||
});
|
||||
}
|
||||
|
||||
static hasRWOOnly(formValues) {
|
||||
return _.find(formValues.PersistedFolders, (item) => item.StorageClass && _.isEqual(item.StorageClass.AccessModes, ['RWO']));
|
||||
}
|
||||
|
||||
static hasRWX(claims) {
|
||||
return _.find(claims, (item) => item.StorageClass && _.includes(item.StorageClass.AccessModes, 'RWX')) !== undefined;
|
||||
}
|
||||
/* #endregion */
|
||||
|
||||
/* #region PLACEMENTS FV <> AFFINITY */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue