k8s

package
v0.0.0-...-a9c5da7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesAPI

type KubernetesAPI struct {
	Clientset kubernetes.Interface
}

KubernetesAPI is the struct for k8s

func (KubernetesAPI) Connect

func (k KubernetesAPI) Connect(inCluster bool) kubernetes.Interface

Connect returns new kubernetes Client

func (KubernetesAPI) DeleteJob

func (k KubernetesAPI) DeleteJob(job batch.Job)

DeleteJob deletes pod from kubernetes

func (KubernetesAPI) DeletePod

func (k KubernetesAPI) DeletePod(pod core.Pod)

DeletePod deletes pod from kubernetes

func (KubernetesAPI) GetJobsPod

func (k KubernetesAPI) GetJobsPod(job batch.Job) *core.PodList

GetJobsPod gets the pod associated to a job based on the job-name label

func (KubernetesAPI) GetNamespaces

func (k KubernetesAPI) GetNamespaces(excludedNamespaces []string) []string

GetNamespaces returns slice of all namespaces

func (KubernetesAPI) GetPodLogs

func (k KubernetesAPI) GetPodLogs(pod core.Pod, tail *int64)

GetPodLogs logs a list of logs for a given pod name

func (KubernetesAPI) GetjobsForCleanup

func (k KubernetesAPI) GetjobsForCleanup(namespace string, activeDeadlineSeconds float64) []batch.Job

GetjobsForCleanup return list of jobs in the requested namespace that exceed the max run time in second

func (KubernetesAPI) LabelJob

func (k KubernetesAPI) LabelJob(job batch.Job)

LabelJob labels a job when the underlying pod has been identified for cleanup

Jump to

Keyboard shortcuts

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