Merge pull request #682 from SomtochiAma/multiple-config-files

Check for multiple files in KUBECONFIG variable
This commit is contained in:
Stefan Prodan 2021-01-12 11:39:53 +02:00 committed by GitHub
commit 9da427a515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,7 +67,7 @@ const (
func ExecKubectlCommand(ctx context.Context, mode ExecMode, kubeConfigPath string, kubeContext string, args ...string) (string, error) {
var stdoutBuf, stderrBuf bytes.Buffer
if kubeConfigPath != "" {
if kubeConfigPath != "" && len(filepath.SplitList(kubeConfigPath)) == 1 {
args = append(args, "--kubeconfig="+kubeConfigPath)
}