gatewayapi

package
v1.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateRef

func CertificateRef(name, namespace string) *gatewayapi_v1alpha2.SecretObjectReference

func GatewayListenerParentRef

func GatewayListenerParentRef(namespace, name, listener string) gatewayapi_v1alpha2.ParentRef

func GatewayParentRef

func GatewayParentRef(namespace, name string) gatewayapi_v1alpha2.ParentRef

func GroupPtr

func GroupPtr(group string) *gatewayapi_v1alpha2.Group

func HTTPBackendRef

func HTTPBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1alpha2.HTTPBackendRef

func HostnameDeref added in v1.21.0

func HostnameDeref(hostname *gatewayapi_v1alpha2.Hostname) string

HostnameDeref returns the hostname as a string if it's not nil, or an empty string otherwise.

func IsValidHostname added in v1.21.0

func IsValidHostname(hostname string) error

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_v1alpha2.Kind

func ListenerHostname

func ListenerHostname(host string) *gatewayapi_v1alpha2.Hostname

func NamespacePtr

func NamespacePtr(namespace string) *gatewayapi_v1alpha2.Namespace

func ObjectNamePtr

func ObjectNamePtr(name string) *gatewayapi_v1alpha2.ObjectName

func PortNumPtr

func PortNumPtr(port int) *gatewayapi_v1alpha2.PortNumber

func PreciseHostname

func PreciseHostname(host string) *gatewayapi_v1alpha2.PreciseHostname

func SectionNamePtr

func SectionNamePtr(sectionName string) *gatewayapi_v1alpha2.SectionName

func ServiceBackendObjectRef

func ServiceBackendObjectRef(name string, port int) gatewayapi_v1alpha2.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 ValidateListenersResult added in v1.21.0

type ValidateListenersResult struct {
	InsecurePort int
	SecurePort   int

	InvalidListenerConditions map[gatewayapi_v1alpha2.SectionName]metav1.Condition
}

func ValidateListeners added in v1.21.0

func ValidateListeners(listeners []gatewayapi_v1alpha2.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL