services

package
v0.0.0-...-aa771b6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DRSRuler

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

DRSRuler watches Kubernetes pods, whenever a pod is assigned to a node with pod-to-pod affinity or anti-affinity rule, it sets the VM-to-VM Affinity or anti-affinity rule to vSphere so that DRS (vSphere scheduler) doesn't do scheduling against Kubernetes. For example, DRS doesn't migrate VM to a host that breaks Kubernetes' anti-affinity rule.

func NewDRSRuler

func NewDRSRuler(
	podInformer cache.SharedIndexInformer,
	bcache bridgecache.Cache,
	podLister algorithm.PodLister,
	vsclient vsphere.Vsphere) *DRSRuler

NewDRSRuler creates an DRSRuler instance

func (*DRSRuler) OnAdd

func (r *DRSRuler) OnAdd(obj interface{})

OnAdd is handler for adding an pod object

func (*DRSRuler) OnDelete

func (r *DRSRuler) OnDelete(obj interface{})

OnDelete is handler for adding an pod object

func (*DRSRuler) OnUpdate

func (r *DRSRuler) OnUpdate(old, new interface{})

OnUpdate is handler for updating an pod object

func (*DRSRuler) Run

func (r *DRSRuler) Run(stopCh <-chan struct{})

Run starts the service

type NodeLabeller

type NodeLabeller struct {
	Interval time.Duration
	// contains filtered or unexported fields
}

NodeLabeller updates node's host information based on watching on vSphere.

func NewNodeLabeller

func NewNodeLabeller(nodeLister k8scache.NodeLister, nodeUpdater nodeupdater.NodeUpdater,
	vsclient vsphere.Vsphere, bridgecache bridgecache.Cache) *NodeLabeller

NewNodeLabeller creates a NodeLabeller

func (*NodeLabeller) Run

func (n *NodeLabeller) Run(stopCh <-chan struct{})

Run starts a service until stopCh is closed

Jump to

Keyboard shortcuts

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