// provide "" (metav1.NamespaceAll) to get a cluster-scoped route table client
provide "" (metav1.NamespaceAll) to get a cluster-scoped route table client
// provide " " ( metav1 . NamespaceAll ) to get a cluster - scoped route table client
func RouteTableClient(namespaces []string) (gatewayv1.RouteTableClient, error) {
	customFactory := getConfigClientFactory()
	if customFactory != nil {
		return gatewayv1.NewRouteTableClient(customFactory)
	}
	cfg, err := kubeutils.GetConfig("", "")
	if err != nil {
		return nil, errors.Wrapf(err, "getting kube config")
	}
	cache := kube.NewKubeCache(context.TODO())
	routeTableClient, err := gatewayv1.NewRouteTableClient(&factory.KubeResourceClientFactory{
		Crd:                gatewayv1.RouteTableCrd,
		Cfg:                cfg,
		SharedCache:        cache,
		SkipCrdCreation:    true,
		NamespaceWhitelist: namespaces,
	})
	if err != nil {
		return nil, errors.Wrapf(err, "creating routeTables client")
	}
	if err := routeTableClient.Register(); err != nil {
		return nil, err
	}
	return routeTableClient, nil
}
func RouteTableClient ( namespaces [ ] string ) ( gatewayv1 . RouteTableClient , error ) { customFactory := getConfigClientFactory ( ) if customFactory != nil { return gatewayv1 . NewRouteTableClient ( customFactory ) } cfg , err := kubeutils . GetConfig ( " " , " " ) if err != nil { return nil , errors . Wrapf ( err , " " ) } cache := kube . NewKubeCache ( context . TODO ( ) ) routeTableClient , err := gatewayv1 . NewRouteTableClient ( & factory . KubeResourceClientFactory { Crd : gatewayv1 . RouteTableCrd , Cfg : cfg , SharedCache : cache , SkipCrdCreation : true , NamespaceWhitelist : namespaces , } ) if err != nil { return nil , errors . Wrapf ( err , " " ) } if err := routeTableClient . Register ( ) ; err != nil { return nil , err } return routeTableClient , nil }
provide "" (metav1.NamespaceAll) to get a cluster-scoped route table client
provide " " ( metav1 . NamespaceAll ) to get a cluster - scoped route table client