From 929749c0da642c4ce6f735e421dcfc8b2e055265 Mon Sep 17 00:00:00 2001 From: Matt Hook Date: Wed, 14 Dec 2022 17:49:20 +1300 Subject: [PATCH] incorrect variable name used (#8198) --- app/kubernetes/helpers/application/index.js | 4 ++-- app/kubernetes/helpers/configurationHelper.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/kubernetes/helpers/application/index.js b/app/kubernetes/helpers/application/index.js index 39e9f1282..f068868db 100644 --- a/app/kubernetes/helpers/application/index.js +++ b/app/kubernetes/helpers/application/index.js @@ -147,7 +147,7 @@ class KubernetesApplicationHelper { /* #region CONFIGURATIONS FV <> ENV & VOLUMES */ static generateConfigurationFormValuesFromEnvAndVolumes(env, volumes, configurations) { const finalRes = _.flatMap(configurations, (cfg) => { - const filterCondition = cfg.Type === KubernetesConfigurationKinds.CONFIGMAP ? 'valueFrom.configMapKeyRef.name' : 'valueFrom.secretKeyRef.name'; + 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 }); @@ -207,7 +207,7 @@ class KubernetesApplicationHelper { let finalMounts = []; _.forEach(configurations, (config) => { - const isBasic = config.SelectedConfiguration.Type === KubernetesConfigurationKinds.CONFIGMAP; + const isBasic = config.SelectedConfiguration.Kind === KubernetesConfigurationKinds.CONFIGMAP; if (!config.Overriden) { const envKeys = _.keys(config.SelectedConfiguration.Data); diff --git a/app/kubernetes/helpers/configurationHelper.js b/app/kubernetes/helpers/configurationHelper.js index 3d34a3ac1..a5278bf86 100644 --- a/app/kubernetes/helpers/configurationHelper.js +++ b/app/kubernetes/helpers/configurationHelper.js @@ -8,7 +8,7 @@ class KubernetesConfigurationHelper { return _.filter(applications, (app) => { let envFind; let volumeFind; - if (config.Type === KubernetesConfigurationKinds.CONFIGMAP) { + if (config.Kind === KubernetesConfigurationKinds.CONFIGMAP) { envFind = _.find(app.Env, { valueFrom: { configMapKeyRef: { name: config.Name } } }); volumeFind = _.find(app.Volumes, { configMap: { name: config.Name } }); } else {