types

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package types contains types used by the gateway controller

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OneTermSelector added in v1.4.0

func OneTermSelector(k string) fields.Selector

OneTermSelector is a selector that matches fields that have a specific index name

func OrSelectors added in v1.4.0

func OrSelectors(selectors ...fields.Selector) fields.Selector

OrSelectors Selector represents a logical OR of multiple selectors

Types

type Controller added in v1.4.0

type Controller interface {
	cache.ResourceEventHandler

	// Runnable runs the backend broadcast listener
	manager.Runnable

	// LeaderElectionRunnable knows if a Runnable needs to be run in the leader election mode.
	manager.LeaderElectionRunnable
}

Controller is the interface for the functionality provided by the resources part of the gateway.networking.k8s.io API group

type CrossNamespaceFrom added in v1.3.0

type CrossNamespaceFrom struct {
	Group     string
	Kind      string
	Namespace string
}

CrossNamespaceFrom is the type used to represent the from part of a cross-namespace reference

type CrossNamespaceTo added in v1.3.0

type CrossNamespaceTo struct {
	Group     string
	Kind      string
	Namespace string
	Name      string
}

CrossNamespaceTo is the type used to represent the to part of a cross-namespace reference

type GatewayListenerConditionProvider added in v1.5.0

type GatewayListenerConditionProvider interface {
	AddNoMatchingParentCondition(route client.Object, parentRef gwv1.ParentReference, routeNs string)
	AddNotAllowedByListenersCondition(route client.Object, parentRef gwv1.ParentReference, routeNs string)
}

GatewayListenerConditionProvider is the interface for providing GatewayListener conditions

type GatewayListenerResolver added in v1.5.0

type GatewayListenerResolver interface {
	GetAllowedListeners(gw *gwv1.Gateway) []Listener
}

GatewayListenerResolver is the interface for resolving Listeners of the Gateway

type Listener

type Listener struct {
	gwv1.Listener
	SupportedKinds []gwv1.RouteGroupKind
}

Listener is a wrapper around the Gateway API Listener object

func (*Listener) AllowsKind

func (l *Listener) AllowsKind(gvk schema.GroupVersionKind) bool

AllowsKind returns true if the listener allows the given kind

type ObjectReferenceConditionProvider added in v1.5.0

type ObjectReferenceConditionProvider interface {
	AddInvalidRefCondition(obj client.Object, ref gwv1.ObjectReference)
	AddRefNotPermittedCondition(obj client.Object, ref gwv1.ObjectReference)
	AddRefNotFoundCondition(obj client.Object, key types.NamespacedName, kind string)
	AddGetRefErrorCondition(obj client.Object, key types.NamespacedName, kind string, err error)
	AddNoRequiredCAFileCondition(obj client.Object, key types.NamespacedName, kind string)
	AddEmptyCACondition(obj client.Object, ref gwv1.ObjectReference)
	AddRefsResolvedCondition(obj client.Object)
}

ObjectReferenceConditionProvider is the interface for providing ObjectReference conditions

type ObjectReferenceResolver added in v1.5.0

type ObjectReferenceResolver interface {
	ResolveAllRefs(referer client.Object, refs []gwv1.ObjectReference) bool
	ObjectRefToCACertificate(referer client.Object, ref gwv1.ObjectReference) []byte
}

ObjectReferenceResolver is the interface for resolving ObjectReferences

type PolicyMatchType added in v1.2.0

type PolicyMatchType string

PolicyMatchType is the type used to represent the rate limit policy match type

const (
	// PolicyMatchTypePort is the type used to represent the rate limit policy match type port
	PolicyMatchTypePort PolicyMatchType = "port"

	// PolicyMatchTypeHostnames is the type used to represent the rate limit policy match type hostnames
	PolicyMatchTypeHostnames PolicyMatchType = "hostnames"

	// PolicyMatchTypeHTTPRoute is the type used to represent the rate limit policy match type httproute
	PolicyMatchTypeHTTPRoute PolicyMatchType = "httproute"

	// PolicyMatchTypeGRPCRoute is the type used to represent the rate limit policy match type grpcroute
	PolicyMatchTypeGRPCRoute PolicyMatchType = "grpcroute"
)

type SecretReferenceConditionProvider added in v1.5.0

type SecretReferenceConditionProvider interface {
	AddInvalidCertificateRefCondition(obj client.Object, ref gwv1.SecretObjectReference)
	AddRefNotPermittedCondition(obj client.Object, ref gwv1.SecretObjectReference)
	AddRefNotFoundCondition(obj client.Object, key types.NamespacedName)
	AddGetRefErrorCondition(obj client.Object, key types.NamespacedName, err error)
	AddRefsResolvedCondition(obj client.Object)
}

SecretReferenceConditionProvider is the interface for providing SecretReference conditions

type SecretReferenceResolver added in v1.5.0

type SecretReferenceResolver interface {
	ResolveAllRefs(referer client.Object, refs []gwv1.SecretObjectReference) bool
	SecretRefToSecret(referer client.Object, ref gwv1.SecretObjectReference) (*corev1.Secret, error)
}

SecretReferenceResolver is the interface for resolving SecretReferences

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL