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