You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deleteCNRRequeue=app.Flag("delete-cnr-requeue", "How often to check if a CNR can be deleted").Default("24h").Duration()
48
49
defaultCNScyclingExpiry=app.Flag("default-cns-cycling-expiry", "Fail the CNS if it has been cycling for this long").Default("3h").Duration()
49
50
unhealthyPodTerminationThreshold=app.Flag("unhealthy-pod-termination-after", "How long to tolerate an un-evictable yet unhealthy pod before forcefully removing it").Default("5m").Duration()
51
+
52
+
nodeControllerReconcileConcurrency=app.Flag("node-controller-reconcile-concurrency", "Maximum number of concurrent node controller reconciles").Default("1").Int()
53
+
nodeControllerRequeueAfter=app.Flag("node-controller-requeue-after", "How often the node controller rechecks annotated nodes that are still covered by an active CNR").Default("5m").Duration()
The node controller is a controller-runtime reconciler for Kubernetes `Node` objects. Its current responsibility is to remove stale Cyclops-managed Cluster Autoscaler annotations that can be left behind when a `CycleNodeRequest` is deleted before normal CNR cleanup runs.
4
+
5
+
## Why it exists
6
+
7
+
Cyclops adds these annotations to replacement nodes during cycling:
The first annotation prevents Cluster Autoscaler from removing replacement nodes before the old nodes have drained and terminated. The second annotation records that Cyclops added the protection, so Cyclops does not remove annotations that were pre-existing on a node.
13
+
14
+
If a CNR disappears mid-cycle, the normal CNR transitioner cleanup may never run. The node controller acts as an eventual-consistency backstop so those nodes are not protected from scale-down forever.
15
+
16
+
## How it works
17
+
18
+
The controller watches `Node` objects using the manager's shared cache. A predicate only enqueues nodes with the Cyclops marker annotation, so ordinary node changes do not enter the reconcile loop.
19
+
20
+
For each matching node, the controller:
21
+
22
+
1. Confirms both the Cyclops marker and scale-down-disabled annotations are still present.
23
+
2. Confirms the node is selected by at least one `NodeGroup`.
24
+
3. Checks whether any non-terminal CNR in the configured namespace still selects the node.
25
+
4. Requeues after the configured interval if an active CNR still covers the node.
26
+
5. Removes both annotations if no active CNR covers the node.
27
+
28
+
`Successful` and `Failed` CNRs are terminal. Other phases, including `Healing`, are considered active.
29
+
30
+
## Configuration
31
+
32
+
The controller defaults are intentionally conservative:
33
+
34
+
-`--node-controller-reconcile-concurrency=1`
35
+
-`--node-controller-requeue-after=5m`
36
+
37
+
The controller is a safety net rather than a high-throughput reconciler, so one worker is normally enough. The requeue interval controls how often annotated nodes are rechecked while they are still covered by an active CNR.
38
+
39
+
## Observability
40
+
41
+
The node controller emits cleanup-specific metrics so we can tell when the backstop is doing work:
0 commit comments