package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
AccumulateUniqueHostPorts extracts each HostPort of each Container, accumulating the results and returning an error if any ports conflict.
IsValidSysctlName checks that the given string is a valid sysctl name, i.e.
ValidateAnnotations validates that a set of annotations are correctly defined.
ValidateAvoidPodsInNodeAnnotations tests that the serialized AvoidPods in Node.Annotations has valid data.
ValidateClusterTrustBundleName checks that a ClusterTrustBundle name conforms to the rules documented on the type.
ValidateConfigMap tests whether required fields in the ConfigMap are set.
ValidateConfigMapUpdate tests if required fields in the ConfigMap are set.
ValidateContainerStateTransition test to if any illegal container state transitions are being attempted.
ValidateDNS1123Subdomain validates that a name is a proper DNS subdomain.
ValidateDNS1123SubdomainWithUnderScore validates that a name is a proper DNS subdomain but allows for an underscore in the string.
ValidateEndpoints validates Endpoints on create and update.
ValidateEndpointsCreate validates Endpoints on create.
ValidateEndpointsUpdate validates Endpoints on update.
ValidateEnv validates env vars.
ValidateHasLabel requires that metav1.ObjectMeta has a Label with key and expectedValue.
ValidateHostSysctl will return error if namespaced sysctls is applied to pod sharing the respective namespaces with the host.
ValidateInitContainerStateTransition test to if any illegal init container state transitions are being attempted.
ValidateLimitRange tests if required fields in the LimitRange are set.
ValidateLoadBalancerStatus validates required fields on a LoadBalancerStatus.
ValidateLocalNonReservedPath makes sure targetPath: 1.
ValidateMaxSkew tests that the argument is a valid MaxSkew.
ValidateNamespace tests if required fields are set.
ValidateNamespaceFinalizeUpdate tests to see if the update is legal for an end user to make.
ValidateNamespaceStatusUpdate tests to see if the update is legal for an end user to make.
ValidateNamespaceUpdate tests to make sure a namespace update can be applied.
ValidateNode tests if required fields in the node are set.
ValidateNodeFieldSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data.
ValidateNodeResources is used to make sure a node has valid capacity and allocatable values.
ValidateNodeSelector tests that the specified nodeSelector fields has valid data.
ValidateNodeSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data.
ValidateNodeSelectorTerm tests that the specified node selector term has valid data.
ValidateNodeUpdate tests to make sure a node update can be applied.
Validates that the given selector is non-empty.
Validates that given value is not negative.
Validates that a Quantity is not negative.
ValidateNonSpecialIP is used to validate Endpoints, EndpointSlices, and external IPs.
ValidateObjectMeta validates an object's metadata on creation.
ValidateObjectMetaUpdate validates an object's metadata when updated.
ValidatePersistentVolumeClaim validates a PersistentVolumeClaim.
ValidatePersistentVolumeClaimSpec validates a PersistentVolumeClaimSpec.
ValidatePersistentVolumeClaimStatusUpdate validates an update to status of a PersistentVolumeClaim.
ValidatePersistentVolumeClaimTemplate verifies that the embedded object meta and spec are valid.
ValidatePersistentVolumeClaimUpdate validates an update to a PersistentVolumeClaim.
ValidatePersistentVolumeStatusUpdate tests to see if the status update is legal for an end user to make.
ValidatePersistentVolumeUpdate tests to see if the update is legal for an end user to make.
ValidatePodBinding tests if required fields in the pod binding are legal.
ValidatePodCreate validates a pod in the context of its initial create.
ValidatePodEphemeralContainersUpdate tests that a user update to EphemeralContainers is valid.
ValidatePodResize tests that a user update to pod container resources is valid.
ValidatePodSpec tests that the specified PodSpec has valid data.
ValidatePodStatusUpdate checks for changes to status that shouldn't occur in normal operation.
ValidatePodTemplate tests if required fields in the pod template are set.
ValidatePodTemplateSpec validates the spec of a pod template.
Validates the given template and ensures that it is in accordance with the desired selector and replicas.
ValidatePodTemplateUpdate tests to see if the update is legal for an end user to make.
ValidatePodUpdate tests to see if the update is legal for an end user to make.
Validates that a Quantity is positive.
ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data.
ValidateProcMountType tests that the argument is a valid ProcMountType.
ValidateQualifiedName validates if name is what Kubernetes calls a "qualified name".
ValidateReplicationController tests if required fields in the replication controller are set.
ValidateReplicationControllerSpec tests if required fields in the replication controller spec are set.
ValidateReplicationControllerStatusUpdate tests if required fields in the replication controller are set.
ValidateReplicationControllerUpdate tests if required fields in the replication controller are set.
ValidateResourceQuantityValue enforces that specified quantity is valid for specified resource.
ValidateResourceQuota tests if required fields in the ResourceQuota are set.
Validate resource names that can go in a resource quota Refer to docs/design/resources.md for more details.
ValidateResourceQuotaStatusUpdate tests to see if the status update is legal for an end user to make.
ValidateResourceQuotaUpdate tests to see if the update is legal for an end user to make.
ValidateRuntimeClassName can be used to check whether the given RuntimeClass name is valid.
ValidateSecret tests if required fields in the Secret are set.
ValidateSecretUpdate tests if required fields in the Secret are set.
ValidateSecurityContext ensures the security context contains valid settings.
ValidateService tests if required fields/annotations of a Service are valid.
ValidateServiceAccount tests if required fields in the ServiceAccount are set.
ValidateServiceAccountUpdate tests if required fields in the ServiceAccount are set.
ValidateServiceClusterIPsRelatedFields validates .spec.ClusterIPs,, .spec.IPFamilies, .spec.ipFamilyPolicy.
ValidateServiceCreate validates Services as they are created.
ValidateServiceStatusUpdate tests if required fields in the Service are set when updating status.
ValidateServiceUpdate tests if required fields in the service are set during an update.
ValidateSignerName checks that signerName is syntactically valid.
ValidateSpreadConstraintNotRepeat tests that if `constraint` duplicates with `existingConstraintPairs` on TopologyKey and WhenUnsatisfiable fields.
ValidateTaintsInNodeAnnotations tests that the serialized taints in Node.Annotations has valid data.
ValidateTolerations tests if given tolerations have valid data.
ValidateTolerationsInPodAnnotations tests that the serialized tolerations in Pod.Annotations has valid data.
ValidateTopologyKey tests that the argument is a valid TopologyKey.
ValidateTopologySelectorTerm tests that the specified topology selector term has valid data, and constructs a map representing the term in raw form.
ValidateWhenUnsatisfiable tests that the argument is a valid UnsatisfiableConstraintAction.
# Constants
Limits on various DNS parameters.
Max number of characters in the search path.
Max number of domains in the search path list.
a sysctl name regex with slash allowed.
the maximal length of a sysctl name.
a sysctl segment regex, concatenated with dots to form a sysctl name.
# Variables
BannedOwners is a black list of object that are not allowed to be owners.
ValidateClassName can be used to check whether the given class name is valid.
ValidateConfigMapName can be used to check whether the given ConfigMap name is valid.
ValidateEndpointsName can be used to check whether the given endpoints name is valid.
ValidateLimitRangeName can be used to check whether the given limit range name is valid.
ValidateNamespaceName can be used to check whether the given namespace name is valid.
ValidateNodeName can be used to check whether the given node name is valid.
ValidatePersistentVolumeName checks that a name is appropriate for a PersistentVolumeName object.
ValidatePodName can be used to check whether the given pod name is valid.
ValidatePriorityClassName can be used to check whether the given priority class name is valid.
ValidateReplicationControllerName can be used to check whether the given replication controller name is valid.
ValidateResourceClaimName can be used to check whether the given name for a ResourceClaim is valid.
ValidateResourceClaimTemplateName can be used to check whether the given name for a ResourceClaimTemplate is valid.
ValidateResourceQuotaName can be used to check whether the given resource quota name is valid.
ValidateSecretName can be used to check whether the given secret name is valid.
ValidateServiceAccountName can be used to check whether the given service account name is valid.
ValidateServiceName can be used to check whether the given service name is valid.
# Structs
PersistentVolumeSpecValidationOptions contains the different settings for PeristentVolume validation.
PodValidationOptions contains the different settings for pod validation.
# Type aliases
ValidateNameFunc validates that the provided name is valid for a given resource type.