Documentation ¶
Index ¶
Constants ¶
const ( ControllerTypeNginxCommunity = "k8s.io/ingress-nginx" ControllerTypeTraefik = "traefik.io/ingress-controller" )
Supported ingress controller types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher watches for IngressClass resources, maintaining a local cache of these resources, updated as they are created, modified or deleted. It watches for netv1.IngressClass, netv1beta1.IngressClass and hubv1alpha1.IngressClass.
func NewWatcher ¶
func NewWatcher() *Watcher
NewWatcher creates a new Watcher to track IngressClass resources.
func (*Watcher) GetController ¶
GetController returns the controller of the IngressClass matching the given name. If no IngressClass is found, an empty string is returned.
func (*Watcher) GetDefaultController ¶
GetDefaultController returns the controller of the IngressClass that is noted as default. If no IngressClass is noted as default, an empty string is returned. If multiple IngressClasses are marked as default, an error is returned instead.
func (*Watcher) OnAdd ¶
func (w *Watcher) OnAdd(obj interface{})
OnAdd implements Kubernetes cache.ResourceEventHandler so it can be used as an informer event handler.