1
0
mirror of synced 2026-03-13 23:26:55 +00:00

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

View File

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