kubernetes

package
v0.0.0-...-71f93e5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Zlib Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSnapshot

func CreateSnapshot() (*portainer.KubernetesSnapshot, error)

CreateSnapshot creates a snapshot of a specific Kubernetes environment(endpoint)

Types

type KubeClient

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

KubeClient can be used to query the Kubernetes API

func NewKubeClient

func NewKubeClient() (*KubeClient, error)

NewKubeClient returns a pointer to a new KubeClient instance

func (*KubeClient) GetDaemonSetStatus

func (kcl *KubeClient) GetDaemonSetStatus(namespace string, name string) ResourceStatus

func (*KubeClient) GetDeploymentStatus

func (kcl *KubeClient) GetDeploymentStatus(namespace string, name string) ResourceStatus

func (*KubeClient) GetPodStatus

func (kcl *KubeClient) GetPodStatus(namespace string, name string) ResourceStatus

func (*KubeClient) GetStatefulSetStatus

func (kcl *KubeClient) GetStatefulSetStatus(namespace string, name string) ResourceStatus

func (*KubeClient) StartExecProcess

func (kcl *KubeClient) StartExecProcess(token, namespace, podName, containerName string, command []string, stdin io.Reader, stdout io.Writer) error

StartExecProcess will start an exec process inside a container located inside a pod inside a specific namespace using the specified command. The stdin parameter will be bound to the stdin process and the stdout process will write to the stdout parameter. This function only works against a local endpoint using an in-cluster config.

type ResourceStatus

type ResourceStatus struct {
	Status  libstack.Status
	Message string
	Err     error
}

func AggregateStatuses

func AggregateStatuses(statuses []ResourceStatus) ResourceStatus

Jump to

Keyboard shortcuts

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