Documentation ¶
Index ¶
- func DropDisabledAlphaFields(podSpec *api.PodSpec)
- func GetPodCondition(status *api.PodStatus, conditionType api.PodConditionType) (int, *api.PodCondition)
- func GetPodReadyCondition(status api.PodStatus) *api.PodCondition
- func IsPodReady(pod *api.Pod) bool
- func IsPodReadyConditionTrue(status api.PodStatus) bool
- func UpdatePodCondition(status *api.PodStatus, condition *api.PodCondition) bool
- func VisitPodConfigmapNames(pod *api.Pod, visitor Visitor) bool
- func VisitPodSecretNames(pod *api.Pod, visitor Visitor) bool
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropDisabledAlphaFields ¶ added in v1.7.12
DropDisabledAlphaFields removes disabled fields from the pod spec. Back-ported from release-1.8 This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a pod spec.
func GetPodCondition ¶ added in v1.7.1
func GetPodCondition(status *api.PodStatus, conditionType api.PodConditionType) (int, *api.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodReadyCondition ¶ added in v1.7.1
func GetPodReadyCondition(status api.PodStatus) *api.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func IsPodReady ¶ added in v1.7.1
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶ added in v1.7.1
IsPodReadyConditionTrue retruns true if a pod is ready; false otherwise.
func UpdatePodCondition ¶ added in v1.7.1
func UpdatePodCondition(status *api.PodStatus, condition *api.PodCondition) bool
UpdatePodCondition updates existing pod condition or creates a new one. Sets LastTransitionTime to now if the status has changed. Returns true if pod condition has changed or has been added.
func VisitPodConfigmapNames ¶ added in v1.7.1
VisitPodConfigmapNames invokes the visitor function with the name of every configmap referenced by the pod spec. If visitor returns false, visiting is short-circuited. Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. Returns true if visiting completed, false if visiting was short-circuited.
func VisitPodSecretNames ¶ added in v1.6.1
VisitPodSecretNames invokes the visitor function with the name of every secret referenced by the pod spec. If visitor returns false, visiting is short-circuited. Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. Returns true if visiting completed, false if visiting was short-circuited.