We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcf8f1a commit 2c3a2cdCopy full SHA for 2c3a2cd
pkg/kubernetes/client.go
@@ -18,6 +18,7 @@ import (
18
"fmt"
19
"os"
20
"path/filepath"
21
+ "runtime"
22
"strings"
23
"sync"
24
@@ -40,8 +41,6 @@ import (
40
41
"k8s.io/client-go/tools/clientcmd"
42
)
43
-const kubeConfigDelimiter = ":"
44
-
45
var (
46
doOnce sync.Once
47
kubeconfig *string
@@ -60,6 +59,10 @@ func getConfig() (*rest.Config, error) {
60
59
flag.Parse()
61
})
62
kubeConfigEnv := os.Getenv("KUBECONFIG")
+ kubeConfigDelimiter := ":"
63
+ if runtime.GOOS == "windows" {
64
+ kubeConfigDelimiter = ";"
65
+ }
66
delimiterBelongsToPath := strings.Count(*kubeconfig, kubeConfigDelimiter) == 1 && strings.EqualFold(*kubeconfig, kubeConfigEnv)
67
68
if len(kubeConfigEnv) != 0 && !delimiterBelongsToPath {
0 commit comments