k8s

package
v0.0.0-...-d2b1cdf Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const EventChanSize = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type K8SManager

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

K8SManager implements the plugin for the Kubernetes cluster manager.

func NewK8sManager

func NewK8sManager(
	configPath string,
	podEventCh chan<- *scalar.PodEvent,
	hostEventCh chan<- *scalar.HostEvent,
) (*K8SManager, error)

NewK8sManager returns a new instance of K8SManager

func (*K8SManager) AckPodEvent

func (k *K8SManager) AckPodEvent(ctx context.Context, event *scalar.PodEvent)

AckPodEvent is relevant to Mesos. For K8s for now, this is a noop. We could use some smarts here if we decide to write the resource version to DB after the event has been acknowledged by both JM and RM

func (*K8SManager) KillPod

func (k *K8SManager) KillPod(podID string) error

KillPod stops and deletes the given pod

func (*K8SManager) LaunchPod

func (k *K8SManager) LaunchPod(
	podSpec *pbpod.PodSpec,
	podID, hostname string,
) error

LaunchPod creates a pod object, binds it to the node specified by hostname.

func (*K8SManager) ReconcileHosts

func (k *K8SManager) ReconcileHosts() ([]*scalar.HostInfo, error)

ReconcileHosts lists all nodes on the API server and converts them into host infos.

func (*K8SManager) Start

func (k *K8SManager) Start() error

Start starts the k8s manager plugin

func (*K8SManager) Stop

func (k *K8SManager) Stop()

Stop stops the K8SManager.

Jump to

Keyboard shortcuts

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