k8s

package
v0.0.0-...-ddc1a4a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(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(ctx context.Context, podID string) error

KillPod stops and deletes the given pod

func (*K8SManager) LaunchPods

func (k *K8SManager) LaunchPods(
	ctx context.Context,
	pods []*models.LaunchablePod,
	hostname string,
) (launched []*models.LaunchablePod, err error)

LaunchPods creates a slice of pod objects, binds them 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