Fix kubeContext per release override (#1312)

* Move kube-context from helmDefaults to 1'st argument to let kube-context per release override it

* fix tests

Co-authored-by: Alex Vorona <av@dysnix.com>
This commit is contained in:
Alex Vorona
2020-06-27 17:19:05 +09:00
committed by GitHub
co-authored by Alex Vorona
parent ac40eec423
commit 6d4f0984b6
2 changed files with 55 additions and 55 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ func (helm *execer) exec(args []string, env map[string]string) ([]byte, error) {
cmdargs = append(cmdargs, helm.extra...)
}
if helm.kubeContext != "" {
cmdargs = append(cmdargs, "--kube-context", helm.kubeContext)
cmdargs = append([]string{"--kube-context", helm.kubeContext}, cmdargs...)
}
cmd := fmt.Sprintf("exec: %s %s", helm.helmBinary, strings.Join(cmdargs, " "))
helm.logger.Debug(cmd)