package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
AddOrUpdateDaemonPodTolerations apply necessary tolerations to DaemonSet Pods, e.g.
AllowsSurge returns true if the daemonset allows more than a single pod on any node.
CreatePodTemplate returns copy of provided template with additional label which contains templateGeneration (for backward compatibility), hash of provided template and sets default daemon tolerations.
GetTargetNodeName get the target node name of DaemonSet pods.
GetTemplateGeneration gets the template generation associated with a v1.DaemonSet by extracting it from the deprecated annotation.
IsPodUpdated checks if pod contains label value that either matches templateGeneration or hash.
ReplaceDaemonSetPodNodeNameNodeAffinity replaces the RequiredDuringSchedulingIgnoredDuringExecution NodeAffinity of the given affinity with a new NodeAffinity that selects the given nodeName.
SurgeCount returns 0 if surge is not requested, the expected surge number to allow out of numberToSchedule if surge is configured, or an error if the surge percentage requested is invalid.
UnavailableCount returns 0 if unavailability is not requested, the expected unavailability number to allow out of numberToSchedule if requested, or an error if the unavailability percentage requested is invalid.