Skip to content

Commit

Permalink
fix: Scheduler ignore KUBECONFIG env
Browse files Browse the repository at this point in the history
  • Loading branch information
Shouren committed Dec 5, 2024
1 parent 24fd039 commit dda05c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/k8sutil/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func NewClient() (kubernetes.Interface, error) {
if kubeConfig == "" {
kubeConfig = filepath.Join(os.Getenv("HOME"), ".kube", "config")
}
config, err := rest.InClusterConfig()
config, err := clientcmd.BuildConfigFromFlags("", kubeConfig)
if err != nil {
config, err = clientcmd.BuildConfigFromFlags("", kubeConfig)
config, err = rest.InClusterConfig()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit dda05c5

Please sign in to comment.