Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // HasExtension checks to see whether a given Group and Kind has an // associated extension registered for it. // // If a Group and Kind is registered with an extension, then it should // return true, otherwise return false. HasExtension(g gwapiv1.Group, k gwapiv1.Kind) bool // GetPreXDSHookClient checks if the registered extension makes use of a particular hook type that modifies inputs // that are used to generate an xDS resource. // If the extension makes use of the hook then the XDS Hook Client is returned. If it does not support // the hook type then nil is returned GetPreXDSHookClient(xdsHookType egv1a1.XDSTranslatorHook) (XDSHookClient, error) // GetPostXDSHookClient checks if the registered extension makes use of a particular hook type that modifies // xDS resources after they are generated by Envoy Gateway. // If the extension makes use of the hook then the XDS Hook Client is returned. If it does not support // the hook type then nil is returned GetPostXDSHookClient(xdsHookType egv1a1.XDSTranslatorHook) (XDSHookClient, error) // FailOpen returns true if the extension manager is configured to fail open, and false otherwise. FailOpen() bool // GetTranslationHookConfig returns the translation hook configuration. GetTranslationHookConfig() *egv1a1.TranslationConfig }
Manager handles and maintains registered extensions and returns clients for different Hook types.
type XDSHookClient ¶
type XDSHookClient interface { // PostRouteModifyHook provides a way for extensions to modify a route generated by Envoy Gateway before it is finalized. // Doing so allows extensions to configure/modify route fields configured by Envoy Gateway and also to configure the // Route's TypedPerFilterConfig which may be desirable to do things such as pass settings and information to // ext_authz filters. // PostRouteModifyHook also passes a list of Unstructured data for the externalRefs owned by the extension on the HTTPRoute that // created this xDS route // PostRouteModifyHook will only be executed if an extension is loaded and only on Routes which were generated from an HTTPRoute // that uses extension resources as externalRef filters. PostRouteModifyHook(route *route.Route, routeHostnames []string, extensionResources []*unstructured.Unstructured) (*route.Route, error) // PostClusterModifyHook provides a way for extensions to modify a cluster generated by Envoy Gateway for custom backends. // This allows extensions to modify cluster configurations for custom backend types while letting Envoy Gateway // control cluster naming and basic configuration. This hook is called when custom backend resources are used // in HTTPRoute backendRefs. The hook is called for each individual cluster after it's built. // // Execution order: PostClusterModifyHook is called BEFORE PostTranslateModifyHook. // - PostClusterModifyHook: Called per-cluster during cluster building phase for custom backends only // - PostTranslateModifyHook: Called once after all clusters/secrets are built, can add/remove clusters globally PostClusterModifyHook(cluster *cluster.Cluster, extensionResources []*unstructured.Unstructured) (*cluster.Cluster, error) // PostVirtualHostModifyHook provides a way for extensions to modify a VirtualHost generated by Envoy Gateway before it is finalized. // An extension can also make use of this hook to generate and insert entirely new Routes not generated by Envoy Gateway. // PostVirtualHostModifyHook is always executed when an extension is loaded. An extension may return nil to not make any changes // to it. PostVirtualHostModifyHook(*route.VirtualHost) (*route.VirtualHost, error) // PostHTTPListenerModifyHook allows an extension to make changes to a Listener generated by Envoy Gateway before it is finalized. // PostHTTPListenerModifyHook is always executed when an extension is loaded. An extension may return nil // in order to not make any changes to it. PostHTTPListenerModifyHook(listener *listener.Listener, extensionResources []*unstructured.Unstructured) (*listener.Listener, error) // PostTranslateModifyHook allows an extension to modify the clusters, secrets, listeners, and routes in the xDS config. // This allows for inserting clusters, listeners, and routes that may change along with extension specific configuration to be dynamically created rather than // using custom bootstrap config which would be sufficient for resources that are static and not prone to have their configurations changed. // An example of how this may be used is to inject a cluster that will be used by an ext_authz http filter created by the extension, // or to modify listeners to add custom filters, or to modify routes for advanced routing logic. // The list of clusters, secrets, listeners, and routes returned by the extension are used as the final list of all these resources // PostTranslateModifyHook is always executed when an extension is loaded PostTranslateModifyHook([]*cluster.Cluster, []*tls.Secret, []*listener.Listener, []*route.RouteConfiguration, []*ir.UnstructuredRef) ([]*cluster.Cluster, []*tls.Secret, []*listener.Listener, []*route.RouteConfiguration, error) }
Click to show internal directories.
Click to hide internal directories.