Documentation ¶
Index ¶
- Constants
- func AllNodeCriticalDaemonPodsAreScheduled(log logr.Logger, recorder record.EventRecorder, node *corev1.Node, ...) bool
- func AllNodeCriticalPodsAreReady(log logr.Logger, recorder record.EventRecorder, node *corev1.Node, ...) bool
- func NodeHasCriticalComponentsNotReadyTaint(obj client.Object) bool
- func RemoveTaint(ctx context.Context, w client.Writer, node *corev1.Node) error
- type Reconciler
Constants ¶
const ControllerName = "node"
ControllerName is the name of the controller.
Variables ¶
This section is empty.
Functions ¶
func AllNodeCriticalDaemonPodsAreScheduled ¶
func AllNodeCriticalDaemonPodsAreScheduled(log logr.Logger, recorder record.EventRecorder, node *corev1.Node, daemonSets []appsv1.DaemonSet, nodeCriticalPods []corev1.Pod) bool
AllNodeCriticalDaemonPodsAreScheduled returns true if all node-critical DaemonSets that should be scheduled to the given node have been scheduled. It uses ownerReferences of the given node-critical pods on the node for this check.
func AllNodeCriticalPodsAreReady ¶
func AllNodeCriticalPodsAreReady(log logr.Logger, recorder record.EventRecorder, node *corev1.Node, nodeCriticalPods []corev1.Pod) bool
AllNodeCriticalPodsAreReady returns true if all the given pods are ready by checking their Ready conditions.
func NodeHasCriticalComponentsNotReadyTaint ¶
NodeHasCriticalComponentsNotReadyTaint returns true if the given Node has the taint that this controller manages.
Types ¶
type Reconciler ¶
type Reconciler struct { TargetClient client.Client Config config.NodeControllerConfig Recorder record.EventRecorder }
Reconciler manages taints on new Node objects to block scheduling of user workload pods until all node critical components are ready.
func (*Reconciler) AddToManager ¶
AddToManager adds Reconciler to the given manager.
func (*Reconciler) NodePredicate ¶
func (r *Reconciler) NodePredicate() predicate.Predicate
NodePredicate returns a predicate that filters for Node objects that are created with the taint.