Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUnhealthy ¶
IsUnhealthy checks if a pod has not been ready since at least 10 minutes/ This heuristic also detects infrastructure issues like not enough room to schedule pod. As false positives are less problematic than false negatives in our case, this is not a problem. if false positives were to be a frequent issue we could build a more specific heuristic by looking at the container statuses
func ListNames ¶
ListNames takes any object list and returns a list of the object names. This can be used for logging or testing purposes.
func MustHaveControllerRevisionLabel ¶
MustHaveControllerRevisionLabel checks if the pod is labeled with a controller revision hash and produces an error log if it is not.
Types ¶
type FilterFunc ¶
FilterFunc takes a pod and checks if it matches a specific criteria For example: "is the pod healthy?", "does the pod have this label?" It returns true if the pod meets the criteria
func BelongsControllerRevisionFilter ¶
func BelongsControllerRevisionFilter(controllerRevision string) FilterFunc
BelongsControllerRevisionFilter returns a FilterFunc checking if the pod belong to a specific controller revision.
func Not ¶
func Not(filterFunc FilterFunc) FilterFunc
Not takes a FilterFunc and builds the opposite FilterFunc.