kube

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Deploy(ctx context.Context, deployment builder.IClusterDeployment) error
	GetNS(ctx context.Context, ns string) (*v1.Namespace, error)
	DeleteNS(ctx context.Context, ns string) error
	FetchAllNodeResources(ctx context.Context) (map[string]*nodeResource, error)
	FetchNodeResource(ctx context.Context, nodeName string) (*nodeResource, error)
	GetPod(ctx context.Context, ns string, podName string) (*corev1.Pod, error)
	GetDeployment(ctx context.Context, ns string, deploymentName string) (*appsv1.Deployment, error)
	GetStatefulSet(ctx context.Context, ns string, statefulSetName string) (*appsv1.StatefulSet, error)
	ListDeployments(ctx context.Context, ns string) (*appsv1.DeploymentList, error)
	ListStatefulSets(ctx context.Context, ns string) (*appsv1.StatefulSetList, error)
	ListServices(ctx context.Context, ns string) (*corev1.ServiceList, error)
	ListPods(ctx context.Context, ns string, opts metav1.ListOptions) (*corev1.PodList, error)
	PodLogs(ctx context.Context, ns string, podName string) (io.ReadCloser, error)
	Events(ctx context.Context, ns string, opts metav1.ListOptions) (*corev1.EventList, error)
	GetIngress(ctx context.Context, ns string, hostname string) (*netv1.Ingress, error)
	//DescribeDeployment(ctx context.Context, ns string name string)
	UpdateIngress(ctx context.Context, ns string, ingress *netv1.Ingress) (*netv1.Ingress, error)
	Exec(ctx context.Context, cfgPath, ns, container, podName string, stdin io.Reader, stdout, stderr io.Writer, cmd []string, tty bool,
		terminalSizeQueue remotecommand.TerminalSizeQueue) (execResult, error)
	GetSecret(ctx context.Context, ns string, name string) (*corev1.Secret, error)
	CreateSecret(ctx context.Context, st corev1.SecretType, ns string, name string, data map[string][]byte) (*corev1.Secret, error)
	UpdateSecret(ctx context.Context, st corev1.SecretType, ns string, name string, data map[string][]byte) (*corev1.Secret, error)
	DeleteSecret(ctx context.Context, ns string, name string) error
}

func NewClient

func NewClient(kubeConfigPath string, providerConfig *config.ProviderConfig) (Client, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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