Documentation
¶
Index ¶
- func ValidateMatch(match *flipopv1alpha1.Match) error
- type Controller
- func (m *Controller) IsCriteriaEqual(match *flipopv1alpha1.Match) bool
- func (m *Controller) OnAdd(obj interface{}, _ bool)
- func (m *Controller) OnDelete(obj interface{})
- func (m *Controller) OnUpdate(_, newObj interface{})
- func (m *Controller) SetCriteria(match *flipopv1alpha1.Match)
- func (m *Controller) Start(ctx context.Context)
- func (m *Controller) Stop()
- type NodeEnableDisabler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateMatch ¶
func ValidateMatch(match *flipopv1alpha1.Match) error
ValidateMatch returns an error if the provided match spec is invalid.
Types ¶
type Controller ¶
Controller watches Kubernetes nodes and pods and enables or disables them with the provided action based upon the provided criteria.
func NewController ¶
func NewController(log logrus.FieldLogger, kubeCS kubernetes.Interface, action NodeEnableDisabler) *Controller
NewController builds a new node match Controller.
func (*Controller) IsCriteriaEqual ¶
func (m *Controller) IsCriteriaEqual(match *flipopv1alpha1.Match) bool
IsCriteriaEqual returns true if the specified criteria match the current criteria.
func (*Controller) OnAdd ¶
func (m *Controller) OnAdd(obj interface{}, _ bool)
OnAdd implements the shared informer ResourceEventHandler for corev1.Pod & corev1.Node.
func (*Controller) OnDelete ¶
func (m *Controller) OnDelete(obj interface{})
OnDelete implements the shared informer ResourceEventHandler for corev1.Pod & corev1.Node.
func (*Controller) OnUpdate ¶
func (m *Controller) OnUpdate(_, newObj interface{})
OnUpdate implements the shared informer ResourceEventHandler for corev1.Pod & corev1.Node.
func (*Controller) SetCriteria ¶
func (m *Controller) SetCriteria(match *flipopv1alpha1.Match)
SetCriteria sets the match criteria based on the match spec.
func (*Controller) Start ¶
func (m *Controller) Start(ctx context.Context)
Start begins asynchronous execution of the node match controller.
func (*Controller) Stop ¶
func (m *Controller) Stop()
Stop terminates execution of the node match controller and waits for it to finish.