Documentation ¶
Index ¶
Constants ¶
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 ¶
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) 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 ¶
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
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