package util
import "k8s.io/kubernetes/pkg/controller/daemon/util"
Index ¶
- func CreatePodTemplate(template v1.PodTemplateSpec, generation *int64, hash string) v1.PodTemplateSpec
- func GetTemplateGeneration(ds *apps.DaemonSet) (*int64, error)
- func IsPodUpdated(pod *v1.Pod, hash string, dsTemplateGeneration *int64) bool
- func SplitByAvailablePods(minReadySeconds int32, pods []*v1.Pod) ([]*v1.Pod, []*v1.Pod)
Functions ¶
func CreatePodTemplate ¶
func CreatePodTemplate(template v1.PodTemplateSpec, generation *int64, hash string) v1.PodTemplateSpec
CreatePodTemplate returns copy of provided template with additional label which contains templateGeneration (for backward compatibility), hash of provided template and sets default daemon tolerations.
func GetTemplateGeneration ¶
GetTemplateGeneration gets the template generation associated with a v1.DaemonSet by extracting it from the deprecated annotation. If no annotation is found nil is returned. If the annotation is found and fails to parse nil is returned with an error. If the generation can be parsed from the annotation, a pointer to the parsed int64 value is returned.
func IsPodUpdated ¶
IsPodUpdated checks if pod contains label value that either matches templateGeneration or hash
func SplitByAvailablePods ¶
SplitByAvailablePods splits provided daemon set pods by availability
Source Files ¶
daemonset_util.go
- Version
- v1.10.0-beta.2
- Published
- Mar 7, 2018
- Platform
- js/wasm
- Imports
- 12 packages
- Last checked
- 1 minute ago –
Tools for package owners.