kubernetesk8s.io/kubernetes/pkg/apis/networking/validation Index | Files

package validation

import "k8s.io/kubernetes/pkg/apis/networking/validation"

Index

Variables

var ValidateClusterCIDRName = apimachineryvalidation.NameIsDNSLabel

ValidateClusterCIDRName validates that the given name can be used as an ClusterCIDR name.

var ValidateIngressClassName = apimachineryvalidation.NameIsDNSSubdomain

ValidateIngressClassName validates that the given name can be used as an IngressClass name.

var ValidateIngressName = apimachineryvalidation.NameIsDNSSubdomain

ValidateIngressName validates that the given name can be used as an Ingress name.

Functions

func ValidateClusterCIDR

func ValidateClusterCIDR(cc *networking.ClusterCIDR) field.ErrorList

ValidateClusterCIDR validates a ClusterCIDR.

func ValidateClusterCIDRSpec

func ValidateClusterCIDRSpec(spec *networking.ClusterCIDRSpec, fldPath *field.Path) field.ErrorList

ValidateClusterCIDRSpec validates ClusterCIDR Spec.

func ValidateClusterCIDRUpdate

func ValidateClusterCIDRUpdate(update, old *networking.ClusterCIDR) field.ErrorList

ValidateClusterCIDRUpdate tests if an update to a ClusterCIDR is valid.

func ValidateIPAddress

func ValidateIPAddress(ipAddress *networking.IPAddress) field.ErrorList

func ValidateIPAddressName

func ValidateIPAddressName(name string, prefix bool) []string

ValidateIPAddressName validates that the name is the decimal representation of an IP address. IPAddress does not support generating names, prefix is not considered.

func ValidateIPAddressUpdate

func ValidateIPAddressUpdate(update, old *networking.IPAddress) field.ErrorList

ValidateIPAddressUpdate tests if an update to an IPAddress is valid.

func ValidateIPBlock

func ValidateIPBlock(ipb *networking.IPBlock, fldPath *field.Path) field.ErrorList

ValidateIPBlock validates a cidr and the except fields of an IpBlock NetworkPolicyPeer

func ValidateIngressClass

func ValidateIngressClass(ingressClass *networking.IngressClass) field.ErrorList

ValidateIngressClass ensures that IngressClass resources are valid.

func ValidateIngressClassUpdate

func ValidateIngressClassUpdate(newIngressClass, oldIngressClass *networking.IngressClass) field.ErrorList

ValidateIngressClassUpdate ensures that IngressClass updates are valid.

func ValidateIngressCreate

func ValidateIngressCreate(ingress *networking.Ingress) field.ErrorList

ValidateIngressCreate validates Ingresses on create.

func ValidateIngressLoadBalancerStatus

func ValidateIngressLoadBalancerStatus(status *networking.IngressLoadBalancerStatus, fldPath *field.Path) field.ErrorList

ValidateLIngressoadBalancerStatus validates required fields on an IngressLoadBalancerStatus

func ValidateIngressSpec

func ValidateIngressSpec(spec *networking.IngressSpec, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList

ValidateIngressSpec tests if required fields in the IngressSpec are set.

func ValidateIngressStatusUpdate

func ValidateIngressStatusUpdate(ingress, oldIngress *networking.Ingress) field.ErrorList

ValidateIngressStatusUpdate tests if required fields in the Ingress are set when updating status.

func ValidateIngressUpdate

func ValidateIngressUpdate(ingress, oldIngress *networking.Ingress) field.ErrorList

ValidateIngressUpdate validates ingresses on update.

func ValidateNetworkPolicy

ValidateNetworkPolicy validates a networkpolicy.

func ValidateNetworkPolicyName

func ValidateNetworkPolicyName(name string, prefix bool) []string

ValidateNetworkPolicyName can be used to check whether the given networkpolicy name is valid.

func ValidateNetworkPolicyPeer

func ValidateNetworkPolicyPeer(peer *networking.NetworkPolicyPeer, opts NetworkPolicyValidationOptions, peerPath *field.Path) field.ErrorList

ValidateNetworkPolicyPeer validates a NetworkPolicyPeer

func ValidateNetworkPolicyPort

func ValidateNetworkPolicyPort(port *networking.NetworkPolicyPort, portPath *field.Path) field.ErrorList

ValidateNetworkPolicyPort validates a NetworkPolicyPort

func ValidateNetworkPolicySpec

func ValidateNetworkPolicySpec(spec *networking.NetworkPolicySpec, opts NetworkPolicyValidationOptions, fldPath *field.Path) field.ErrorList

ValidateNetworkPolicySpec tests if required fields in the networkpolicy spec are set.

func ValidateNetworkPolicyUpdate

func ValidateNetworkPolicyUpdate(update, old *networking.NetworkPolicy, opts NetworkPolicyValidationOptions) field.ErrorList

ValidateNetworkPolicyUpdate tests if an update to a NetworkPolicy is valid.

Types

type IngressValidationOptions

type IngressValidationOptions struct {
	// AllowInvalidSecretName indicates whether spec.tls[*].secretName values that are not valid Secret names should be allowed
	AllowInvalidSecretName bool

	// AllowInvalidWildcardHostRule indicates whether invalid rule values are allowed in rules with wildcard hostnames
	AllowInvalidWildcardHostRule bool
}

IngressValidationOptions cover beta to GA transitions for HTTP PathType

type NetworkPolicyValidationOptions

type NetworkPolicyValidationOptions struct {
	AllowInvalidLabelValueInSelector bool
}

func ValidationOptionsForNetworking

func ValidationOptionsForNetworking(new, old *networking.NetworkPolicy) NetworkPolicyValidationOptions

ValidationOptionsForNetworking generates NetworkPolicyValidationOptions for Networking

Source Files

validation.go

Version
v1.28.3
Published
Oct 18, 2023
Platform
js/wasm
Imports
16 packages
Last checked
4 minutes ago

Tools for package owners.