feat: make --kube-context override helmDefaults (#1673)

This would allow cli flag `--kube-context` to override value in helmDefaults allowing to use different values in local development and CI context.

Co-authored-by: Andrey Tuzhilin <andrey@3adigital.ru>
This commit is contained in:
astorath 2021-03-30 10:53:19 +03:00 committed by GitHub
parent 53c6d2f988
commit b1b7831a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -72,9 +72,6 @@ func (ld *desiredStateLoader) Load(f string, opts LoadOpts) (*state.HelmState, e
} }
if ld.overrideKubeContext != "" { if ld.overrideKubeContext != "" {
if st.HelmDefaults.KubeContext != "" {
return nil, errors.New("err: Cannot use option --kube-context and set attribute helmDefaults.kubeContext.")
}
st.HelmDefaults.KubeContext = ld.overrideKubeContext st.HelmDefaults.KubeContext = ld.overrideKubeContext
} }