validation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Overview

Package validation has functions for validating the correctness of api objects and explaining what's wrong with them when they're not valid.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateGateway

func ValidateGateway(gw *gatewayv1b1.Gateway) field.ErrorList

ValidateGateway validates gw according to the Gateway API specification. For additional details of the Gateway spec, refer to:

https://gateway-api.sigs.k8s.io/v1beta1/reference/spec/#gateway.networking.k8s.io/v1beta1.Gateway

Validation that is not possible with CRD annotations may be added here in the future. See https://github.com/kubernetes-sigs/gateway-api/issues/868 for more information.

func ValidateGatewayClassUpdate

func ValidateGatewayClassUpdate(oldClass, newClass *gatewayv1b1.GatewayClass) field.ErrorList

ValidateGatewayClassUpdate validates an update to oldClass according to the Gateway API specification. For additional details of the GatewayClass spec, refer to: https://gateway-api.sigs.k8s.io/v1beta1/reference/spec/#gateway.networking.k8s.io/v1beta1.GatewayClass

func ValidateGatewaySpec added in v0.6.0

func ValidateGatewaySpec(spec *gatewayv1b1.GatewaySpec, path *field.Path) field.ErrorList

ValidateGatewaySpec validates whether required fields of spec are set according to the Gateway API specification.

func ValidateHTTPRoute

func ValidateHTTPRoute(route *gatewayv1b1.HTTPRoute) field.ErrorList

ValidateHTTPRoute validates HTTPRoute according to the Gateway API specification. For additional details of the HTTPRoute spec, refer to: https://gateway-api.sigs.k8s.io/v1beta1/reference/spec/#gateway.networking.k8s.io/v1beta1.HTTPRoute

func ValidateHTTPRouteSpec added in v0.6.0

func ValidateHTTPRouteSpec(spec *gatewayv1b1.HTTPRouteSpec, path *field.Path) field.ErrorList

ValidateHTTPRouteSpec validates that required fields of spec are set according to the HTTPRoute specification.

func ValidateListenerNames added in v0.7.0

func ValidateListenerNames(listeners []gatewayv1b1.Listener, path *field.Path) field.ErrorList

ValidateListenerNames validates the names of the listeners must be unique within the Gateway

func ValidateListenerTLSConfig added in v0.6.0

func ValidateListenerTLSConfig(listeners []gatewayv1b1.Listener, path *field.Path) field.ErrorList

ValidateListenerTLSConfig validates TLS config must be set when protocol is HTTPS or TLS, and TLS config shall not be present when protocol is HTTP, TCP or UDP

func ValidateParentRefs added in v0.6.0

func ValidateParentRefs(parentRefs []gatewayv1b1.ParentReference, path *field.Path) field.ErrorList

ValidateParentRefs validates ParentRefs SectionName must be set and unique when ParentRefs includes 2 or more references to the same parent

func ValidateTLSCertificateRefs added in v0.6.0

func ValidateTLSCertificateRefs(listeners []gatewayv1b1.Listener, path *field.Path) field.ErrorList

ValidateTLSCertificateRefs validates the certificateRefs must be set and not empty when tls config is set and TLSModeType is terminate

Types

This section is empty.

Jump to

Keyboard shortcuts

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