diff --git a/app/kubernetes/helpers/application/index.js b/app/kubernetes/helpers/application/index.js index 3124f4247..daf993719 100644 --- a/app/kubernetes/helpers/application/index.js +++ b/app/kubernetes/helpers/application/index.js @@ -175,7 +175,10 @@ class KubernetesApplicationHelper { item.OverridenKeys = _.map(keys, (k) => { const fvKey = new KubernetesApplicationConfigurationFormValueOverridenKey(); fvKey.Key = k.Key; - if (index < k.EnvCount) { + if (!k.Count) { + // !k.Count indicates k.Key is new added to the configuration and has not been loaded to the application yet + fvKey.Type = KubernetesApplicationConfigurationFormValueOverridenKeyTypes.NONE; + } else if (index < k.EnvCount) { fvKey.Type = KubernetesApplicationConfigurationFormValueOverridenKeyTypes.ENVIRONMENT; } else { fvKey.Type = KubernetesApplicationConfigurationFormValueOverridenKeyTypes.FILESYSTEM; diff --git a/app/kubernetes/models/application/formValues.js b/app/kubernetes/models/application/formValues.js index 1f1df1197..12d6151c3 100644 --- a/app/kubernetes/models/application/formValues.js +++ b/app/kubernetes/models/application/formValues.js @@ -35,6 +35,7 @@ export class KubernetesApplicationFormValues { } export const KubernetesApplicationConfigurationFormValueOverridenKeyTypes = Object.freeze({ + NONE: 0, ENVIRONMENT: 1, FILESYSTEM: 2, });