// IsClusterConfigValid verifies that the local configuration can be loaded
// and potentially used to connect to the cluster.
IsClusterConfigValid verifies that the local configuration can be loaded
and potentially used to connect to the cluster.
// IsClusterConfigValid verifies that the local configuration can be loaded // and potentially used to connect to the cluster .
func IsClusterConfigValid() error {
	ctx := viper.GetString("context")
	_, _, err := cluster.GetKubeConfig(ctx)
	if err != nil {
		return fmt.Errorf(kubeConfigError, ctx, ctx)
	}
	if err := cluster.InitKubeClient(ctx); err != nil {
		return err
	}
	return nil
}
func IsClusterConfigValid ( ) error { ctx := viper . GetString ( " " ) _ , _ , err := cluster . GetKubeConfig ( ctx ) if err != nil { return fmt . Errorf ( kubeConfigError , ctx , ctx ) } if err := cluster . InitKubeClient ( ctx ) ; err != nil { return err } return nil }
IsClusterConfigValid verifies that the local configuration can be loaded
and potentially used to connect to the cluster.
IsClusterConfigValid verifies that the local configuration can be loaded and potentially used to connect to the cluster .
// This is a bit of a hack. The singleton should be setup elsewhere, but // doctor will just run through all the checks. If the cluster config is // valid, create the client.