node

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNodeController

func AddNodeController(mgr manager.Manager, met *metrics.Metrics) error

Add creates a new Node Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type NodeReconciler

type NodeReconciler struct {
	// This Client, initialized using mgr.Client() above, is a split Client
	// that reads objects from the cache and writes to the apiserver
	Client client.Client
	// Used for pods
	RestClient rest.Interface
	Cfg        *rest.Config
	Scheme     *runtime.Scheme
	Metrics    *metrics.Metrics
}

NodeReconciler reconciles a Node object

func (*NodeReconciler) NodeControllerReconcile

func (r *NodeReconciler) NodeControllerReconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Node object and makes changes based on the state read and what is in the Node.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the FileIntegrity object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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