controllers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaxConcurrentReconciles = 1

MaxConcurrentReconciles 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 is sufficient

Variables

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

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
	// 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) error

SetupWithManager sets up the controller with the Manager.

type NodeReconciler

type NodeReconciler struct {
	client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Manager    manager.Manager
	Conditions condition.Conditions
}

NodeReconciler reconciles a Node object

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) 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
	// DataStore is the cache with memory optimized Pod Objects
	DataStore       cache.Indexer
	DataStoreSynced *bool
}

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) 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