k8s

package
v0.0.0-...-bcb65b6 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientset

func NewClientset(isInCluster bool) (kubernetes.Interface, error)

NewClientset create kubernetes clientset

Types

type K8S

type K8S interface {
	GetPod(name string, namespace string) (*v1.Pod, error)
	GetCurrentNamespace() string
	CreatePod(job *job.SchedulerJob, namespace string) (string, error)
	CreateNamespace(name string) error
	DeletePod(name string, namespace string) error
	WatchPod(name string, namespace string) error
}

K8S service interface, that should abstract all k8s sdk details away

func New

func New(logger *zap.Logger, clientset kubernetes.Interface) (K8S, error)

New instance of K8S concrete implementation

Jump to

Keyboard shortcuts

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