pods

package
v0.0.0-...-6b04d54 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultNamespace :
	DefaultNamespace = "hyperml"

	// DefaultIngressName : Default name for Ingress Controller
	DefaultIngressName = "hyperml-lb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

Keeper : POD launcher

func NewKeeper

func NewKeeper(conf *config.Config, qs *qs_pkg.QueryServer) (*Keeper, error)

NewKeeper :

func (*Keeper) CleanupJob

func (k *Keeper) CleanupJob(podType string, podID uint64) error

CleanupJob: Clean up job from k8s

func (*Keeper) CleanupPOD

func (k *Keeper) CleanupPOD(podType string, mode types.PodRequestMode, podID uint64) error

CleanupPOD : TODO: remove service from ingress

func (*Keeper) CreateJob

func (k *Keeper) CreateJob(pod *types.POD, jobConfig *config.JobConfig) (created *types.POD, err error)

CreateJob : Launches job pods

func (*Keeper) CreatePOD

func (k *Keeper) CreatePOD(pod *types.POD) (created *types.POD, err error)

CreatePOD : Creates a new POD in kubernetes

func (*Keeper) CreatePV

func (k *Keeper) CreatePV() error

CreatePV : Creates persistent volume

func (*Keeper) DeleteDeployment

func (k *Keeper) DeleteDeployment(podType string, podID uint64) (*appsv1.Deployment, error)

DeleteDeployment : Deletes deployment by USER POD ID

func (*Keeper) DeleteJob

func (k *Keeper) DeleteJob(podType string, podID uint64) error

DeleteJob : Deletes job against a given POD

func (*Keeper) DeleteService

func (k *Keeper) DeleteService(PodType string, PodID uint64) (*corev1.Service, error)

DeleteService :

func (*Keeper) GetDeployment

func (k *Keeper) GetDeployment(PodType string, PodID uint64) (*appsv1.Deployment, error)

GetDeployment : Get K8S Deployment for given POD type and ID

func (*Keeper) GetJob

func (k *Keeper) GetJob(podType string, podID uint64) (*batchv1.Job, error)

GetJob : Get job for a given POD

func (*Keeper) GetJobInfo

func (k *Keeper) GetJobInfo(podType string, podID uint64) (*batchv1.Job, error)

GetJobInfo : Returns a Job POD (k8s) tied to a given User Pod

func (*Keeper) GetPodInfo

func (k *Keeper) GetPodInfo(podType string, podID uint64) (*corev1.Pod, error)

GetJobInfo : Returns a Job POD (k8s) tied to a given User Pod

func (*Keeper) GetService

func (k *Keeper) GetService(PodType string, PodID uint64) (*corev1.Service, error)

GetService : Get Service Rec

func (*Keeper) IngressGC

func (k *Keeper) IngressGC() error

IngressGC : Cleanup Ingress

func (*Keeper) InitKeeper

func (k *Keeper) InitKeeper() error

InitKeeper : Initialize ingress

func (*Keeper) InitPOD

func (k *Keeper) InitPOD(pod *types.POD) *types.POD

InitPOD : Initiates POD

func (*Keeper) StartWatchers

func (k *Keeper) StartWatchers(fail chan int)

StartWatchers : watches a given namespace and deploy Type NOTEBOOK Todo handle failures

func (*Keeper) SyncUserJob

func (k *Keeper) SyncUserJob(podType string, userpid uint64) (*types.POD, error)

SyncUserJob : Updates the status from Kubernetes POD to the user pod

func (*Keeper) SyncUserPod

func (k *Keeper) SyncUserPod(podType string, userpid uint64) (*types.POD, error)

SyncUserPod : Updates the status from Kubernetes POD to the user pod

type LoadBalancer

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

LoadBalancer :

func (*LoadBalancer) AddPod

func (lb *LoadBalancer) AddPod(pod *meta.POD) error

AddPod :

func (*LoadBalancer) Init

func (lb *LoadBalancer) Init() error

Init :

func (*LoadBalancer) RemovePod

func (lb *LoadBalancer) RemovePod(pod *meta.POD) error

RemovePod :

Jump to

Keyboard shortcuts

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