Documentation ¶
Index ¶
- func AddressTypePtr(addressType gatewayapi_v1beta1.AddressType) *gatewayapi_v1beta1.AddressType
- func CertificateRef(name, namespace string) gatewayapi_v1beta1.SecretObjectReference
- func DowngradeRouteParentStatuses(routeParentStatuses []gatewayapi_v1beta1.RouteParentStatus) []gatewayapi_v1alpha2.RouteParentStatus
- func FromNamespacesPtr(val gatewayapi_v1beta1.FromNamespaces) *gatewayapi_v1beta1.FromNamespaces
- func GatewayAddressTypePtr(addr gatewayapi_v1beta1.AddressType) *gatewayapi_v1beta1.AddressType
- func GatewayListenerParentRef(namespace, name, listener string) gatewayapi_v1beta1.ParentReference
- func GatewayParentRef(namespace, name string) gatewayapi_v1beta1.ParentReference
- func GatewayParentRefV1Alpha2(namespace, name string) gatewayapi_v1alpha2.ParentReference
- func GroupPtr(group string) *gatewayapi_v1beta1.Group
- func GroupPtrV1Alpha2(group string) *gatewayapi_v1alpha2.Group
- func HTTPBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1beta1.HTTPBackendRef
- func HTTPBackendRefs(backendRefs ...[]gatewayapi_v1beta1.HTTPBackendRef) []gatewayapi_v1beta1.HTTPBackendRef
- func HTTPHeaderMatch(matchType gatewayapi_v1beta1.HeaderMatchType, name, value string) []gatewayapi_v1beta1.HTTPHeaderMatch
- func HTTPMethodPtr(method gatewayapi_v1beta1.HTTPMethod) *gatewayapi_v1beta1.HTTPMethod
- func HTTPQueryParamMatches(namesAndValues map[string]string) []gatewayapi_v1beta1.HTTPQueryParamMatch
- func HTTPRouteMatch(pathType gatewayapi_v1beta1.PathMatchType, value string) []gatewayapi_v1beta1.HTTPRouteMatch
- func HeaderMatchTypePtr(val gatewayapi_v1beta1.HeaderMatchType) *gatewayapi_v1beta1.HeaderMatchType
- func HostnameDeref(hostname *gatewayapi_v1beta1.Hostname) string
- func IsRefToGateway(parentRef gatewayapi_v1beta1.ParentReference, gateway types.NamespacedName) bool
- func IsValidHostname(hostname string) error
- func KindPtr(kind string) *gatewayapi_v1beta1.Kind
- func KindPtrV1Alpha2(kind string) *gatewayapi_v1alpha2.Kind
- func ListenerHostname(host string) *gatewayapi_v1beta1.Hostname
- func NamespacePtr(namespace string) *gatewayapi_v1beta1.Namespace
- func NamespacePtrV1Alpha2(namespace string) *gatewayapi_v1alpha2.Namespace
- func ObjectNamePtr(name string) *gatewayapi_v1alpha2.ObjectName
- func PathMatchTypePtr(val gatewayapi_v1beta1.PathMatchType) *gatewayapi_v1beta1.PathMatchType
- func PortNumPtr(port int) *gatewayapi_v1beta1.PortNumber
- func PortNumPtrV1Alpha2(port int) *gatewayapi_v1alpha2.PortNumber
- func PreciseHostname(host string) *gatewayapi_v1beta1.PreciseHostname
- func QueryParamMatchTypePtr(val gatewayapi_v1beta1.QueryParamMatchType) *gatewayapi_v1beta1.QueryParamMatchType
- func SectionNamePtr(sectionName string) *gatewayapi_v1beta1.SectionName
- func SectionNamePtrV1Alpha2(sectionName string) *gatewayapi_v1alpha2.SectionName
- func ServiceBackendObjectRef(name string, port int) gatewayapi_v1beta1.BackendObjectReference
- func TLSModeTypePtr(mode gatewayapi_v1beta1.TLSModeType) *gatewayapi_v1beta1.TLSModeType
- func TLSRouteBackendRef(serviceName string, port int, weight *int32) []gatewayapi_v1alpha2.BackendRef
- func TLSRouteBackendRefs(backendRefs ...[]gatewayapi_v1alpha2.BackendRef) []gatewayapi_v1alpha2.BackendRef
- func UpgradeBackendRef(backendRef gatewayapi_v1alpha2.BackendRef) gatewayapi_v1beta1.BackendRef
- func UpgradeHostnames(hostnames []gatewayapi_v1alpha2.Hostname) []gatewayapi_v1beta1.Hostname
- func UpgradeParentRef(parentRef gatewayapi_v1alpha2.ParentReference) gatewayapi_v1beta1.ParentReference
- func UpgradeParentRefs(parentRefs []gatewayapi_v1alpha2.ParentReference) []gatewayapi_v1beta1.ParentReference
- func UpgradeRouteParentStatus(routeParentStatus gatewayapi_v1alpha2.RouteParentStatus) gatewayapi_v1beta1.RouteParentStatus
- func UpgradeRouteParentStatuses(routeParentStatuses []gatewayapi_v1alpha2.RouteParentStatus) []gatewayapi_v1beta1.RouteParentStatus
- type ValidateListenersResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressTypePtr ¶
func AddressTypePtr(addressType gatewayapi_v1beta1.AddressType) *gatewayapi_v1beta1.AddressType
func CertificateRef ¶
func CertificateRef(name, namespace string) gatewayapi_v1beta1.SecretObjectReference
func DowngradeRouteParentStatuses ¶ added in v1.22.0
func DowngradeRouteParentStatuses(routeParentStatuses []gatewayapi_v1beta1.RouteParentStatus) []gatewayapi_v1alpha2.RouteParentStatus
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func FromNamespacesPtr ¶
func FromNamespacesPtr(val gatewayapi_v1beta1.FromNamespaces) *gatewayapi_v1beta1.FromNamespaces
func GatewayAddressTypePtr ¶
func GatewayAddressTypePtr(addr gatewayapi_v1beta1.AddressType) *gatewayapi_v1beta1.AddressType
func GatewayListenerParentRef ¶
func GatewayListenerParentRef(namespace, name, listener string) gatewayapi_v1beta1.ParentReference
func GatewayParentRef ¶
func GatewayParentRef(namespace, name string) gatewayapi_v1beta1.ParentReference
func GatewayParentRefV1Alpha2 ¶ added in v1.22.0
func GatewayParentRefV1Alpha2(namespace, name string) gatewayapi_v1alpha2.ParentReference
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func GroupPtr ¶
func GroupPtr(group string) *gatewayapi_v1beta1.Group
func GroupPtrV1Alpha2 ¶ added in v1.22.0
func GroupPtrV1Alpha2(group string) *gatewayapi_v1alpha2.Group
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func HTTPBackendRef ¶
func HTTPBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1beta1.HTTPBackendRef
func HTTPBackendRefs ¶
func HTTPBackendRefs(backendRefs ...[]gatewayapi_v1beta1.HTTPBackendRef) []gatewayapi_v1beta1.HTTPBackendRef
func HTTPHeaderMatch ¶
func HTTPHeaderMatch(matchType gatewayapi_v1beta1.HeaderMatchType, name, value string) []gatewayapi_v1beta1.HTTPHeaderMatch
func HTTPMethodPtr ¶
func HTTPMethodPtr(method gatewayapi_v1beta1.HTTPMethod) *gatewayapi_v1beta1.HTTPMethod
func HTTPQueryParamMatches ¶ added in v1.22.0
func HTTPQueryParamMatches(namesAndValues map[string]string) []gatewayapi_v1beta1.HTTPQueryParamMatch
func HTTPRouteMatch ¶
func HTTPRouteMatch(pathType gatewayapi_v1beta1.PathMatchType, value string) []gatewayapi_v1beta1.HTTPRouteMatch
func HeaderMatchTypePtr ¶
func HeaderMatchTypePtr(val gatewayapi_v1beta1.HeaderMatchType) *gatewayapi_v1beta1.HeaderMatchType
func HostnameDeref ¶ added in v1.21.0
func HostnameDeref(hostname *gatewayapi_v1beta1.Hostname) string
HostnameDeref returns the hostname as a string if it's not nil, or an empty string otherwise.
func IsRefToGateway ¶ added in v1.22.0
func IsRefToGateway(parentRef gatewayapi_v1beta1.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 KindPtr ¶
func KindPtr(kind string) *gatewayapi_v1beta1.Kind
func KindPtrV1Alpha2 ¶ added in v1.22.0
func KindPtrV1Alpha2(kind string) *gatewayapi_v1alpha2.Kind
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func ListenerHostname ¶
func ListenerHostname(host string) *gatewayapi_v1beta1.Hostname
func NamespacePtr ¶
func NamespacePtr(namespace string) *gatewayapi_v1beta1.Namespace
func NamespacePtrV1Alpha2 ¶ added in v1.22.0
func NamespacePtrV1Alpha2(namespace string) *gatewayapi_v1alpha2.Namespace
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func ObjectNamePtr ¶
func ObjectNamePtr(name string) *gatewayapi_v1alpha2.ObjectName
func PathMatchTypePtr ¶
func PathMatchTypePtr(val gatewayapi_v1beta1.PathMatchType) *gatewayapi_v1beta1.PathMatchType
func PortNumPtr ¶
func PortNumPtr(port int) *gatewayapi_v1beta1.PortNumber
func PortNumPtrV1Alpha2 ¶ added in v1.22.0
func PortNumPtrV1Alpha2(port int) *gatewayapi_v1alpha2.PortNumber
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func PreciseHostname ¶
func PreciseHostname(host string) *gatewayapi_v1beta1.PreciseHostname
func QueryParamMatchTypePtr ¶ added in v1.22.0
func QueryParamMatchTypePtr(val gatewayapi_v1beta1.QueryParamMatchType) *gatewayapi_v1beta1.QueryParamMatchType
func SectionNamePtr ¶
func SectionNamePtr(sectionName string) *gatewayapi_v1beta1.SectionName
func SectionNamePtrV1Alpha2 ¶ added in v1.22.0
func SectionNamePtrV1Alpha2(sectionName string) *gatewayapi_v1alpha2.SectionName
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func ServiceBackendObjectRef ¶
func ServiceBackendObjectRef(name string, port int) gatewayapi_v1beta1.BackendObjectReference
func TLSModeTypePtr ¶
func TLSModeTypePtr(mode gatewayapi_v1beta1.TLSModeType) *gatewayapi_v1beta1.TLSModeType
func TLSRouteBackendRef ¶
func TLSRouteBackendRef(serviceName string, port int, weight *int32) []gatewayapi_v1alpha2.BackendRef
func TLSRouteBackendRefs ¶
func TLSRouteBackendRefs(backendRefs ...[]gatewayapi_v1alpha2.BackendRef) []gatewayapi_v1alpha2.BackendRef
func UpgradeBackendRef ¶ added in v1.22.0
func UpgradeBackendRef(backendRef gatewayapi_v1alpha2.BackendRef) gatewayapi_v1beta1.BackendRef
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func UpgradeHostnames ¶ added in v1.22.0
func UpgradeHostnames(hostnames []gatewayapi_v1alpha2.Hostname) []gatewayapi_v1beta1.Hostname
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func UpgradeParentRef ¶ added in v1.22.0
func UpgradeParentRef(parentRef gatewayapi_v1alpha2.ParentReference) gatewayapi_v1beta1.ParentReference
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func UpgradeParentRefs ¶ added in v1.22.0
func UpgradeParentRefs(parentRefs []gatewayapi_v1alpha2.ParentReference) []gatewayapi_v1beta1.ParentReference
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func UpgradeRouteParentStatus ¶ added in v1.22.0
func UpgradeRouteParentStatus(routeParentStatus gatewayapi_v1alpha2.RouteParentStatus) gatewayapi_v1beta1.RouteParentStatus
TODO(sk): delete when Gateway API v1alpha2 support is dropped
func UpgradeRouteParentStatuses ¶ added in v1.22.0
func UpgradeRouteParentStatuses(routeParentStatuses []gatewayapi_v1alpha2.RouteParentStatus) []gatewayapi_v1beta1.RouteParentStatus
TODO(sk): delete when Gateway API v1alpha2 support is dropped
Types ¶
type ValidateListenersResult ¶ added in v1.21.0
type ValidateListenersResult struct { InsecurePort int SecurePort int InvalidListenerConditions map[gatewayapi_v1beta1.SectionName]metav1.Condition }
func ValidateListeners ¶ added in v1.21.0
func ValidateListeners(listeners []gatewayapi_v1beta1.Listener) ValidateListenersResult
ValidateListeners validates protocols, ports and hostnames on a set of listeners. It ensures that:
- all protocols are supported
- each listener group (grouped by protocol, with HTTPS & TLS going together) uses a single port
- listener hostnames are syntactically valid
- hostnames within each listener group are unique
It returns the insecure & secure ports to use, as well as 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.