kubernetes

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentCreateOpts

type DeploymentCreateOpts struct {
	Namespace             string
	Spec                  *appsv1.Deployment
	OnStatusEventCallback func(event string)
}

type DeploymentInfo

type DeploymentInfo struct {
	Namespace      string
	DeploymentName string
	PodInfo        *PodInfo
}

type KubeClient

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

func NewInClusterKubeClient

func NewInClusterKubeClient() (*KubeClient, error)

func NewOutOfClusterKubeClient

func NewOutOfClusterKubeClient(configPath string) (*KubeClient, error)

func (*KubeClient) Close

func (client *KubeClient) Close() error

func (*KubeClient) DeploymentCreate

func (client *KubeClient) DeploymentCreate(opts *DeploymentCreateOpts) error

func (*KubeClient) DeploymentDelete

func (client *KubeClient) DeploymentDelete(namespace string, name string) error

func (*KubeClient) DeploymentList

func (client *KubeClient) DeploymentList(namespace string) ([]DeploymentInfo, error)

func (*KubeClient) GetPodInfo

func (client *KubeClient) GetPodInfo(deployment *appsv1.Deployment) (*PodInfo, error)

func (*KubeClient) NamespaceApply

func (client *KubeClient) NamespaceApply(name string) error

func (*KubeClient) NamespaceDelete

func (client *KubeClient) NamespaceDelete(name string) error

func (*KubeClient) PodExec

func (client *KubeClient) PodExec(opts *PodExecOpts) error

func (*KubeClient) PodPortForward

func (client *KubeClient) PodPortForward(opts *PodPortForwardOpts) error

func (*KubeClient) ServiceCreate

func (client *KubeClient) ServiceCreate(namespace string, spec *corev1.Service) error

func (*KubeClient) ServiceDelete

func (client *KubeClient) ServiceDelete(namespace string, name string) error

type KubeClientConfig

type KubeClientConfig struct {
	ConfigPath string
	Namespace  string
	Resource   *KubeResource
}

type KubeResource

type KubeResource struct {
	Memory string
	Cpu    string
}

type PodExecOpts

type PodExecOpts struct {
	Namespace      string
	PodName        string
	PodId          string
	Shell          string
	InStream       io.ReadCloser
	OutStream      io.Writer
	ErrStream      io.Writer
	IsTty          bool
	OnExecCallback func()
}

type PodInfo

type PodInfo struct {
	Id   string
	Name string
}

type PodPortForwardOpts

type PodPortForwardOpts struct {
	Namespace             string
	PodId                 string
	Ports                 []string // format "LOCAL:REMOTE"
	OnTunnelErrorCallback func(error)
}

Jump to

Keyboard shortcuts

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