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