Documentation ¶
Index ¶
- type KubernetesAPI
- func (k KubernetesAPI) Connect(inCluster bool) kubernetes.Interface
- func (k KubernetesAPI) DeleteJob(job batch.Job)
- func (k KubernetesAPI) DeletePod(pod core.Pod)
- func (k KubernetesAPI) GetJobsPod(job batch.Job) *core.PodList
- func (k KubernetesAPI) GetNamespaces(excludedNamespaces []string) []string
- func (k KubernetesAPI) GetPodLogs(pod core.Pod, tail *int64)
- func (k KubernetesAPI) GetjobsForCleanup(namespace string, activeDeadlineSeconds float64) []batch.Job
- func (k KubernetesAPI) LabelJob(job batch.Job)
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
Click to show internal directories.
Click to hide internal directories.