Documentation ¶
Index ¶
- Constants
- type K8SManager
- func (k *K8SManager) AckPodEvent(ctx context.Context, event *scalar.PodEvent)
- func (k *K8SManager) KillPod(podID string) error
- func (k *K8SManager) LaunchPod(podSpec *pbpod.PodSpec, podID, hostname string) error
- func (k *K8SManager) ReconcileHosts() ([]*scalar.HostInfo, error)
- func (k *K8SManager) Start() error
- func (k *K8SManager) Stop()
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.
Click to show internal directories.
Click to hide internal directories.