validation

package
v1.4.10 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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 ValidateGRPCRoute

func ValidateGRPCRoute(route *gatewayv1.GRPCRoute) field.ErrorList

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

func ValidateGateway

func ValidateGateway(gw *gatewayv1.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/references/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 *gatewayv1.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/v1/references/spec/#gateway.networking.k8s.io/v1.GatewayClass

func ValidateGatewaySpec

func ValidateGatewaySpec(spec *gatewayv1.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 *gatewayv1.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/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRoute

func ValidateHTTPRouteSpec

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

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

func ValidateListenerNames

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

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

func ValidateListenerTLSConfig

func ValidateListenerTLSConfig(listeners []gatewayv1.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

func ValidateParentRefs(parentRefs []gatewayv1.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

func ValidateTLSCertificateRefs(listeners []gatewayv1.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