k8s

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadyStatus = "Ready"
	TRUE        = "True"
	FALSE       = "False"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewK8sClient

func NewK8sClient(sshClient *testhelper.SSHClient) (*Client, error)

func (*Client) CheckAllKubeSystemPodsReady

func (c *Client) CheckAllKubeSystemPodsReady() (bool, error)

Check if all pods of kube-system are ready

func (*Client) CheckAllNodeReady

func (c *Client) CheckAllNodeReady() (bool, error)

Check if all nodes are ready

func (*Client) GetNotReadyPodEvent

func (c *Client) GetNotReadyPodEvent() (map[string][]EventPod, error)

func (*Client) GetPodEvents

func (c *Client) GetPodEvents(namespace, podName string) ([]v1.Event, error)

func (*Client) GetPodLog

func (c *Client) GetPodLog(namespace, podName string) (string, error)

func (*Client) ListAllNamespacesPods

func (c *Client) ListAllNamespacesPods() ([]*NamespacePod, error)

func (*Client) ListNodeIPByLabel

func (c *Client) ListNodeIPByLabel(label string) ([]net.IP, error)

func (*Client) ListNodes

func (c *Client) ListNodes() (*v1.NodeList, error)

func (*Client) ListNodesByLabel

func (c *Client) ListNodesByLabel(label string) (*v1.NodeList, error)

func (*Client) OutputNotReadyPodInfo

func (c *Client) OutputNotReadyPodInfo() error

If exist pod not ready, show pod events and logs

type EventPod

type EventPod struct {
	Reason    string
	Message   string
	Count     int32
	Type      string
	Action    string
	Namespace string
}

type NamespacePod

type NamespacePod struct {
	Namespace v1.Namespace
	PodList   *v1.PodList
}

Jump to

Keyboard shortcuts

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