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
`--image` rewrites the top-level `image:` field in the preset's `values.yaml` before write. The flag is honored on initial `init` only — for an existing project, edit `values.yaml` directly. The `cozystack` preset declares `image:`; the `generic` preset does not, so `--image --preset generic` is rejected up front.
63
63
64
-
Edit `values.yaml` to set your cluster's control-plane endpoint. This is the URL every node's kubelet and kube-proxy will dial. The chart leaves it empty on purpose so a missed override fails loudly instead of silently embedding a placeholder. For cozystack VIP setups set `endpoint` and `floatingIP` together (same IP, single shared VIP); for single-node clusters use that node's routable IP and leave `floatingIP` blank; for multi-node with an external load balancer use the LB URL and leave `floatingIP` blank. When the VIP must sit on a link that does not yet exist on the live system at first apply (typically a VLAN sub-interface), set `vipLink` to that link name — the chart pins `Layer2VIPConfig.link` to it instead of the default-gateway link that discovery would otherwise pick, and emits the document even on a totally fresh node where no default-gateway link has been discovered yet. The chart does not auto-emit a `LinkConfig` or `VLANConfig` for the override link; the operator is responsible for ensuring the link comes up, typically by adding a `LinkConfig` or `VLANConfig` for that link to the per-node body overlay alongside `vipLink`. Subnet-selector fields (`kubelet.validSubnets`, `etcd.advertisedSubnets`) are derived automatically from the node's default-gateway-bearing link, so no override is needed unless you have a multi-homed node that requires a specific subnet pinned.
64
+
Edit `values.yaml` to set your cluster's control-plane endpoint. This is the URL every node's kubelet and kube-proxy will dial. The chart leaves it empty on purpose so a missed override fails loudly instead of silently embedding a placeholder.
65
+
66
+
Endpoint / floatingIP combinations:
67
+
68
+
-**cozystack VIP setup**: set `endpoint` and `floatingIP` together to the same IP — single shared VIP.
69
+
-**single-node cluster**: set `endpoint` to the node's routable IP and leave `floatingIP` blank.
70
+
-**multi-node with external load balancer**: set `endpoint` to the LB URL and leave `floatingIP` blank.
71
+
72
+
When `vipLink` is left empty the chart picks the link automatically using a two-step rule:
73
+
74
+
1.**Longest-prefix match across configurable links.** If `floatingIP` falls inside the CIDR of any address on a configurable link (physical NIC, bond, VLAN, bridge), the most specific subnet wins. This handles the Hetzner-style topology where a public NIC carries the default route and a VLAN child carries the private cluster subnet — the VIP lands on the VLAN child.
75
+
2.**Fallback to the IPv4-default-gateway-bearing link.** Used when no configurable link's CIDR contains the `floatingIP` — typical for upstream-routable VIPs that arrive via the default route.
76
+
77
+
Addresses on links the chart does not emit a per-link document for (Wireguard, kernel-managed loopback, slave NICs of a bond, anything outside the configurable set) are skipped — a VIP pinned there would have no surrounding network document.
78
+
79
+
Set `vipLink` explicitly when the target link does not yet exist on the live system at first apply (typically a VLAN sub-interface). The chart pins `Layer2VIPConfig.link` to it directly and emits the document even on a fresh node where discovery has not yet populated the addresses table. The chart does not auto-emit a `LinkConfig` or `VLANConfig` for the override link; the operator is responsible for ensuring the link comes up, typically by adding a `LinkConfig` or `VLANConfig` for that link to the per-node body overlay alongside `vipLink`.
80
+
81
+
Subnet-selector fields (`kubelet.validSubnets`, `etcd.advertisedSubnets`) are derived automatically from the node's default-gateway-bearing link, so no override is needed unless you have a multi-homed node that requires a specific subnet pinned.
65
82
66
83
Boot Talos Linux node, let's say it has address `192.0.2.4`. Then:
67
84
@@ -126,7 +143,30 @@ cluster:
126
143
endpoint: https://192.0.2.4:6443
127
144
```
128
145
129
-
> **Note:** The output format depends on the Talos version configured in `Chart.yaml` (`templateOptions.talosVersion`) or via the `--talos-version` CLI flag. For Talos < v1.12, the output is a single YAML document with `machine.network` and `machine.registries` sections (as shown above). For Talos >= v1.12, the output uses the multi-document format with separate typed documents instead of the deprecated monolithic fields. `HostnameConfig` and `ResolverConfig` are always emitted; one network interface document is emitted per configurable link on the node (`LinkConfig` for physical NICs, `BondConfig` for bond masters, `VLANConfig` for VLAN sub-interfaces) — multi-NIC nodes therefore produce one document per NIC, not one document total. The link carrying the IPv4 default route gets the gateway entry on its document; every other link is emitted gateway-less. Both IPv4 and IPv6 global-scope addresses on a link are surfaced in its document. Bond slaves are filtered out so they do not collide with the master's `BondConfig`. Bridges are deliberately not auto-emitted as `BridgeConfig` yet — a non-gateway bridge is skipped (declare it via a per-node body overlay if needed); a bridge that carries the default route fails the render with a clear migration hint. The operator-declared `floatingIP` is stripped from per-link addresses so the VIP currently held by a leader does not leak into the static `LinkConfig`. `Layer2VIPConfig` appears on controlplane nodes when `floatingIP` is set; `RegistryMirrorConfig` is emitted only by the cozystack chart.
146
+
> **Note: output format depends on Talos version.**
147
+
>
148
+
> Selected via `Chart.yaml` (`templateOptions.talosVersion`) or `--talos-version`:
149
+
>
150
+
> - **Talos < v1.12** — single YAML document with `machine.network` and `machine.registries` sections (as shown above).
151
+
> - **Talos >= v1.12** — multi-document format with separate typed documents instead of the deprecated monolithic fields.
152
+
>
153
+
> For v1.12+ multi-doc output, one document is emitted per configurable link on the node, plus a fixed pair on every render:
154
+
>
155
+
> - `HostnameConfig` and `ResolverConfig` — always emitted.
156
+
> - `LinkConfig` — physical NICs.
157
+
> - `BondConfig` — bond masters. Bond slaves are filtered out so they do not collide with the master's document.
158
+
> - `VLANConfig` — VLAN sub-interfaces.
159
+
> - `BridgeConfig` — bridges, symmetric to `BondConfig` for bonds. Ports discovered via `spec.slaveKind == "bridge"` + `spec.masterIndex`; STP / VLAN-filtering settings reach the output when the bridge controller reports them on `spec.bridgeMaster`.
160
+
> - `Layer2VIPConfig` — controlplane nodes when `floatingIP` is set.
> - The link carrying the IPv4 default route gets the `routes.gateway` entry on its document; every other link is emitted gateway-less. Applies uniformly to `LinkConfig`, `BondConfig`, `VLANConfig`, `BridgeConfig`.
166
+
> - Both IPv4 and IPv6 global-scope addresses on a link are surfaced.
167
+
> - The operator-declared `floatingIP` is stripped from per-link addresses so the VIP currently held by a leader does not leak into the static document.
168
+
>
169
+
> Multi-NIC nodes therefore produce one document per NIC, not one document total.
130
170
131
171
> **Version compatibility (`templateOptions.talosVersion` / `--talos-version`).** This setting must match the **Talos version actually running on the target node** — i.e. the maintenance ISO/PXE the node booted from for `apply -i`, or the installed Talos for an authenticated apply. It is **not** the same as `install.image`, which only controls what gets written to disk after a successful apply. When the configured contract is newer than the running binary, machinery injects fields (e.g. `machine.install.grubUseUKICmdline` from v1.12) that the running parser does not know, and the apply fails on the node side with `failed to parse config: unknown keys found during decoding: ...`. `talm apply` runs a best-effort pre-flight check against the running version and prints a `warning: pre-flight: ...` line with a hint when it detects this mismatch; if the warning is missed, the same hint is appended to the apply error. Either reboot the node into a maintenance image that matches the configured contract, or lower `templateOptions.talosVersion` / `--talos-version` to match what is running.
{{- $linkGateway= include "talm.discovered.gateway_by_link"$linkName }}
240
266
{{- end }}
241
267
{{- ifeq$kind"bridge" }}
242
-
{{- /* BridgeConfig is a separate v1alpha1 typed document the chart
243
-
does not yet emit. Skipping a non-gateway bridge leaves the
244
-
rendered config without a bridge document and the operator is
245
-
responsible for declaring it via a per-node body. A bridge
246
-
carrying the IPv4 default route, however, cannot be silently
247
-
skipped: that would drop every network document for the
248
-
gateway link and the rendered config would describe a node
249
-
with no working uplink. Surface a fail with the offending
250
-
link and the migration path. */ -}}
251
-
{{- if$isGatewayLink }}
252
-
{{- fail (printf"talm: discovered bridge %q is the IPv4-default link, but BridgeConfig emission is not yet implemented in the chart. Move the bridge declaration into a per-node body overlay (kind: BridgeConfig), or set Values.vipLink to a different link until bridge support lands."$linkName) }}
268
+
{{- /* BridgeConfig emission. Discovers bridge ports (members) via
269
+
talm.discovered.bridge_slaves and emits a typed v1.12+
270
+
BridgeConfig document with the same address / route / mtu
271
+
shape as the other branches. STP and VLAN filtering are
272
+
opt-in: they are emitted only when the bridge controller
273
+
reported a non-nil spec.bridgeMaster.stp / spec.bridgeMaster
274
+
value, so a default-state bridge stays minimal. */ -}}
0 commit comments