Documentation ¶
Overview ¶
Copyright (c) 2022-2024 Tigera, Inc. All rights reserved.
Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The contents of this file are mostly copied, with minor modifications, from: https://github.com/kubernetes/kubernetes/blob/f38615fb9d1188934213633ff92d523259ae8f6a/pkg/apis/core/v1/validation/validation.go
Index ¶
- func IsNotMoreThan100Percent(intOrStringValue intstr.IntOrString, fldPath *field.Path) field.ErrorList
- func ValidateAffinity(affinity *core.Affinity, fldPath *field.Path) field.ErrorList
- func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList
- func ValidateContainerResourceName(value string, fldPath *field.Path) field.ErrorList
- func ValidateDeploymentStrategy(strategy *appsv1.DeploymentStrategy, fldPath *field.Path) field.ErrorList
- func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorList
- func ValidateMaxSkew(fldPath *field.Path, maxSkew int32) *field.Error
- func ValidateNodeFieldSelectorRequirement(req core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
- func ValidateNodeSelector(nodeSelector *core.NodeSelector, fldPath *field.Path) field.ErrorList
- func ValidateNodeSelectorRequirement(rq core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
- func ValidateNodeSelectorTerm(term core.NodeSelectorTerm, fldPath *field.Path) field.ErrorList
- func ValidateNonnegativeQuantity(value resource.Quantity, fldPath *field.Path) field.ErrorList
- func ValidatePodSpecNodeSelector(nodeSelector map[string]string, fldPath *field.Path) field.ErrorList
- func ValidatePositiveIntOrPercent(intOrPercent intstr.IntOrString, fldPath *field.Path) field.ErrorList
- func ValidatePreferredSchedulingTerms(terms []core.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList
- func ValidateQualifiedName(value string, fldPath *field.Path) field.ErrorList
- func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList
- func ValidateResourceRequirements(requirements *v1.ResourceRequirements, fldPath *field.Path) field.ErrorList
- func ValidateRollingUpdateDeployment(rollingUpdate *appsv1.RollingUpdateDeployment, fldPath *field.Path) field.ErrorList
- func ValidateSpreadConstraintNotRepeat(fldPath *field.Path, constraint core.TopologySpreadConstraint, ...) *field.Error
- func ValidateTolerations(tolerations []core.Toleration, fldPath *field.Path) field.ErrorList
- func ValidateTopologyKey(fldPath *field.Path, topologyKey string) *field.Error
- func ValidateTopologySpreadConstraints(constraints []core.TopologySpreadConstraint, fldPath *field.Path) field.ErrorList
- func ValidateWhenUnsatisfiable(fldPath *field.Path, action core.UnsatisfiableConstraintAction) *field.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotMoreThan100Percent ¶
func ValidateAffinity ¶
ValidateAffinity checks if given affinities are valid
func ValidateAnnotations ¶
ValidateAnnotations validates that a set of annotations are correctly defined.
func ValidateContainerResourceName ¶
ValidateContainerResourceName checks the name of resource specified for a container
func ValidateDeploymentStrategy ¶
func ValidateDeploymentStrategy(strategy *appsv1.DeploymentStrategy, fldPath *field.Path) field.ErrorList
ValidateDeploymentStrategy validates given DeploymentStrategy.
func ValidateLabels ¶
ValidateLabels validates the given labels.
func ValidateMaxSkew ¶ added in v1.29.0
ValidateMaxSkew tests that the argument is a valid MaxSkew.
func ValidateNodeFieldSelectorRequirement ¶
func ValidateNodeFieldSelectorRequirement(req core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
ValidateNodeFieldSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data
func ValidateNodeSelector ¶
ValidateNodeSelector tests that the specified nodeSelector fields has valid data
func ValidateNodeSelectorRequirement ¶
func ValidateNodeSelectorRequirement(rq core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList
ValidateNodeSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data
func ValidateNodeSelectorTerm ¶
ValidateNodeSelectorTerm tests that the specified node selector term has valid data
func ValidateNonnegativeQuantity ¶
ValidateNonnegativeQuantity checks that a Quantity is not negative.
func ValidatePodSpecNodeSelector ¶
func ValidatePodSpecNodeSelector(nodeSelector map[string]string, fldPath *field.Path) field.ErrorList
ValidatePodSpecNodeSelector validates the given pod spec nodeSelector.
func ValidatePreferredSchedulingTerms ¶
func ValidatePreferredSchedulingTerms(terms []core.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList
ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data
func ValidateQualifiedName ¶
ValidateQualifiedName validates if name is what Kubernetes calls a "qualified name".
func ValidateResourceQuantityValue ¶
func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList
ValidateResourceQuantityValue enforces that specified quantity is valid for specified resource
func ValidateResourceRequirements ¶
func ValidateResourceRequirements(requirements *v1.ResourceRequirements, fldPath *field.Path) field.ErrorList
ValidateResourceRequirements will check if any of the resource Limits/Requests are of a valid value. Any incorrect value will be added to the ErrorList.
func ValidateRollingUpdateDeployment ¶
func ValidateRollingUpdateDeployment(rollingUpdate *appsv1.RollingUpdateDeployment, fldPath *field.Path) field.ErrorList
ValidateRollingUpdateDeployment validates a given RollingUpdateDeployment.
func ValidateSpreadConstraintNotRepeat ¶ added in v1.29.0
func ValidateSpreadConstraintNotRepeat(fldPath *field.Path, constraint core.TopologySpreadConstraint, restingConstraints []core.TopologySpreadConstraint) *field.Error
ValidateSpreadConstraintNotRepeat tests that if `constraint` duplicates with `existingConstraintPairs` on TopologyKey and WhenUnsatisfiable fields.
func ValidateTolerations ¶
ValidateTolerations tests if given tolerations have valid data.
func ValidateTopologyKey ¶ added in v1.29.0
ValidateTopologyKey tests that the argument is a valid TopologyKey.
func ValidateTopologySpreadConstraints ¶ added in v1.29.0
func ValidateTopologySpreadConstraints(constraints []core.TopologySpreadConstraint, fldPath *field.Path) field.ErrorList
ValidateTopologySpreadConstraints validates given TopologySpreadConstraints.
func ValidateWhenUnsatisfiable ¶ added in v1.29.0
func ValidateWhenUnsatisfiable(fldPath *field.Path, action core.UnsatisfiableConstraintAction) *field.Error
ValidateWhenUnsatisfiable tests that the argument is a valid UnsatisfiableConstraintAction.
Types ¶
This section is empty.