Documentation
¶
Index ¶
- func AreListenersProgrammed(gateway *gwtypes.Gateway) bool
- func GetDataPlaneServiceName(ctx context.Context, c client.Client, dataplane *operatorv1beta1.DataPlane, ...) (string, error)
- func IsAccepted(gateway *gwtypes.Gateway) bool
- func IsProgrammed(gateway *gwtypes.Gateway) bool
- func LabelObjectAsGatewayManaged(obj client.Object, gatewayName string)
- func ListControlPlanesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway) ([]gwtypes.ControlPlane, error)
- func ListDataPlanesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway) ([]operatorv1beta1.DataPlane, error)
- func ListGRPCRoutesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ...) ([]gwtypes.GRPCRoute, error)
- func ListHTTPRoutesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ...) ([]gwtypes.HTTPRoute, error)
- func ListKonnectExtensionsForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway) ([]konnectv1alpha2.KonnectExtension, error)
- func ListKonnectGatewayControlPlanesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway) ([]konnectv1alpha2.KonnectGatewayControlPlane, error)
- func ListNetworkPoliciesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway) ([]networkingv1.NetworkPolicy, error)
- func ListTCPRoutesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ...) ([]gwtypes.TCPRoute, error)
- func ListTLSRoutesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ...) ([]gwtypes.TLSRoute, error)
- func ListUDPRoutesForGateway(ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ...) ([]gwtypes.UDPRoute, error)
- func ProtocolPortsFromListeners(gw *gatewayv1.Gateway, sectionName *gatewayv1.SectionName, ...) []int32
- func ProtocolsFromListeners(gw *gatewayv1.Gateway, sectionName *gatewayv1.SectionName) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreListenersProgrammed ¶
AreListenersProgrammed indicates whether or not all the provided Gateway listeners were marked as Programmed by the controller.
func GetDataPlaneServiceName ¶
func GetDataPlaneServiceName( ctx context.Context, c client.Client, dataplane *operatorv1beta1.DataPlane, serviceTypeLabelValue consts.ServiceType, ) (string, error)
GetDataPlaneServiceName is a helper function that retrieves the name of the service owned by provided dataplane. It accepts a string as the last argument to specify which service to retrieve (proxy/admin).
func IsAccepted ¶
IsAccepted indicates whether or not the provided Gateway object was marked as scheduled by the controller.
func IsProgrammed ¶
IsProgrammed indicates whether or not the provided Gateway object was marked as Programmed by the controller.
func LabelObjectAsGatewayManaged ¶
LabelObjectAsGatewayManaged ensures that labels are set on the provided object to signal that it's owned by a Gateway resource and that its lifecycle is managed by this operator. gatewayName is the name of the owning Gateway and is set as the GEP-1762 gateway-name label.
func ListControlPlanesForGateway ¶
func ListControlPlanesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ) ([]gwtypes.ControlPlane, error)
ListControlPlanesForGateway is a helper function to map a list of ControlPlanes that are owned and managed by a Gateway.
func ListDataPlanesForGateway ¶
func ListDataPlanesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ) ([]operatorv1beta1.DataPlane, error)
ListDataPlanesForGateway is a helper function to map a list of DataPlanes that are owned and managed by a Gateway.
func ListGRPCRoutesForGateway ¶ added in v2.3.0
func ListGRPCRoutesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, opts ...client.ListOption, ) ([]gwtypes.GRPCRoute, error)
ListGRPCRoutesForGateway is a helper function which returns a list of GRPCRoutes that have the provided Gateway set as parent in their spec.parentRefs.
func ListHTTPRoutesForGateway ¶
func ListHTTPRoutesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, opts ...client.ListOption, ) ([]gwtypes.HTTPRoute, error)
ListHTTPRoutesForGateway is a helper function which returns a list of HTTPRoutes that have the provided Gateway set as parent in their status.
func ListKonnectExtensionsForGateway ¶ added in v2.1.1
func ListKonnectExtensionsForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ) ([]konnectv1alpha2.KonnectExtension, error)
ListKonnectExtensionsForGateway is a helper function to map a list of KonnectExtensions that are owned and managed by a Gateway.
func ListKonnectGatewayControlPlanesForGateway ¶ added in v2.1.1
func ListKonnectGatewayControlPlanesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ) ([]konnectv1alpha2.KonnectGatewayControlPlane, error)
ListKonnectGatewayControlPlanesForGateway is a helper function to map a list of KonnectGatewayControlPlanes that are owned and managed by a Gateway.
func ListNetworkPoliciesForGateway ¶
func ListNetworkPoliciesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, ) ([]networkingv1.NetworkPolicy, error)
ListNetworkPoliciesForGateway is a helper function that returns a list of NetworkPolicies that are owned and managed by a Gateway.
func ListTCPRoutesForGateway ¶ added in v2.3.0
func ListTCPRoutesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, opts ...client.ListOption, ) ([]gwtypes.TCPRoute, error)
ListTCPRoutesForGateway is a helper function which returns a list of TCPRoutes that have the provided Gateway set as parent in their status.
func ListTLSRoutesForGateway ¶ added in v2.2.0
func ListTLSRoutesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, opts ...client.ListOption, ) ([]gwtypes.TLSRoute, error)
ListTLSRoutesForGateway is a helper function which returns a list of TLSRoutes that have the provided Gateway set as parent in their status.
func ListUDPRoutesForGateway ¶ added in v2.3.0
func ListUDPRoutesForGateway( ctx context.Context, c client.Client, gateway *gwtypes.Gateway, opts ...client.ListOption, ) ([]gwtypes.UDPRoute, error)
ListUDPRoutesForGateway is a helper function which returns a list of UDPRoutes that have the provided Gateway set as parent in their spec.
func ProtocolPortsFromListeners ¶ added in v2.3.0
func ProtocolPortsFromListeners( gw *gatewayv1.Gateway, sectionName *gatewayv1.SectionName, port *gatewayv1.PortNumber, protocol ...gatewayv1.ProtocolType, ) []int32
ProtocolPortsFromListeners returns the ports of the Gateway's listeners for the specified protocol (or protocols - useful for HTTP and HTTPS), optionally filtered by the parentRef's sectionName and port. These ports become the destination ports of the translated Kong stream route so Kong can match incoming traffic by the port the parent Gateway listener accepts traffic on. Kong requires at least one of sources, destinations or snis on a route whose protocols include the specified protocol, so the destinations derived here are what make a protocol-specific KongRoute programmable.
Returns nil when no matching listener for the specified protocol is found.
func ProtocolsFromListeners ¶ added in v2.1.6
func ProtocolsFromListeners(gw *gatewayv1.Gateway, sectionName *gatewayv1.SectionName) []string
ProtocolsFromListeners derives Kong route protocol strings from a Gateway's listeners, optionally filtered by sectionName. It maps:
- HTTP → "http"
- HTTPS → "https"
Returns nil when no matching listeners are found.
Types ¶
This section is empty.