node

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
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

func NodeHasCriticalComponentsNotReadyTaint(obj client.Object) bool

NodeHasCriticalComponentsNotReadyTaint returns true if the given Node has the taint that this controller manages.

func RemoveTaint

func RemoveTaint(ctx context.Context, w client.Writer, node *corev1.Node) error

RemoveTaint removes the taint managed by this controller from the given node object

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

func (r *Reconciler) AddToManager(mgr manager.Manager, targetCluster cluster.Cluster) error

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.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(reconcileCtx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile checks if the critical components not ready taint can be removed from the Node object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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