controller

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Config     *cfg.Config
	Framework  *cfg.FrameworkConfig
	Redis      *redis.Redis
	Client     *kubernetes.Clientset
	Kubeconfig *rest.Config
	Mesos      mesos.Mesos
	ReadyNodes int
}

func New

func New(cfg *cfg.Config, frm *cfg.FrameworkConfig) *Controller

New will create a new Controller object

func (*Controller) CheckReadyState

func (e *Controller) CheckReadyState() bool

Unschedule Node

func (*Controller) CleanupNodes

func (e *Controller) CleanupNodes()

CleanupNodes will cleanup unready nodes

func (*Controller) CreateClient

func (e *Controller) CreateClient() bool

func (*Controller) CreateController

func (e *Controller) CreateController()

func (*Controller) DeleteNode

func (e *Controller) DeleteNode(nodeName string)

func (*Controller) GetK8NodeFromTask

func (e *Controller) GetK8NodeFromTask(task cfg.Command) corev1.Node

GetK8NodeFromTask will give out the K8 node from mesos task

func (*Controller) GetTaskFromK8Node

func (e *Controller) GetTaskFromK8Node(node corev1.Node, kind string) cfg.Command

GetTaskFromK8Node will give out the mesos task matched to the K8 node

func (*Controller) GetTaskIDFromAnnotation

func (e *Controller) GetTaskIDFromAnnotation(annotations map[string]string) string

GetTaskIDFromAnnotation will return the Mesos Task ID in the annotation string

func (*Controller) GetTaskIDFromLabel

func (e *Controller) GetTaskIDFromLabel(labels map[string]string) string

GetTaskIDFromLabel will return the Mesos Task ID in the label string

func (*Controller) Init

func (e *Controller) Init()

func (*Controller) SetSchedule

func (e *Controller) SetSchedule()

SetScheduled set all nodes to unscheduled.

func (*Controller) SetUnschedule

func (e *Controller) SetUnschedule()

SetUnscheduled set all nodes to unscheduled.

func (*Controller) UnscheduleBeat

func (e *Controller) UnscheduleBeat()

UnscheduleBeat - call the (un)scheduler function

Jump to

Keyboard shortcuts

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