Documentation ¶
Index ¶
- Variables
- func AppendEvents(source []api.Event, target common.EventList) common.EventList
- func FillEventsType(events []api.Event) []api.Event
- func FilterEventsByPodsUID(events []api.Event, pods []api.Pod) []api.Event
- func GetEvents(client client.EventNamespacer, namespace, resourceName string) ([]api.Event, error)
- func GetPodsEventWarnings(events []api.Event, pods []api.Pod) []common.Event
- func GetPodsEvents(client client.Interface, namespace string, resourceSelector map[string]string) ([]api.Event, error)
- func IsFailedReason(reason string, partials ...string) bool
- func IsTypeFilled(events []api.Event) bool
Constants ¶
This section is empty.
Variables ¶
var FailedReasonPartials = []string{"failed", "err", "exceeded", "invalid", "unhealthy",
"mismatch", "insufficient", "conflict", "outof", "nil"}
FailedReasonPartials is an array of partial strings to correctly filter warning events. Have to be lower case for correct case insensitive comparison. Based on k8s official events reason file: https://github.com/kubernetes/kubernetes/blob/53f0f9d59860131c2be301a0054adfc86e43945d/pkg/kubelet/container/event.go Partial strings that are not in event.go file are added in order to support older versions of k8s which contained additional event reason messages.
Functions ¶
func AppendEvents ¶
AppendEvents appends events from source slice to target events representation.
func FillEventsType ¶
Based on event Reason fills event Type in order to allow correct filtering by Type.
func FilterEventsByPodsUID ¶
FilterEventsByPodsUID returns filtered list of event objects. Events list is filtered to get only events targeting pods on the list.
func GetPodsEventWarnings ¶
GetPodsEventWarnings returns warning pod events by filtering out events targeting only given pods TODO(floreks) : Import and use Set instead of custom function to get rid of duplicates
func GetPodsEvents ¶
func GetPodsEvents(client client.Interface, namespace string, resourceSelector map[string]string) ( []api.Event, error)
GetPodsEvents gets pods events associated to resource targeted by given resource selector.
func IsFailedReason ¶
IsFailedReason returns true if reason string contains any partial string indicating that this may be a warning, false otherwise
func IsTypeFilled ¶
IsTypeFilled returns true if all given events type is filled, false otherwise. This is needed as some older versions of kubernetes do not have Type property filled.
Types ¶
This section is empty.