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

fix(app): fix app env var update issues [EE-5078] (#9066)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2023-06-13 09:14:10 +12:00 committed by GitHub
parent 424c98e256
commit 3721c1478e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 6 deletions

View file

@ -145,10 +145,8 @@ class KubernetesApplicationHelper {
/* #endregion */
/* #region CONFIGURATIONS FV <> ENV & VOLUMES */
static generateConfigurationFormValuesFromEnvAndVolumes(env, volumes, configurations) {
static generateConfigurationFormValuesFromEnvAndVolumes(env, volumes, configurations, filterCondition) {
const finalRes = _.flatMap(configurations, (cfg) => {
const filterCondition = cfg.Kind === KubernetesConfigurationKinds.CONFIGMAP ? 'valueFrom.configMapKeyRef.name' : 'valueFrom.secretKeyRef.name';
const cfgEnv = _.filter(env, [filterCondition, cfg.Name]);
const cfgVol = _.filter(volumes, { configurationName: cfg.Name });
if (!cfgEnv.length && !cfgVol.length) {