util

package
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsKillingStoppingContainerEvents added in v0.4.0

func ContainsKillingStoppingContainerEvents(
	c kubernetes.Interface,
	name,
	namespace string) bool

ContainsKillingStoppingContainerEvents checks if the events contain an event with "Killing Stopping container" which indicates that a container could not be gracefully shutdown

func GetNodeSummary added in v0.8.0

func GetNodeSummary(c kubernetes.Interface, name string) ([]byte, error)

// GetNodeSummary gets a list of nodes

func GetNodes added in v0.8.0

func GetNodes(c kubernetes.Interface) (*v1.NodeList, error)

GetNodes gets a list of nodes

func GetPVNameFromPVC added in v0.8.0

func GetPVNameFromPVC(
	c kubernetes.Interface,
	namespace, pvcName string) (string, error)

GetPVNameFromPVC returns the name of persistent volume given a namespace and persistent volume claim name

func GetPodContainerLogs

func GetPodContainerLogs(
	c kubernetes.Interface, name, container, namespace string,
	previous bool,
	maxRecentLogLines int64) string

GetPodContainerLogs returns logs for specified container in pod

func GetPodEventsStr added in v0.0.2

func GetPodEventsStr(c kubernetes.Interface, name, namespace string) string

GetPodEventsStr returns formatted events as a string for specified pod

func JsonEscape added in v0.7.0

func JsonEscape(i string) string

JsonEscape escapes the json special characters in a string

func RandomString added in v0.7.0

func RandomString(n int) string

RandomString generates random string with provided n size

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL