controllers

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxNodeConcurrentReconciles = 10
)

MaxNodeConcurrentReconciles is the number of go routines that can invoke Reconcile in parallel. Since Node Reconciler, performs local operation on cache only a single go routine should be sufficient. Using more than one routines to help high rate churn and larger nodes groups restarting when the controller has to be restarted for various reasons.

Variables

View Source
var (
	PodRequeueRequest          = ctrl.Result{Requeue: true, RequeueAfter: time.Second}
	MaxPodConcurrentReconciles = 10
)

Functions

func UpdateNodesOnConfigMapChanges added in v1.1.0

func UpdateNodesOnConfigMapChanges(k8sAPI k8s.K8sWrapper, nodeManager manager.Manager) error

Types

type ConfigMapReconciler added in v1.1.0

type ConfigMapReconciler struct {
	client.Client
	Log         logr.Logger
	Scheme      *runtime.Scheme
	NodeManager manager.Manager
	K8sAPI      k8s.K8sWrapper
	Condition   condition.Conditions

	Context context.Context
	// contains filtered or unexported fields
}

ConfigMapReconciler reconciles a ConfigMap object

func (*ConfigMapReconciler) Reconcile added in v1.1.0

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

func (*ConfigMapReconciler) SetupWithManager added in v1.1.0

func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager, healthzHandler *rcHealthz.HealthzHandler) error

SetupWithManager sets up the controller with the Manager.

type NodeReconciler

type NodeReconciler struct {
	client.Client
	K8sAPI     k8s.K8sWrapper
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Manager    manager.Manager
	Conditions condition.Conditions
	Context    context.Context
}

NodeReconciler reconciles a Node object

func (*NodeReconciler) Check added in v1.1.6

func (r *NodeReconciler) Check() healthz.Checker

func (*NodeReconciler) Reconcile

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

Reconcile Adds a new node by calling the Node Manager. A node can be added as a Managed Node in which case the controller can provide resources for Pod's scheduled on the node or it can be added as a un managed Node in which case controller doesn't do any operations on the Node or any Pods scheduled on the Node. A node can be toggled from Un-Managed to Managed and vice-versa in which case the Node Manager updates it's status accordingly

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager, healthzHandler *rcHealthz.HealthzHandler) error

type PodReconciler

type PodReconciler struct {
	Log logr.Logger
	// ResourceManager provides the handlers for creation/deletion of
	// resources supported by vpc-resource-controller
	ResourceManager resource.ResourceManager
	// Manager manages all the nodes on the cluster
	NodeManager manager.Manager
	K8sAPI      k8s.K8sWrapper
	// DataStore is the cache with memory optimized Pod Objects
	DataStore cache.Indexer
	Condition condition.Conditions
}

func (*PodReconciler) Reconcile added in v1.1.0

func (r *PodReconciler) Reconcile(request custom.Request) (ctrl.Result, error)

Reconcile handles create/update/delete event by delegating the request to the handler if the resource is supported by the controller.

func (*PodReconciler) SetupWithManager added in v1.1.0

func (r *PodReconciler) SetupWithManager(ctx context.Context, manager ctrl.Manager,
	clientSet *kubernetes.Clientset, pageLimit int, syncPeriod time.Duration, healthzHandler *rcHealthz.HealthzHandler) error

SetupWithManager adds the custom Pod controller's runnable to the manager's list of runnable. After Manager acquire the lease the pod controller runnable will be started and the Pod events will be sent to Reconcile function

Jump to

Keyboard shortcuts

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