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
Copy file name to clipboardExpand all lines: docs/src/operations/configuration.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
|`LEASE_DURATION_SECONDS`|`15`| How long the Lease is considered valid; a new leader is elected if not renewed in time |
20
20
|`LEASE_RENEW_DEADLINE_SECONDS`|`10`| The leader must renew the Lease within this many seconds; grace = duration − deadline |
21
21
|`LEASE_RETRY_PERIOD_SECONDS`|`2`| Documented for ops parity; not a direct LeaseManager parameter |
22
+
|`CAPI_MACHINE_API_VERSION`|_(discovered)_| Pins the Cluster API `Machine` version (`v1beta1` / `v1beta2`). Normally **left unset** — the controller discovers the version the cluster serves. Set only to override discovery (e.g. an air-gapped cluster where API discovery is restricted). See [CAPI Machine API version](#capi-machine-api-version). |
22
23
23
24
## Command-Line Arguments
24
25
@@ -69,6 +70,28 @@ Non-leader replicas watch for leadership changes and take over automatically wit
69
70
70
71
> **Note:** Leader election and multi-instance sharding (`OPERATOR_INSTANCE_COUNT > 1`) are alternative HA strategies. Use leader election for active/standby HA; use instance sharding to distribute load across all replicas.
71
72
73
+
### CAPI Machine API version
74
+
75
+
5-Spot creates and watches Cluster API `Machine` objects. The `Machine`*group* and
76
+
*kind* (`cluster.x-k8s.io` / `Machine`) are fixed by the CAPI contract, but the
77
+
served **version** varies by cluster — `v1beta1` on CAPI ≤ v1.10, `v1beta2` on
78
+
v1.11+ and modern k0smotron. The controller resolves it at startup with **no
79
+
hardcoded default**:
80
+
81
+
1.**`CAPI_MACHINE_API_VERSION`** — if set, this exact version is used (operator override).
82
+
2.**Discovery** — otherwise the controller discovers the version the API server
83
+
serves for `machines.cluster.x-k8s.io`.
84
+
85
+
Discovery is **mandatory**: if neither source yields a version (for example Cluster
86
+
API is not installed yet), the controller retries briefly, then exits and is
87
+
restarted by Kubernetes — it never guesses a version.
88
+
89
+
Per `ScheduledMachine`, the **created**`Machine` follows the version component of
90
+
your `bootstrapSpec.apiVersion` (passthrough), so the Machine, bootstrap, and
91
+
infrastructure objects all share one CAPI contract version. One controller image
92
+
therefore works against both `v1beta1` (e.g. CAPD) and `v1beta2` (e.g. modern
93
+
k0smotron) clusters with no configuration.
94
+
72
95
## Reclaim agent (DaemonSet)
73
96
74
97
The node-side `5spot-reclaim-agent` is a separate binary deployed
0 commit comments