func GetOpenShift() (*OpenShift, error) {
	rc, err := ctrlruntimecfg.GetConfig()
	if err != nil {
		return nil, fmt.Errorf("error creating the config object %v", err)
	}

	cc, err := configClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	oc, err := operatorClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}

	mapic, err := mapiClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}

	monc, err := monitoringClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}

	routec, err := routeClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}

	kc, err := k8sclient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	ic, err := imageClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}

	return &OpenShift{
		Config:     cc,
		Operator:   oc,
		Machine:    mapic,
		Monitoring: monc,
		Route:      routec,
		K8s:        kc,
		Images:     ic,
	}, nil
}
// GetOpenShift creates client for the current OpenShift cluster. If KUBECONFIG env var is set, it is used to
// create client, otherwise it uses in-cluster config.
GetOpenShift creates client for the current OpenShift cluster. If KUBECONFIG env var is set, it is used to
create client, otherwise it uses in-cluster config.
// GetOpenShift creates client for the current OpenShift cluster . If KUBECONFIG env var is set it is used to // create client otherwise it uses in - cluster config .
func GetOpenShift() (*OpenShift, error) {
	rc, err := ctrlruntimecfg.GetConfig()
	if err != nil {
		return nil, fmt.Errorf("error creating the config object %v", err)
	}
	cc, err := configClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	oc, err := operatorClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	mapic, err := mapiClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	monc, err := monitoringClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	routec, err := routeClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	kc, err := k8sclient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	ic, err := imageClient.NewForConfig(rc)
	if err != nil {
		return nil, err
	}
	return &OpenShift{
		Config:     cc,
		Operator:   oc,
		Machine:    mapic,
		Monitoring: monc,
		Route:      routec,
		K8s:        kc,
		Images:     ic,
	}, nil
}
func GetOpenShift ( ) ( * OpenShift , error ) { rc , err := ctrlruntimecfg . GetConfig ( ) if err != nil { return nil , fmt . Errorf ( " " , err ) } cc , err := configClient . NewForConfig ( rc ) if err != nil { return nil , err } oc , err := operatorClient . NewForConfig ( rc ) if err != nil { return nil , err } mapic , err := mapiClient . NewForConfig ( rc ) if err != nil { return nil , err } monc , err := monitoringClient . NewForConfig ( rc ) if err != nil { return nil , err } routec , err := routeClient . NewForConfig ( rc ) if err != nil { return nil , err } kc , err := k8sclient . NewForConfig ( rc ) if err != nil { return nil , err } ic , err := imageClient . NewForConfig ( rc ) if err != nil { return nil , err } return & OpenShift { Config : cc , Operator : oc , Machine : mapic , Monitoring : monc , Route : routec , K8s : kc , Images : ic , } , nil }
GetOpenShift creates client for the current OpenShift cluster.
GetOpenShift creates client for the current OpenShift cluster .