Documentation ¶
Index ¶
- Constants
- Variables
- func FromNamespacesPtr(fromNamespaces gwapiv1.FromNamespaces) *gwapiv1.FromNamespaces
- func GatewayClassOwnerLabel(name string) map[string]string
- func GatewayOwnerLabels(namespace, name string) map[string]string
- func GetBackendRef(b BackendRefContext) *gwapiv1.BackendRef
- func GetFilters(b BackendRefContext) any
- func GetHostnames(route RouteContext) []string
- func GetParentReferences(route RouteContext) []gwapiv1.ParentReference
- func GetRouteStatus(route RouteContext) *gwapiv1.RouteStatus
- func GetRouteType(route RouteContext) gwapiv1.Kind
- func GroupDerefOr(group *gwapiv1.Group, defaultGroup string) string
- func GroupPtr(name string) *gwapiv1.Group
- func HasReadyListener(listeners []*ListenerContext) bool
- func IsMergeGatewaysEnabled(resources *resource.Resources) bool
- func IsRefToGateway(routeNamespace gwapiv1.Namespace, parentRef gwapiv1.ParentReference, ...) bool
- func KindDerefOr(kind *gwapiv1.Kind, defaultKind string) string
- func KindPtr(name string) *gwapiv1.Kind
- func NamespaceDerefOr(namespace *gwapiv1.Namespace, defaultNamespace string) stringdeprecated
- func NamespacePtr(name string) *gwapiv1.Namespace
- func ObjectNamePtr(val string) *gwapiv1a2.ObjectName
- func OwnerLabels(gateway *gwapiv1.Gateway, mergeGateways bool) map[string]string
- func PortNumPtr(val int32) *gwapiv1.PortNumber
- func SectionNamePtr(name string) *gwapiv1.SectionName
- func ValidateGRPCRouteFilter(filter *gwapiv1.GRPCRouteFilter, extGKs ...schema.GroupKind) error
- func ValidateHTTPRouteFilter(filter *gwapiv1.HTTPRouteFilter, extGKs ...schema.GroupKind) error
- type AddressesTranslator
- type BackendRefContext
- type FiltersTranslator
- type GRPCRouteContext
- type GatewayContext
- type HTTPFilterIR
- type HTTPFiltersContext
- type HTTPFiltersTranslator
- type HTTPRouteContext
- type ListenerContext
- func (l *ListenerContext) AllowsKind(kind gwapiv1.RouteGroupKind) bool
- func (l *ListenerContext) AllowsNamespace(namespace *corev1.Namespace) bool
- func (l *ListenerContext) AttachedRoutes() int32
- func (l *ListenerContext) GetConditions() []metav1.Condition
- func (l *ListenerContext) IncrementAttachedRoutes()
- func (l *ListenerContext) IsReady() bool
- func (l *ListenerContext) SetSupportedKinds(kinds ...gwapiv1.RouteGroupKind)
- func (l *ListenerContext) SetTLSSecrets(tlsSecrets []*corev1.Secret)
- type ListenersTranslator
- type OpenIDConfig
- type RouteContext
- type RouteParentContext
- func (r *RouteParentContext) GetGateway() *GatewayContext
- func (r *RouteParentContext) HasCondition(route RouteContext, condType gwapiv1.RouteConditionType, ...) bool
- func (r *RouteParentContext) ResetConditions(route RouteContext)
- func (r *RouteParentContext) SetListeners(listeners ...*ListenerContext)
- type RoutesTranslator
- type TCPRouteContext
- type TLSRouteContext
- type TranslateResult
- type Translator
- func (t *Translator) GetRelevantGateways(resources *resource.Resources) []*GatewayContext
- func (t *Translator) InitIRs(gateways []*GatewayContext) (map[string]*ir.Xds, map[string]*ir.Infra)
- func (t *Translator) IsEnvoyServiceRouting(r *egv1a1.EnvoyProxy) bool
- func (t *Translator) ProcessAddresses(gateways []*GatewayContext, xdsIR resource.XdsIRMap, ...)
- func (t *Translator) ProcessBackendTrafficPolicies(resources *resource.Resources, gateways []*GatewayContext, ...) []*egv1a1.BackendTrafficPolicy
- func (t *Translator) ProcessBackends(backends []*egv1a1.Backend) []*egv1a1.Backend
- func (t *Translator) ProcessClientTrafficPolicies(resources *resource.Resources, gateways []*GatewayContext, ...) []*egv1a1.ClientTrafficPolicy
- func (t *Translator) ProcessEnvoyExtensionPolicies(envoyExtensionPolicies []*egv1a1.EnvoyExtensionPolicy, ...) []*egv1a1.EnvoyExtensionPolicy
- func (t *Translator) ProcessEnvoyPatchPolicies(envoyPatchPolicies []*egv1a1.EnvoyPatchPolicy, xdsIR resource.XdsIRMap)
- func (t *Translator) ProcessExtensionServerPolicies(policies []unstructured.Unstructured, gateways []*GatewayContext, ...) ([]unstructured.Unstructured, error)
- func (t *Translator) ProcessGRPCFilters(parentRef *RouteParentContext, route RouteContext, ...) *HTTPFiltersContext
- func (t *Translator) ProcessGRPCRoutes(grpcRoutes []*gwapiv1.GRPCRoute, gateways []*GatewayContext, ...) []*GRPCRouteContext
- func (t *Translator) ProcessHTTPFilters(parentRef *RouteParentContext, route RouteContext, ...) *HTTPFiltersContext
- func (t *Translator) ProcessHTTPRoutes(httpRoutes []*gwapiv1.HTTPRoute, gateways []*GatewayContext, ...) []*HTTPRouteContext
- func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource.XdsIRMap, ...)
- func (t *Translator) ProcessSecurityPolicies(securityPolicies []*egv1a1.SecurityPolicy, gateways []*GatewayContext, ...) []*egv1a1.SecurityPolicy
- func (t *Translator) ProcessTCPRoutes(tcpRoutes []*gwapiv1a2.TCPRoute, gateways []*GatewayContext, ...) []*TCPRouteContext
- func (t *Translator) ProcessTLSRoutes(tlsRoutes []*gwapiv1a2.TLSRoute, gateways []*GatewayContext, ...) []*TLSRouteContext
- func (t *Translator) ProcessUDPRoutes(udpRoutes []*gwapiv1a2.UDPRoute, gateways []*GatewayContext, ...) []*UDPRouteContext
- func (t *Translator) Translate(resources *resource.Resources) (*TranslateResult, error)
- type TranslatorManager
- type UDPRouteContext
- type XdsIRRoutes
Constants ¶
const ( TCPProtocol = "TCP" UDPProtocol = "UDP" L4Protocol = "L4" L7Protocol = "L7" )
const ( MinHTTP2InitialStreamWindowSize = 65535 // https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/protocol.proto#envoy-v3-api-field-config-core-v3-http2protocoloptions-initial-stream-window-size MaxHTTP2InitialStreamWindowSize = 2147483647 // https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/protocol.proto#envoy-v3-api-field-config-core-v3-http2protocoloptions-initial-stream-window-size MinHTTP2InitialConnectionWindowSize = MinHTTP2InitialStreamWindowSize MaxHTTP2InitialConnectionWindowSize = MaxHTTP2InitialStreamWindowSize )
const ( GroupMultiClusterService = "multicluster.x-k8s.io" // OwningGatewayNamespaceLabel is the owner reference label used for managed infra. // The value should be the namespace of the accepted Envoy Gateway. OwningGatewayNamespaceLabel = "gateway.envoyproxy.io/owning-gateway-namespace" OwningGatewayClassLabel = "gateway.envoyproxy.io/owning-gatewayclass" // OwningGatewayNameLabel is the owner reference label used for managed infra. // The value should be the name of the accepted Envoy Gateway. OwningGatewayNameLabel = "gateway.envoyproxy.io/owning-gateway-name" )
const (
// Use an invalid string to represent all sections (listeners) within a Gateway
AllSections = "/"
)
const ( // Following the description in `timeout` section of https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto // Request timeout, which is defined as Duration, specifies the upstream timeout for the route // If not specified, the default is 15s HTTPRequestTimeout = "15s" )
const (
MaxConsistentHashTableSize = 5000011 // https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/cluster.proto#config-cluster-v3-cluster-maglevlbconfig
)
Variables ¶
var ( PathMatchTypeDerefOr = ptr.Deref[gwapiv1.PathMatchType] GRPCMethodMatchTypeDerefOr = ptr.Deref[gwapiv1.GRPCMethodMatchType] HeaderMatchTypeDerefOr = ptr.Deref[gwapiv1.HeaderMatchType] GRPCHeaderMatchTypeDerefOr = ptr.Deref[gwapiv1.GRPCHeaderMatchType] QueryParamMatchTypeDerefOr = ptr.Deref[gwapiv1.QueryParamMatchType] )
Functions ¶
func FromNamespacesPtr ¶
func FromNamespacesPtr(fromNamespaces gwapiv1.FromNamespaces) *gwapiv1.FromNamespaces
func GatewayClassOwnerLabel ¶ added in v0.6.0
GatewayClassOwnerLabel returns the GatewayCLass Owner label using the provided name as the value.
func GatewayOwnerLabels ¶
GatewayOwnerLabels returns the Gateway Owner labels using the provided namespace and name as the values.
func GetBackendRef ¶ added in v1.0.0
func GetBackendRef(b BackendRefContext) *gwapiv1.BackendRef
func GetFilters ¶ added in v1.0.0
func GetFilters(b BackendRefContext) any
func GetHostnames ¶ added in v0.5.0
func GetHostnames(route RouteContext) []string
GetHostnames returns the hosts targeted by the Route object.
func GetParentReferences ¶ added in v0.5.0
func GetParentReferences(route RouteContext) []gwapiv1.ParentReference
GetParentReferences returns the ParentReference of the Route object.
func GetRouteStatus ¶ added in v0.5.0
func GetRouteStatus(route RouteContext) *gwapiv1.RouteStatus
GetRouteStatus returns the RouteStatus object associated with the Route.
func GetRouteType ¶ added in v0.5.0
func GetRouteType(route RouteContext) gwapiv1.Kind
GetRouteType returns the Kind of the Route object, HTTPRoute, TLSRoute, TCPRoute, UDPRoute etc.
func HasReadyListener ¶
func HasReadyListener(listeners []*ListenerContext) bool
HasReadyListener returns true if at least one Listener in the provided list has a condition of "Ready: true", and false otherwise.
func IsMergeGatewaysEnabled ¶ added in v1.1.0
func IsRefToGateway ¶
func IsRefToGateway(routeNamespace gwapiv1.Namespace, parentRef gwapiv1.ParentReference, gateway types.NamespacedName) bool
IsRefToGateway returns whether the provided parent ref is a reference to a Gateway with the given namespace/name, irrespective of whether a section/listener name has been specified (i.e. a parent ref to a listener on the specified gateway will return "true").
func NamespaceDerefOr
deprecated
func NamespacePtr ¶
func ObjectNamePtr ¶
func ObjectNamePtr(val string) *gwapiv1a2.ObjectName
func OwnerLabels ¶ added in v1.1.0
OwnerLabels returns the owner labels based on the mergeGateways setting
func PortNumPtr ¶
func PortNumPtr(val int32) *gwapiv1.PortNumber
func SectionNamePtr ¶
func SectionNamePtr(name string) *gwapiv1.SectionName
func ValidateGRPCRouteFilter ¶ added in v0.3.0
func ValidateGRPCRouteFilter(filter *gwapiv1.GRPCRouteFilter, extGKs ...schema.GroupKind) error
ValidateGRPCRouteFilter validates the provided filter within GRPCRoute.
func ValidateHTTPRouteFilter ¶ added in v0.3.0
func ValidateHTTPRouteFilter(filter *gwapiv1.HTTPRouteFilter, extGKs ...schema.GroupKind) error
ValidateHTTPRouteFilter validates the provided filter within HTTPRoute.
Types ¶
type AddressesTranslator ¶ added in v0.5.0
type AddressesTranslator interface {
ProcessAddresses(gateways []*GatewayContext, xdsIR resource.XdsIRMap, infraIR resource.InfraIRMap)
}
type BackendRefContext ¶ added in v1.0.0
type BackendRefContext any
BackendRefContext represents a generic BackendRef object (HTTPBackendRef, GRPCBackendRef or BackendRef itself)
type FiltersTranslator ¶ added in v0.3.0
type FiltersTranslator interface { HTTPFiltersTranslator }
type GRPCRouteContext ¶ added in v0.3.0
type GRPCRouteContext struct { // GatewayControllerName is the name of the Gateway API controller. GatewayControllerName string *gwapiv1.GRPCRoute ParentRefs map[gwapiv1.ParentReference]*RouteParentContext }
GRPCRouteContext wraps a GRPCRoute and provides helper methods for accessing the route's parents.
type GatewayContext ¶
GatewayContext wraps a Gateway and provides helper methods for setting conditions, accessing Listeners, etc.
func (*GatewayContext) ResetListeners ¶ added in v0.3.0
func (g *GatewayContext) ResetListeners(resource *resource.Resources)
ResetListeners resets the listener statuses and re-generates the GatewayContext ListenerContexts from the Gateway spec.
type HTTPFilterIR ¶ added in v0.3.0
type HTTPFilterIR struct { DirectResponse *ir.CustomResponse RedirectResponse *ir.Redirect URLRewrite *ir.URLRewrite AddRequestHeaders []ir.AddHeader RemoveRequestHeaders []string AddResponseHeaders []ir.AddHeader RemoveResponseHeaders []string Mirrors []*ir.RouteDestination ExtensionRefs []*ir.UnstructuredRef }
HTTPFilterIR contains the ir processing results.
type HTTPFiltersContext ¶ added in v0.3.0
type HTTPFiltersContext struct { *HTTPFilterIR ParentRef *RouteParentContext Route RouteContext RuleIdx int }
HTTPFiltersContext is the context of http filters processing.
type HTTPFiltersTranslator ¶ added in v0.3.0
type HTTPFiltersTranslator interface {
// contains filtered or unexported methods
}
type HTTPRouteContext ¶
type HTTPRouteContext struct { // GatewayControllerName is the name of the Gateway API controller. GatewayControllerName string *gwapiv1.HTTPRoute ParentRefs map[gwapiv1.ParentReference]*RouteParentContext }
HTTPRouteContext wraps an HTTPRoute and provides helper methods for accessing the route's parents.
type ListenerContext ¶
ListenerContext wraps a Listener and provides helper methods for setting conditions and other status information on the associated Gateway, etc.
func GetReferencedListeners ¶
func GetReferencedListeners(routeNamespace gwapiv1.Namespace, parentRef gwapiv1.ParentReference, gateways []*GatewayContext) (bool, []*ListenerContext)
GetReferencedListeners returns whether a given parent ref references a Gateway in the given list, and if so, a list of the Listeners within that Gateway that are included by the parent ref (either one specific Listener, or all Listeners in the Gateway, depending on whether section name is specified or not).
func (*ListenerContext) AllowsKind ¶
func (l *ListenerContext) AllowsKind(kind gwapiv1.RouteGroupKind) bool
func (*ListenerContext) AllowsNamespace ¶
func (l *ListenerContext) AllowsNamespace(namespace *corev1.Namespace) bool
func (*ListenerContext) AttachedRoutes ¶ added in v0.3.0
func (l *ListenerContext) AttachedRoutes() int32
func (*ListenerContext) GetConditions ¶
func (l *ListenerContext) GetConditions() []metav1.Condition
func (*ListenerContext) IncrementAttachedRoutes ¶
func (l *ListenerContext) IncrementAttachedRoutes()
func (*ListenerContext) IsReady ¶
func (l *ListenerContext) IsReady() bool
func (*ListenerContext) SetSupportedKinds ¶
func (l *ListenerContext) SetSupportedKinds(kinds ...gwapiv1.RouteGroupKind)
func (*ListenerContext) SetTLSSecrets ¶ added in v0.4.0
func (l *ListenerContext) SetTLSSecrets(tlsSecrets []*corev1.Secret)
type ListenersTranslator ¶ added in v0.3.0
type ListenersTranslator interface {
ProcessListeners(gateways []*GatewayContext, xdsIR resource.XdsIRMap, infraIR resource.InfraIRMap, resources *resource.Resources)
}
type OpenIDConfig ¶ added in v1.0.0
type RouteContext ¶
RouteContext represents a generic Route object (HTTPRoute, TLSRoute, etc.) that can reference Gateway objects.
type RouteParentContext ¶
type RouteParentContext struct { *gwapiv1.ParentReference // TODO: [v1alpha2-gwapiv1] This can probably be replaced with // a single field pointing to *gwapiv1.RouteStatus. HTTPRoute *gwapiv1.HTTPRoute GRPCRoute *gwapiv1.GRPCRoute TLSRoute *gwapiv1a2.TLSRoute TCPRoute *gwapiv1a2.TCPRoute UDPRoute *gwapiv1a2.UDPRoute // contains filtered or unexported fields }
RouteParentContext wraps a ParentReference and provides helper methods for setting conditions and other status information on the associated HTTPRoute, TLSRoute etc.
func GetRouteParentContext ¶ added in v0.5.0
func GetRouteParentContext(route RouteContext, forParentRef gwapiv1.ParentReference) *RouteParentContext
GetRouteParentContext returns RouteParentContext by using the Route objects' ParentReference. It creates a new RouteParentContext and add a new RouteParentStatus to the Route's Status if the ParentReference is not found.
func (*RouteParentContext) GetGateway ¶ added in v1.1.0
func (r *RouteParentContext) GetGateway() *GatewayContext
GetGateway returns the GatewayContext if parent resource is a gateway.
func (*RouteParentContext) HasCondition ¶ added in v0.4.0
func (r *RouteParentContext) HasCondition(route RouteContext, condType gwapiv1.RouteConditionType, status metav1.ConditionStatus) bool
func (*RouteParentContext) ResetConditions ¶
func (r *RouteParentContext) ResetConditions(route RouteContext)
func (*RouteParentContext) SetListeners ¶
func (r *RouteParentContext) SetListeners(listeners ...*ListenerContext)
type RoutesTranslator ¶ added in v0.3.0
type RoutesTranslator interface { ProcessHTTPRoutes(httpRoutes []*gwapiv1.HTTPRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*HTTPRouteContext ProcessGRPCRoutes(grpcRoutes []*gwapiv1.GRPCRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*GRPCRouteContext ProcessTLSRoutes(tlsRoutes []*gwapiv1a2.TLSRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*TLSRouteContext ProcessTCPRoutes(tcpRoutes []*gwapiv1a2.TCPRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*TCPRouteContext ProcessUDPRoutes(udpRoutes []*gwapiv1a2.UDPRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*UDPRouteContext }
type TCPRouteContext ¶ added in v0.3.0
type TCPRouteContext struct { // GatewayControllerName is the name of the Gateway API controller. GatewayControllerName string *gwapiv1a2.TCPRoute ParentRefs map[gwapiv1.ParentReference]*RouteParentContext }
TCPRouteContext wraps a TCPRoute and provides helper methods for accessing the route's parents.
type TLSRouteContext ¶
type TLSRouteContext struct { // GatewayControllerName is the name of the Gateway API controller. GatewayControllerName string *gwapiv1a2.TLSRoute ParentRefs map[gwapiv1.ParentReference]*RouteParentContext }
TLSRouteContext wraps a TLSRoute and provides helper methods for accessing the route's parents.
type TranslateResult ¶
type Translator ¶
type Translator struct { // GatewayControllerName is the name of the Gateway API controller GatewayControllerName string // GatewayClassName is the name of the GatewayClass // to process Gateways for. GatewayClassName gwapiv1.ObjectName // GlobalRateLimitEnabled is true when global // ratelimiting has been configured by the admin. GlobalRateLimitEnabled bool // EndpointRoutingDisabled can be set to true to use // the Service Cluster IP for routing to the backend // instead. EndpointRoutingDisabled bool // MergeGateways is true when all Gateway Listeners // should be merged under the parent GatewayClass. MergeGateways bool // EnvoyPatchPolicyEnabled when the EnvoyPatchPolicy // feature is enabled. EnvoyPatchPolicyEnabled bool // BackendEnabled when the Backend feature is enabled. BackendEnabled bool // ExtensionGroupKinds stores the group/kind for all resources // introduced by an Extension so that the translator can // store referenced resources in the IR for later use. ExtensionGroupKinds []schema.GroupKind // Namespace is the namespace that Envoy Gateway runs in. Namespace string // WasmCache is the cache for Wasm modules. WasmCache wasm.Cache }
Translator translates Gateway API resources to IRs and computes status for Gateway API resources.
func (*Translator) GetRelevantGateways ¶
func (t *Translator) GetRelevantGateways(resources *resource.Resources) []*GatewayContext
GetRelevantGateways returns GatewayContexts, containing a copy of the original Gateway with the Listener statuses reset.
func (*Translator) InitIRs ¶ added in v0.6.0
func (t *Translator) InitIRs(gateways []*GatewayContext) (map[string]*ir.Xds, map[string]*ir.Infra)
InitIRs checks if mergeGateways is enabled in EnvoyProxy config and initializes XdsIR and InfraIR maps with adequate keys.
func (*Translator) IsEnvoyServiceRouting ¶ added in v1.1.0
func (t *Translator) IsEnvoyServiceRouting(r *egv1a1.EnvoyProxy) bool
IsEnvoyServiceRouting returns true if EnvoyProxy.Spec.RoutingType == ServiceRoutingType or, alternatively, if Translator.EndpointRoutingDisabled has been explicitly set to true; otherwise, it returns false.
func (*Translator) ProcessAddresses ¶ added in v0.5.0
func (t *Translator) ProcessAddresses(gateways []*GatewayContext, xdsIR resource.XdsIRMap, infraIR resource.InfraIRMap)
func (*Translator) ProcessBackendTrafficPolicies ¶ added in v0.6.0
func (t *Translator) ProcessBackendTrafficPolicies(resources *resource.Resources, gateways []*GatewayContext, routes []RouteContext, xdsIR resource.XdsIRMap, ) []*egv1a1.BackendTrafficPolicy
func (*Translator) ProcessBackends ¶ added in v1.1.0
func (t *Translator) ProcessBackends(backends []*egv1a1.Backend) []*egv1a1.Backend
func (*Translator) ProcessClientTrafficPolicies ¶ added in v1.0.0
func (t *Translator) ProcessClientTrafficPolicies( resources *resource.Resources, gateways []*GatewayContext, xdsIR resource.XdsIRMap, infraIR resource.InfraIRMap, ) []*egv1a1.ClientTrafficPolicy
func (*Translator) ProcessEnvoyExtensionPolicies ¶ added in v1.1.0
func (t *Translator) ProcessEnvoyExtensionPolicies(envoyExtensionPolicies []*egv1a1.EnvoyExtensionPolicy, gateways []*GatewayContext, routes []RouteContext, resources *resource.Resources, xdsIR resource.XdsIRMap, ) []*egv1a1.EnvoyExtensionPolicy
func (*Translator) ProcessEnvoyPatchPolicies ¶ added in v0.5.0
func (t *Translator) ProcessEnvoyPatchPolicies(envoyPatchPolicies []*egv1a1.EnvoyPatchPolicy, xdsIR resource.XdsIRMap)
func (*Translator) ProcessExtensionServerPolicies ¶ added in v1.1.0
func (t *Translator) ProcessExtensionServerPolicies(policies []unstructured.Unstructured, gateways []*GatewayContext, xdsIR resource.XdsIRMap, ) ([]unstructured.Unstructured, error)
func (*Translator) ProcessGRPCFilters ¶ added in v0.3.0
func (t *Translator) ProcessGRPCFilters(parentRef *RouteParentContext, route RouteContext, filters []gwapiv1.GRPCRouteFilter, resources *resource.Resources, ) *HTTPFiltersContext
ProcessGRPCFilters translates gateway api grpc filters to IRs.
func (*Translator) ProcessGRPCRoutes ¶ added in v0.3.0
func (t *Translator) ProcessGRPCRoutes(grpcRoutes []*gwapiv1.GRPCRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*GRPCRouteContext
func (*Translator) ProcessHTTPFilters ¶ added in v0.3.0
func (t *Translator) ProcessHTTPFilters(parentRef *RouteParentContext, route RouteContext, filters []gwapiv1.HTTPRouteFilter, ruleIdx int, resources *resource.Resources, ) *HTTPFiltersContext
ProcessHTTPFilters translates gateway api http filters to IRs.
func (*Translator) ProcessHTTPRoutes ¶
func (t *Translator) ProcessHTTPRoutes(httpRoutes []*gwapiv1.HTTPRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*HTTPRouteContext
func (*Translator) ProcessListeners ¶
func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource.XdsIRMap, infraIR resource.InfraIRMap, resources *resource.Resources)
func (*Translator) ProcessSecurityPolicies ¶ added in v0.6.0
func (t *Translator) ProcessSecurityPolicies(securityPolicies []*egv1a1.SecurityPolicy, gateways []*GatewayContext, routes []RouteContext, resources *resource.Resources, xdsIR resource.XdsIRMap, ) []*egv1a1.SecurityPolicy
func (*Translator) ProcessTCPRoutes ¶ added in v0.3.0
func (t *Translator) ProcessTCPRoutes(tcpRoutes []*gwapiv1a2.TCPRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap, ) []*TCPRouteContext
func (*Translator) ProcessTLSRoutes ¶
func (t *Translator) ProcessTLSRoutes(tlsRoutes []*gwapiv1a2.TLSRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap) []*TLSRouteContext
func (*Translator) ProcessUDPRoutes ¶ added in v0.3.0
func (t *Translator) ProcessUDPRoutes(udpRoutes []*gwapiv1a2.UDPRoute, gateways []*GatewayContext, resources *resource.Resources, xdsIR resource.XdsIRMap, ) []*UDPRouteContext
func (*Translator) Translate ¶
func (t *Translator) Translate(resources *resource.Resources) (*TranslateResult, error)
type TranslatorManager ¶ added in v0.3.0
type TranslatorManager interface { Translate(resources *resource.Resources) (*TranslateResult, error) GetRelevantGateways(resources *resource.Resources) []*GatewayContext RoutesTranslator ListenersTranslator AddressesTranslator FiltersTranslator }
type UDPRouteContext ¶ added in v0.3.0
type UDPRouteContext struct { // GatewayControllerName is the name of the Gateway API controller. GatewayControllerName string *gwapiv1a2.UDPRoute ParentRefs map[gwapiv1.ParentReference]*RouteParentContext }
UDPRouteContext wraps a UDPRoute and provides helper methods for accessing the route's parents.
type XdsIRRoutes ¶
func (XdsIRRoutes) Len ¶
func (x XdsIRRoutes) Len() int
func (XdsIRRoutes) Less ¶
func (x XdsIRRoutes) Less(i, j int) bool
func (XdsIRRoutes) Swap ¶
func (x XdsIRRoutes) Swap(i, j int)
Source Files ¶
- address.go
- backend.go
- backendtlspolicy.go
- backendtrafficpolicy.go
- clienttrafficpolicy.go
- clustersettings.go
- contexts.go
- envoyextensionpolicy.go
- envoypatchpolicy.go
- ext_service.go
- extensionserverpolicy.go
- filters.go
- helpers.go
- http.go
- listener.go
- route.go
- securitypolicy.go
- sort.go
- tls.go
- translator.go
- validate.go