api

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPathFromDirectory

func ConfigPathFromDirectory(d string) string

ConfigPathFromDirectory determines the kube config location from the HOME environment variable. If HOME is not defined, return empty.

func FailedPodConditions

func FailedPodConditions(pod corev1.Pod) []types.PodCondition

FailedPodConditions returns an array of PodConditions that have failed

func NotReadyPodContainerStatus

func NotReadyPodContainerStatus(pod corev1.Pod) []types.ContainerStatus

NotReadyPodContainerStatus returns an array of ContainerStatus for Pod containers that are not ready

func PodIsReady

func PodIsReady(pod corev1.Pod) bool

PodIsReady returns true if all Pod Conditions are marked as True and if all Containers are Ready

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper around a Kubernetes Interface

func NewClient

func NewClient(config types.ClientConfig) (*Client, error)

NewClient takes in a ClientConfig and generates a new Client to interface with the Kubernetes Cluster as outlined in the ClientConfig

func (*Client) Events

func (c *Client) Events(selectors types.EventSelectors) ([]corev1.Event, error)

Events takes a EventSelectors and returns an array of Kubernetes Events based on those selectors

func (*Client) PodLogs

func (c *Client) PodLogs(pod corev1.Pod, container string) (string, error)

PodLogs grabs the logs for a specific Pod Container. If container is empty string, the default Pod Container will be used.

func (*Client) Pods

func (c *Client) Pods(selectors types.PodSelectors) ([]corev1.Pod, error)

Pods takes a PodSelectors and returns an array of Kubernetes Pods based on those selectors

Jump to

Keyboard shortcuts

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