Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNamespace ¶ added in v0.0.4
func GetNamespace(configFlags *genericclioptions.ConfigFlags, all bool, givenNamespace string) (string, error)
GetNamespace will retrieve the current namespace from the provided namespace or kubeconfig file of the caller or handle the return of the all namespaces shortcut when the flag is set.
Types ¶
type MemoryInfo ¶
MemoryInfo is the container resource requests, specific to the memory limit and requests.
type TerminatedPodInfo ¶
type TerminatedPodInfo struct { Pod v1.Pod Memory MemoryInfo ContainerName string // Name of the container within the pod that was terminated, in the case of multi-container pods. TerminatedTime string // When the pod was terminated StartTime string // When the pod was started during the termination period. // contains filtered or unexported fields }
TerminatedPodInfo is a wrapper struct around an OOMKilled Pod's information.
type TerminatedPods ¶ added in v0.0.7
type TerminatedPods []TerminatedPodInfo
TerminatedPods is a wrapper type around multiple TerminatedPodInfo structs.
func BuildTerminatedPodsInfo ¶ added in v0.0.4
func BuildTerminatedPodsInfo(client *kubernetes.Clientset, namespace string) (TerminatedPods, error)
BuildTerminatedPodsInfo retrieves the terminated pod information, bundled into a slice of the informational struct.
func Run ¶ added in v0.0.4
func Run(configFlags *genericclioptions.ConfigFlags, namespace string) (TerminatedPods, error)
Run returns the pod information for those that have been OOMKilled, this provides the plugin functionality.
func (TerminatedPods) SortByTimestamp ¶ added in v0.0.7
func (t TerminatedPods) SortByTimestamp()
SortByTimestamp sorts the terminated pods slice in ascending order, in other words, it shows the first OOMKilled pod found at the top of the table and the most recent one at the end.