Documentation ¶
Overview ¶
Copyright (c) 2022 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 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 ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorList
- 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 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 ValidateTolerations(tolerations []core.Toleration, fldPath *field.Path) field.ErrorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ValidateLabels ¶
ValidateLabels validates the given labels.
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 ValidateTolerations ¶
ValidateTolerations tests if given tolerations have valid data.
Types ¶
This section is empty.