Documentation ¶
Index ¶
- Constants
- func CertificateRef(name, namespace string) gatewayapi_v1.SecretObjectReference
- func GRPCHeaderMatch(matchType gatewayapi_v1.HeaderMatchType, name, value string) []gatewayapi_v1alpha2.GRPCHeaderMatch
- func GRPCMethodMatch(matchType gatewayapi_v1alpha2.GRPCMethodMatchType, service, method string) *gatewayapi_v1alpha2.GRPCMethodMatch
- func GRPCRouteBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1alpha2.GRPCBackendRef
- func GatewayListenerParentRef(namespace, name, listener string, port int) gatewayapi_v1.ParentReference
- func GatewayParentRef(namespace, name string) gatewayapi_v1.ParentReference
- func HTTPBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1.HTTPBackendRef
- func HTTPBackendRefs(backendRefs ...[]gatewayapi_v1.HTTPBackendRef) []gatewayapi_v1.HTTPBackendRef
- func HTTPHeaderMatch(matchType gatewayapi_v1.HeaderMatchType, name, value string) []gatewayapi_v1.HTTPHeaderMatch
- func HTTPQueryParamMatches(namesAndValues map[string]string) []gatewayapi_v1.HTTPQueryParamMatch
- func HTTPRouteMatch(pathType gatewayapi_v1.PathMatchType, value string) []gatewayapi_v1.HTTPRouteMatch
- func IsRefToGateway(parentRef gatewayapi_v1.ParentReference, gateway types.NamespacedName) bool
- func IsValidHostname(hostname string) error
- func ServiceBackendObjectRef(name string, port int) gatewayapi_v1.BackendObjectReference
- func TLSRouteBackendRef(serviceName string, port int, weight *int32) []gatewayapi_v1alpha2.BackendRef
- func TLSRouteBackendRefs(backendRefs ...[]gatewayapi_v1alpha2.BackendRef) []gatewayapi_v1alpha2.BackendRef
- type ListenerPort
- type ValidateListenersResult
Constants ¶
const ContourHTTPSProtocolType = "projectcontour.io/https"
ContourHTTPSProtocolType is the protocol for an HTTPS Listener that is to be used with HTTPProxy/Ingress, where the TLS details are provided on the HTTPProxy/Ingress rather than on the Listener.
Variables ¶
This section is empty.
Functions ¶
func CertificateRef ¶
func CertificateRef(name, namespace string) gatewayapi_v1.SecretObjectReference
func GRPCHeaderMatch ¶ added in v1.25.0
func GRPCHeaderMatch(matchType gatewayapi_v1.HeaderMatchType, name, value string) []gatewayapi_v1alpha2.GRPCHeaderMatch
func GRPCMethodMatch ¶ added in v1.25.0
func GRPCMethodMatch(matchType gatewayapi_v1alpha2.GRPCMethodMatchType, service, method string) *gatewayapi_v1alpha2.GRPCMethodMatch
func GRPCRouteBackendRef ¶ added in v1.25.0
func GRPCRouteBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1alpha2.GRPCBackendRef
func GatewayListenerParentRef ¶
func GatewayListenerParentRef(namespace, name, listener string, port int) gatewayapi_v1.ParentReference
func GatewayParentRef ¶
func GatewayParentRef(namespace, name string) gatewayapi_v1.ParentReference
func HTTPBackendRef ¶
func HTTPBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1.HTTPBackendRef
func HTTPBackendRefs ¶
func HTTPBackendRefs(backendRefs ...[]gatewayapi_v1.HTTPBackendRef) []gatewayapi_v1.HTTPBackendRef
func HTTPHeaderMatch ¶
func HTTPHeaderMatch(matchType gatewayapi_v1.HeaderMatchType, name, value string) []gatewayapi_v1.HTTPHeaderMatch
func HTTPQueryParamMatches ¶ added in v1.22.0
func HTTPQueryParamMatches(namesAndValues map[string]string) []gatewayapi_v1.HTTPQueryParamMatch
func HTTPRouteMatch ¶
func HTTPRouteMatch(pathType gatewayapi_v1.PathMatchType, value string) []gatewayapi_v1.HTTPRouteMatch
func IsRefToGateway ¶ added in v1.22.0
func IsRefToGateway(parentRef gatewayapi_v1.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 IsValidHostname ¶ added in v1.21.0
IsValidHostname validates that a given hostname is syntactically valid. It returns nil if valid and an error if not valid.
func ServiceBackendObjectRef ¶
func ServiceBackendObjectRef(name string, port int) gatewayapi_v1.BackendObjectReference
func TLSRouteBackendRef ¶
func TLSRouteBackendRef(serviceName string, port int, weight *int32) []gatewayapi_v1alpha2.BackendRef
func TLSRouteBackendRefs ¶
func TLSRouteBackendRefs(backendRefs ...[]gatewayapi_v1alpha2.BackendRef) []gatewayapi_v1alpha2.BackendRef
Types ¶
type ListenerPort ¶ added in v1.26.0
type ValidateListenersResult ¶ added in v1.21.0
type ValidateListenersResult struct { // ListenerNames is a map from Gateway Listener name // to DAG/Envoy Listener name. All Gateway Listeners // that share a port map to the same DAG/Envoy Listener // name. ListenerNames map[string]string // Ports is a list of ports to listen on. Ports []ListenerPort // InvalidListenerConditions is a map from Gateway Listener name // to a condition to set, if the Listener is invalid. InvalidListenerConditions map[gatewayapi_v1.SectionName]meta_v1.Condition }
func ValidateListeners ¶ added in v1.21.0
func ValidateListeners(listeners []gatewayapi_v1.Listener) ValidateListenersResult
ValidateListeners validates protocols, ports and hostnames on a set of listeners. It ensures that:
- protocols are supported
- hostnames are syntactically valid
- listeners on each port have mutually compatible protocols
- listeners on each port have unique hostnames
It returns a Listener name map, the ports to use, and conditions for all invalid listeners. If a listener is not in the "InvalidListenerConditions" map, it is assumed to be valid according to the above rules.