mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-23 03:48:50 +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:
parent
12a0ebe3ba
commit
69387fd2a4
2 changed files with 12 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue