kubernetesk8s.io/kubernetes/contrib/mesos/pkg/executor Index | Files | Directories

package executor

import "k8s.io/kubernetes/contrib/mesos/pkg/executor"

Package executor includes a mesos executor, which contains a kubelet as its member to manage containers.

Index

Types

type Config

type Config struct {
	Updates              chan<- kubetypes.PodUpdate // to send pod config updates to the kubelet
	APIClient            *client.Client
	Docker               dockertools.DockerInterface
	ShutdownAlert        func()
	SuicideTimeout       time.Duration
	KubeletFinished      <-chan struct{} // signals that kubelet Run() died
	ExitFunc             func(int)
	PodStatusFunc        func(*api.Pod) (*api.PodStatus, error)
	StaticPodsConfigPath string
	PodLW                cache.ListerWatcher // mandatory, otherwise initialiation will panic
	LaunchGracePeriod    time.Duration
	NodeInfos            chan<- NodeInfo
}

type Executor

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

KubernetesExecutor is an mesos executor that runs pods in a minion machine.

func New

func New(config Config) *Executor

New creates a new kubernetes executor.

func (*Executor) Disconnected

func (k *Executor) Disconnected(driver bindings.ExecutorDriver)

Disconnected is called when the executor is disconnected from the slave.

func (*Executor) Error

func (k *Executor) Error(driver bindings.ExecutorDriver, message string)

Error is called when some error happens.

func (*Executor) FrameworkMessage

func (k *Executor) FrameworkMessage(driver bindings.ExecutorDriver, message string)

FrameworkMessage is called when the framework sends some message to the executor

func (*Executor) Init

func (k *Executor) Init(driver bindings.ExecutorDriver)

func (*Executor) KillTask

func (k *Executor) KillTask(driver bindings.ExecutorDriver, taskId *mesos.TaskID)

KillTask is called when the executor receives a request to kill a task.

func (*Executor) LaunchTask

func (k *Executor) LaunchTask(driver bindings.ExecutorDriver, taskInfo *mesos.TaskInfo)

LaunchTask is called when the executor receives a request to launch a task. The happens when the k8sm scheduler has decided to schedule the pod (which corresponds to a Mesos Task) onto the node where this executor is running, but the binding is not recorded in the Kubernetes store yet. This function is invoked to tell the executor to record the binding in the Kubernetes store and start the pod via the Kubelet.

func (*Executor) Registered

func (k *Executor) Registered(
	driver bindings.ExecutorDriver,
	executorInfo *mesos.ExecutorInfo,
	frameworkInfo *mesos.FrameworkInfo,
	slaveInfo *mesos.SlaveInfo,
)

Registered is called when the executor is successfully registered with the slave.

func (*Executor) Reregistered

func (k *Executor) Reregistered(driver bindings.ExecutorDriver, slaveInfo *mesos.SlaveInfo)

Reregistered is called when the executor is successfully re-registered with the slave. This can happen when the slave fails over.

func (*Executor) Shutdown

func (k *Executor) Shutdown(driver bindings.ExecutorDriver)

Shutdown is called when the executor receives a shutdown request.

type NodeInfo

type NodeInfo struct {
	Cores int
	Mem   int64 // in bytes
}

Source Files

doc.go executor.go node.go observer.go suicide.go

Directories

PathSynopsis
contrib/mesos/pkg/executor/configPackage config contains executor configuration constants.
contrib/mesos/pkg/executor/messagesPackage messages exposes executor event/message names as constants.
contrib/mesos/pkg/executor/servicePackage service contains the cmd/k8sm-executor glue code.
Version
v1.2.0-alpha.5
Published
Dec 15, 2015
Platform
js/wasm
Imports
29 packages
Last checked
35 seconds ago

Tools for package owners.