package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Packages
NOTE: DO NOT use those helper functions through client-go, the package path will be changed in the future.
# Functions
AddOrUpdateTolerationInPod tries to add a toleration to the pod's toleration list.
GetAccessModesAsString returns a string representation of an array of access modes.
GetAccessModesFromString returns an array of AccessModes from a string created by GetAccessModesAsString.
GetDeletionCostFromPodAnnotations returns the integer value of pod-deletion-cost.
GetPersistentVolumeClaimClass returns StorageClassName.
GetPersistentVolumeClass returns StorageClassName.
GetTaintsFromNodeAnnotations gets the json serialized taints data from Pod.Annotations and converts it to the []Taint type in core.
GetTolerationsFromPodAnnotations gets the json serialized tolerations data from Pod.Annotations and converts it to the []Toleration type in core.
HasInvalidLabelValueInNodeSelectorTerms checks if there's an invalid label value in one NodeSelectorTerm's MatchExpression values.
HugePageResourceName returns a ResourceName with the canonical hugepage prefix prepended for the specified page size.
HugePageSizeFromResourceName returns the page size for the specified huge page resource name.
IsExtendedResourceName returns true if: 1.
IsHugePageResourceName returns true if the resource name has the huge page resource prefix.
IsHugePageResourceValueDivisible returns true if the resource value of storage is integer multiple of page size.
IsIntegerResourceName returns true if the resource is measured in integer values.
IsNativeResource returns true if the resource name is in the *kubernetes.io/ namespace.
IsOvercommitAllowed returns true if the resource is in the default namespace and is not hugepages.
IsQuotaHugePageResourceName returns true if the resource name has the quota related huge page resource prefix.
IsResourceQuotaScopeValidForResource returns true if the resource applies to the specified scope.
IsServiceIPSet aims to check if the service's ClusterIP is set or not the objective is not to perform validation here.
IsStandardContainerResourceName returns true if the container can make a resource request for the specified resource.
IsStandardFinalizerName checks if the input string is a standard finalizer name.
IsStandardLimitRangeType returns true if the type is Pod or Container.
IsStandardQuotaResourceName returns true if the resource is known to the quota tracking system.
IsStandardResourceName returns true if the resource is known to the system.
IsStandardResourceQuotaScope returns true if the scope is a standard value.
NonConvertibleFields iterates over the provided map and filters out all but any keys with the "non-convertible.kubernetes.io" prefix.
PersistentVolumeClaimHasClass returns true if given claim has set StorageClassName field.
# Variables
Semantic can do semantic deep equality checks for core objects.