Documentation ¶
Index ¶
- Constants
- Variables
- func IsStandardFinalizerName(str string) bool
- func ValidateAffinity(affinity *core.Affinity, 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 ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, ...) field.ErrorList
- func ValidatePreferredSchedulingTerms(terms []core.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList
- func ValidateTolerations(tolerations []core.Toleration, fldPath *field.Path) field.ErrorList
- type FinalizerName
- type PodSchedulingPolicyConfiguration
- type ValidateNameFunc
Constants ¶
const ObjectNameField = "metadata.name"
ObjectNameField field has the field path to the metadata name field.
Variables ¶
var ValidateNamespaceName = apimachineryvalidation.ValidateNamespaceName
ValidateNamespaceName can be used to check whether the given namespace name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.
var ValidateNodeName = apimachineryvalidation.NameIsDNSSubdomain
ValidateNodeName can be used to check whether the given node name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.
var ValidatePodName = apimachineryvalidation.NameIsDNSSubdomain
ValidatePodName can be used to check whether the given pod name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.
Functions ¶
func IsStandardFinalizerName ¶
IsStandardFinalizerName checks if the input string is a standard finalizer name
func ValidateAffinity ¶
ValidateAffinity checks if given affinities are valid
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 ValidateObjectMeta ¶
func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList
ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already been performed. It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate.
func ValidatePreferredSchedulingTerms ¶
func ValidatePreferredSchedulingTerms(terms []core.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList
ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data
func ValidateTolerations ¶
ValidateTolerations tests if given tolerations have valid data.
Types ¶
type FinalizerName ¶
type FinalizerName string
FinalizerName is the name identifying a finalizer during namespace lifecycle.
const FinalizerKubernetes FinalizerName = "kubernetes"
FinalizerKubernetes denotes the kubernetes finalizer.
type PodSchedulingPolicyConfiguration ¶
type PodSchedulingPolicyConfiguration interface { runtime.Object GetNodeSelector() map[string]string GetNodeName() string GetAffinity() *corev1.Affinity GetSchedulerName() string GetTolerations() []corev1.Toleration }
PodSchedulingPolicyConfiguration describes the interface for scheduling policy configuration.
type ValidateNameFunc ¶
type ValidateNameFunc apimachineryvalidation.ValidateNameFunc
ValidateNameFunc validates that the provided name is valid for a given resource type. Not all resources have the same validation rules for names. Prefix is true if the name will have a value appended to it. If the name is not valid, this returns a list of descriptions of individual characteristics of the value that were not valid. Otherwise this returns an empty list or nil.