gateway

package
v2.10.5 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionTypeProgrammed                                                = "Programmed"
	ConditionReasonProgrammedUnknown   gatewayv1beta1.RouteConditionReason = "Unknown"
	ConditionReasonConfiguredInGateway gatewayv1beta1.RouteConditionReason = "ConfiguredInGateway"
	ConditionReasonTranslationError    gatewayv1beta1.RouteConditionReason = "TranslationError"
)
View Source
const (
	HTTPProtocolType  = gatewayv1beta1.HTTPProtocolType
	HTTPSProtocolType = gatewayv1beta1.HTTPSProtocolType
	TLSProtocolType   = gatewayv1beta1.TLSProtocolType
	TCPProtocolType   = gatewayv1beta1.TCPProtocolType
	UDPProtocolType   = gatewayv1beta1.UDPProtocolType
)
View Source
const (
	// This reason is used with the "Accepted" condition when there are
	// no matching Parents. In the case of Gateways, this can occur when
	// a Route ParentRef specifies a Port and/or SectionName that does not
	// match any Listeners in the Gateway.
	//
	// NOTE: This is already in uptsream, albeit unreleased:
	// https://github.com/kubernetes-sigs/gateway-api/pull/1516
	// TODO: swap this out with upstream const when released.
	RouteReasonNoMatchingParent gatewayv1beta1.RouteConditionReason = "NoMatchingParent"
)

Variables

View Source
var ErrNoMatchingListenerHostname = fmt.Errorf("no matching hostnames in listener")
View Source
var (
	ErrUnmanagedAnnotation = errors.New("invalid unmanaged annotation value")
)

Functions

func GetControllerName added in v2.9.0

func GetControllerName() gatewayv1beta1.GatewayController

func SetControllerName added in v2.9.0

func SetControllerName(name gatewayv1beta1.GatewayController)

Types

type BackendRef added in v2.8.0

type BackendRef = gatewayv1beta1.BackendRef

type DataPlane added in v2.9.0

type DataPlane interface {
	DataPlaneClient

	AreKubernetesObjectReportsEnabled() bool
	KubernetesObjectConfigurationStatus(obj client.Object) k8sobj.ConfigurationStatus
}

DataPlane is a common interface that is used by reconcilers to interact with the dataplane.

TODO: This can probably be used in other reconcilers as well. Related issue: https://github.com/Kong/kubernetes-ingress-controller/issues/3794

type DataPlaneClient added in v2.9.0

type DataPlaneClient interface {
	UpdateObject(obj client.Object) error
	DeleteObject(obj client.Object) error
}

DataPlaneClient is a common client interface that is used by reconcilers to interact with the dataplane to perform CRUD operations on provided objects.

type GRPCRoute added in v2.9.0

type GRPCRoute = gatewayv1alpha2.GRPCRoute

type GRPCRouteReconciler added in v2.9.0

type GRPCRouteReconciler struct {
	client.Client

	Log             logr.Logger
	Scheme          *runtime.Scheme
	DataplaneClient *dataplane.KongClient
	StatusQueue     *status.Queue
	// If EnableReferenceGrant is true, we will check for ReferenceGrant if backend in another
	// namespace is in backendRefs.
	// If it is false, referencing backend in different namespace will be rejected.
	EnableReferenceGrant bool
	CacheSyncTimeout     time.Duration
}

GRPCRouteReconciler reconciles an GRPCRoute object.

func (*GRPCRouteReconciler) Reconcile added in v2.9.0

func (r *GRPCRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*GRPCRouteReconciler) SetupWithManager added in v2.9.0

func (r *GRPCRouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Gateway added in v2.6.0

type Gateway = gatewayv1beta1.Gateway

type GatewayAddress added in v2.6.0

type GatewayAddress = gatewayv1beta1.GatewayAddress

type GatewayClass added in v2.6.0

type GatewayClass = gatewayv1beta1.GatewayClass

type GatewayClassReconciler added in v2.3.0

type GatewayClassReconciler struct {
	client.Client
	Log              logr.Logger
	Scheme           *runtime.Scheme
	CacheSyncTimeout time.Duration
}

GatewayClassReconciler reconciles a GatewayClass object.

func (*GatewayClassReconciler) GatewayClassIsUnmanaged added in v2.6.0

func (r *GatewayClassReconciler) GatewayClassIsUnmanaged(obj client.Object) bool

GatewayClassIsUnmanaged is a watch predicate which filters out reconciliation events for gateway objects which aren't annotated as unmanaged.

func (*GatewayClassReconciler) Reconcile added in v2.3.0

func (r *GatewayClassReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*GatewayClassReconciler) SetupWithManager added in v2.3.0

func (r *GatewayClassReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GatewayReconciler

type GatewayReconciler struct {
	client.Client

	Log             logr.Logger
	Scheme          *runtime.Scheme
	DataplaneClient *dataplane.KongClient

	WatchNamespaces  []string
	CacheSyncTimeout time.Duration

	ReferenceIndexers ctrlref.CacheIndexers

	PublishServiceRef    k8stypes.NamespacedName
	PublishServiceUDPRef mo.Option[k8stypes.NamespacedName]
	// contains filtered or unexported fields
}

GatewayReconciler reconciles a Gateway object.

func (*GatewayReconciler) Reconcile

func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*GatewayReconciler) SetupWithManager

func (r *GatewayReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Group added in v2.6.0

type Group = gatewayv1beta1.Group

type HTTPRoute added in v2.6.0

type HTTPRoute = gatewayv1beta1.HTTPRoute

type HTTPRouteReconciler

type HTTPRouteReconciler struct {
	client.Client

	Log              logr.Logger
	Scheme           *runtime.Scheme
	DataplaneClient  DataPlane
	CacheSyncTimeout time.Duration
	StatusQueue      *status.Queue
	// contains filtered or unexported fields
}

HTTPRouteReconciler reconciles an HTTPRoute object.

func (*HTTPRouteReconciler) Reconcile

func (r *HTTPRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*HTTPRouteReconciler) SetLogger added in v2.9.0

func (r *HTTPRouteReconciler) SetLogger(l logr.Logger)

SetLogger sets the logger.

func (*HTTPRouteReconciler) SetupWithManager

func (r *HTTPRouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Hostname added in v2.6.0

type Hostname = gatewayv1beta1.Hostname

type Kind added in v2.6.0

type Kind = gatewayv1beta1.Kind

type Listener added in v2.6.0

type Listener = gatewayv1beta1.Listener

type ListenerStatus added in v2.6.0

type ListenerStatus = gatewayv1beta1.ListenerStatus

type Namespace added in v2.6.0

type Namespace = gatewayv1beta1.Namespace

type ObjectName added in v2.6.0

type ObjectName = gatewayv1beta1.ObjectName

type ParentReference added in v2.6.0

type ParentReference = gatewayv1beta1.ParentReference

type PortNumber added in v2.6.0

type PortNumber = gatewayv1beta1.PortNumber

type ProtocolType added in v2.6.0

type ProtocolType = gatewayv1beta1.ProtocolType

type ReferenceGrantReconciler added in v2.6.0

type ReferenceGrantReconciler struct {
	client.Client
	Log             logr.Logger
	Scheme          *runtime.Scheme
	DataplaneClient *dataplane.KongClient

	CacheSyncTimeout time.Duration
}

ReferenceGrantReconciler reconciles a ReferenceGrant object.

func (*ReferenceGrantReconciler) Reconcile added in v2.6.0

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*ReferenceGrantReconciler) SetupWithManager added in v2.6.0

func (r *ReferenceGrantReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type RouteParentStatus added in v2.6.0

type RouteParentStatus = gatewayv1beta1.RouteParentStatus

type SectionName added in v2.6.0

type SectionName = gatewayv1beta1.SectionName

type TCPRoute added in v2.8.0

type TCPRoute = gatewayv1alpha2.TCPRoute

type TCPRouteReconciler added in v2.4.0

type TCPRouteReconciler struct {
	client.Client

	Log              logr.Logger
	Scheme           *runtime.Scheme
	DataplaneClient  *dataplane.KongClient
	CacheSyncTimeout time.Duration
	StatusQueue      *status.Queue
}

TCPRouteReconciler reconciles an TCPRoute object.

func (*TCPRouteReconciler) Reconcile added in v2.4.0

func (r *TCPRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*TCPRouteReconciler) SetupWithManager added in v2.4.0

func (r *TCPRouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TLSRoute added in v2.8.0

type TLSRoute = gatewayv1alpha2.TLSRoute

type TLSRouteReconciler added in v2.4.0

type TLSRouteReconciler struct {
	client.Client

	Log              logr.Logger
	Scheme           *runtime.Scheme
	DataplaneClient  *dataplane.KongClient
	CacheSyncTimeout time.Duration
	StatusQueue      *status.Queue
}

TLSRouteReconciler reconciles an TLSRoute object.

func (*TLSRouteReconciler) Reconcile added in v2.4.0

func (r *TLSRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*TLSRouteReconciler) SetupWithManager added in v2.4.0

func (r *TLSRouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type UDPRoute added in v2.8.0

type UDPRoute = gatewayv1alpha2.UDPRoute

type UDPRouteReconciler added in v2.3.0

type UDPRouteReconciler struct {
	client.Client

	Log              logr.Logger
	Scheme           *runtime.Scheme
	DataplaneClient  *dataplane.KongClient
	CacheSyncTimeout time.Duration
	StatusQueue      *status.Queue
}

UDPRouteReconciler reconciles an UDPRoute object.

func (*UDPRouteReconciler) Reconcile added in v2.3.0

func (r *UDPRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*UDPRouteReconciler) SetupWithManager added in v2.3.0

func (r *UDPRouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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