k8s

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortForwardMethod = "POST"

	DeploymentKind  = "deployment"
	StatefulSetKind = "statefulset"
	DaemonSetKind   = "daemonset"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesClient

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

func NewKubernetesClient

func NewKubernetesClient(kubeConfigPath string) (*KubernetesClient, error)

func (*KubernetesClient) GetDaemonSet

func (k *KubernetesClient) GetDaemonSet(namespace, name string) (*appsV1.DaemonSet, error)

func (*KubernetesClient) GetDeployment

func (k *KubernetesClient) GetDeployment(namespace, deploymentName string) (*appsV1.Deployment, error)

func (*KubernetesClient) GetPod

func (k *KubernetesClient) GetPod(namespace, name string) (*coreV1.Pod, error)

func (*KubernetesClient) GetPortForwardSubresourceURL

func (k *KubernetesClient) GetPortForwardSubresourceURL(pod *coreV1.Pod) *url.URL

func (*KubernetesClient) GetStatefulSet

func (k *KubernetesClient) GetStatefulSet(namespace, name string) (*appsV1.StatefulSet, error)

func (*KubernetesClient) ListPods

func (k *KubernetesClient) ListPods(namespace string, listOptions apiMetaV1.ListOptions) (*coreV1.PodList, error)

func (*KubernetesClient) PortForward

func (k *KubernetesClient) PortForward(pod *coreV1.Pod, portForward *PortForward, out, errOut io.Writer) (*portforward.PortForwarder, error)

func (*KubernetesClient) WorkflowPodsList

func (k *KubernetesClient) WorkflowPodsList(namespace, kind, name string) (*coreV1.PodList, error)

type PortForward

type PortForward struct {
	Interface string

	RemotePort int
	LocalPort  int

	StopChannel  chan struct{}
	ReadyChannel chan struct{}
}

func NewPortForward

func NewPortForward(iface string, localPort int, remotePort int) *PortForward

func (*PortForward) Close

func (p *PortForward) Close()

Jump to

Keyboard shortcuts

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