k8s

package
v0.0.0-...-7737fca Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSet

type ClientSet interface {
	GetPods(namespace string) (*corev1.PodList, error)
	GetDeployments(namespace string) (*appsv1.DeploymentList, error)
	GetNamespaces() (*corev1.NamespaceList, error)
	GetPodContainers(podName string, namespace string) ([]string, error)
	DeletePod(podName string, namespace string) error
	GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error
}

type MockClientSet

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

MockClientSet contains an embedded Kubernetes client set

func NewMock

func NewMock(flags *k.ParsedFlags) (*MockClientSet, error)

NewMock returns a new clientset

func (*MockClientSet) DeletePod

func (cs *MockClientSet) DeletePod(podName string, namespace string) error

DeletePod will DeletePod

func (*MockClientSet) GetDeployments

func (cs *MockClientSet) GetDeployments(namespace string) (*appsv1.DeploymentList, error)

GetDeployments returns all deployments from the k8s cluster

func (*MockClientSet) GetNamespaces

func (cs *MockClientSet) GetNamespaces() (*corev1.NamespaceList, error)

GetNamespaces will GetNamespaces

func (*MockClientSet) GetPodContainerLogs

func (cs *MockClientSet) GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error

GetPodContainerLogs will GetPodContainerLogs

func (*MockClientSet) GetPodContainers

func (cs *MockClientSet) GetPodContainers(podName string, namespace string) ([]string, error)

GetPodContainers will GetPodContainers

func (*MockClientSet) GetPods

func (cs *MockClientSet) GetPods(namespace string) (*corev1.PodList, error)

GetPods (use namespace)

type RealClientSet

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

RealClientSet contains an embedded Kubernetes client set

func New

func New(flags *k.ParsedFlags) (*RealClientSet, error)

New returns a new clientset

func (*RealClientSet) DeletePod

func (cs *RealClientSet) DeletePod(podName string, namespace string) error

Delete pod

func (*RealClientSet) GetDeployments

func (cs *RealClientSet) GetDeployments(namespace string) (*appsv1.DeploymentList, error)

Get pods (use namespace)

func (*RealClientSet) GetNamespaces

func (cs *RealClientSet) GetNamespaces() (*v1.NamespaceList, error)

Get namespaces

func (*RealClientSet) GetPodContainerLogs

func (cs *RealClientSet) GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error

Get pod container logs

func (*RealClientSet) GetPodContainers

func (cs *RealClientSet) GetPodContainers(podName string, namespace string) ([]string, error)

Get the pod containers

func (*RealClientSet) GetPods

func (cs *RealClientSet) GetPods(namespace string) (*v1.PodList, error)

Get pods (use namespace)

Jump to

Keyboard shortcuts

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