incorrect variable name used (#8198)

pull/8199/head
Matt Hook 2022-12-14 17:49:20 +13:00 committed by GitHub
parent 09bf5d03f4
commit 929749c0da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

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