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
type NodeLabeller ¶
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