...

Source file src/github.com/redhat-developer/odo/pkg/kclient/ingress_routes.go

Documentation: github.com/redhat-developer/odo/pkg/kclient

     1  package kclient
     2  
     3  import (
     4  	"context"
     5  
     6  	v1 "k8s.io/api/networking/v1"
     7  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
     8  	"k8s.io/apimachinery/pkg/runtime/schema"
     9  )
    10  
    11  var (
    12  	RouteGVK = schema.GroupVersionKind{
    13  		Group:   "route.openshift.io",
    14  		Version: "v1",
    15  		Kind:    "Route",
    16  	}
    17  )
    18  
    19  func (c *Client) ListIngresses(namespace, selector string) (*v1.IngressList, error) {
    20  	if namespace == "" {
    21  		namespace = c.Namespace
    22  	}
    23  	return c.KubeClient.NetworkingV1().Ingresses(namespace).List(context.TODO(), metav1.ListOptions{LabelSelector: selector})
    24  }
    25  

View as plain text