1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Support check command with multiple config files

Resolves: #472
Signed-off-by: Alexei Ledenev <alexei.led@gmail.com>
This commit is contained in:
Alexei Ledenev
2020-12-17 15:00:13 +02:00
parent 12a0ebe3ba
commit 69387fd2a4
2 changed files with 12 additions and 3 deletions

View File

@@ -28,7 +28,6 @@ import (
"github.com/spf13/cobra"
apimachineryversion "k8s.io/apimachinery/pkg/version"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
)
var checkCmd = &cobra.Command{
@@ -133,7 +132,7 @@ func kubectlCheck(ctx context.Context, version string) bool {
}
func kubernetesCheck(version string) bool {
cfg, err := clientcmd.BuildConfigFromFlags("", kubeconfig)
cfg, err := utils.KubeConfig(kubeconfig, kubecontext)
if err != nil {
logger.Failuref("Kubernetes client initialization failed: %s", err.Error())
return false