podassignment

package
v0.0.0-...-f0ef8f0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProtectedLabelKey the protected label key
	ProtectedLabelKey = "pod.initializer.kube-valet.io/protected"
	// ProtectedLabelValue true
	ProtectedLabelValue = "true"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller processes pod events and assigns based on pars and cpars

func NewController

func NewController(podIndex cache.Indexer, cparIndex cache.Indexer, parIndex cache.Indexer, kubeClient kubernetes.Interface, valetClient valet.Interface, threadiness int, stopChannel chan struct{}) *Controller

NewController creates a new Controller

func (*Controller) OnAddPod

func (c *Controller) OnAddPod(pod *corev1.Pod)

OnAddPod processes the pod

func (*Controller) OnDeletePod

func (c *Controller) OnDeletePod(pod *corev1.Pod)

OnDeletePod if the pod was deleted

func (*Controller) OnUpdatePod

func (c *Controller) OnUpdatePod(oldPod *corev1.Pod, newPod *corev1.Pod)

OnUpdatePod if the pod has been updated

func (*Controller) PodManager

func (c *Controller) PodManager() *Manager

type Manager

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

func NewManager

func NewManager(podIndex cache.Indexer, cparIndex cache.Indexer, parIndex cache.Indexer, kubeClient kubernetes.Interface) *Manager

func (*Manager) GetPodAssignmentsScheduling

func (m *Manager) GetPodAssignmentsScheduling(pod *corev1.Pod) []*assignmentsv1alpha1.PodAssignmentRuleScheduling

TODO make this ordered!

func (*Manager) GetPodSchedulingPatches

func (m *Manager) GetPodSchedulingPatches(pod *corev1.Pod) []utils.JsonPatchOperation

func (*Manager) PodIsProtected

func (m *Manager) PodIsProtected(pod *corev1.Pod) bool

Jump to

Keyboard shortcuts

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