2168 Commits

Author SHA1 Message Date
Mateusz Urbanek
5e2fc260a8
fix: revert add extraArgs from service-account-issuer
This reverts commit d1954278a1ba3470b2e5ccae90762078c18d69e9.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit f19eef78b9cc01c107f86a6eddf24da0d288d124)
2026-04-27 10:43:57 +02:00
Mateusz Urbanek
17448fcd29
fix: revert use append instead of prepend in service-account-issuer
This reverts commit 01a3678913de0fa4d309a361428c117d24ce0d1e.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit 6821225b64ddd48e5cc0d16ab80204d539110f78)
2026-04-27 10:42:47 +02:00
Andrey Smirnov
f62c331130
refactor: make all controller unit-test follow modern patterns
Kill old-style "manual" tests, use `ctest` consistently now.

This should be no-op refactoring.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit df0b9a8da1423842d830261e5ddc5dc8f5a234c1)
2026-04-24 21:50:39 +04:00
Andrey Smirnov
9f04f2c4ef
fix: watch kubelet's kubeconfig and time out for cache sync
Fixes #13169

Also fixes a number of other issues with controller being stuck
"watching" over stale data.

The major part of the change is to watch contents of kubelet's
kubeconfig and restart the watch when it changes.

The internals of the watch process don't always bubble up error
properly, or we don't watch for errors.

With this change, not only initial sync has a timeout and a way to abort
the sync process, Talos now can also restart the sync on kubeconfig
change make it more transparent.

This might become irrelevant if we start managing kubeconfig via Talos
controlplane for workers, but for now this seems to be the way to fix
issues.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 149592fa59d20c5aa29e4c0af9a3760585f378ce)
2026-04-24 21:45:14 +04:00
Andrey Smirnov
d4d018b546
fix: propagate route table down to the resource
Fixes #13153

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 3399ff4de05b4fafb8511d6399e919436f1178da)
2026-04-24 21:44:31 +04:00
Utku Ozdemir
8035e6e49b
fix: do not flip machine stage to rebooting during shutdown
At the end of every sequence that intentionally terminates the machine (reboot, shutdown, upgrade, etc.), a fatal event is published to signal expected termination. The machine status controller was unconditionally flipping the stage to "rebooting" on this event, which was correct for sequences that end in a reboot but incorrect for the shutdown sequence whose expected termination is a power-off.

The stage tracker now skips this transition when the current sequence is shutdown, so the machine stays in "shutting down" until it actually powers off.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
(cherry picked from commit c028db0b8d25e85a4b580e10252d964785320291)
2026-04-24 21:43:48 +04:00
Noel Georgi
10606bdfe8
fix: boot entry detection
Fixes: #13080

Signed-off-by: Noel Georgi <git@frezbo.dev>
(cherry picked from commit 509cd9733926a6994843fb58ccdf38e5cd63a382)
2026-04-24 21:43:29 +04:00
Andrey Smirnov
a922d1540c
fix: return failed precondition on upgrade when not installed
This check was in maintenance Upgrade API for Talos <= 1.12,
so keep it in the "normal" API as well.

It always makes sense - the upgrade would fail if Talos is not
installed, but that failure in legacy Upgrade API is async and not
reported properly back.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 0d8362119e4415182caa9349e0ddfb27ea290d90)
2026-04-24 21:41:14 +04:00
Andrey Smirnov
252799a00b
fix: reduce memory dashboard usage
Many small changes, memory reduction measured to be aroun -20MiB.

Reduce cgroup memory limit.

Changes:

* limit updates to 2fps
* batch log updates
* reuse/maps slices to reduce allocations

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit bdcc9321b637da77f1007a571193c2e03c984b8b)
2026-04-24 21:40:52 +04:00
Andrey Smirnov
370c035ab6
fix: audit trustd code for security
There are no security issues fixed.

Drop username/password creds - they were not used.

Improve security of token interceptor.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 9fbb7c95df2b1dcd68fafa23865412bbd8300f4b)
2026-04-24 21:39:29 +04:00
Andrey Smirnov
1a519a4108
test: allow more tests to run in FIPS strict mode
Remove the skip statements/rework the code to allow
FIPS builds to do Wireguard by wrapping Wireguard operations
into `fips140.WithoutEnforcement` blocks.

Using Wireguard (or not using it) is still a user's choice, but this
allows tests to run in strict mode.

There might be more fixes required for FIPS strict, right now being
blocked by Go issue with X25119 which is going to be backported to Go
1.26.3.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 1ef8e630ab77b3c849e7da6d1ff83e7c6795f070)
2026-04-24 21:37:23 +04:00
Nico Berlee
929ab71653
fix(machined): clear stale bond ARP/NS targets on decode
Reset ARPIPTargets and NSIP6Targets at the start of BondMasterSpec.Decode.

Without this, repeated decode calls on the same struct can retain old target
entries after config removes them, which makes link status drift from
current bond configuration.

Add a regression test that decodes a payload with targets, then decodes a
payload without target attributes into the same struct and asserts both
slices are empty.

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 0a47f40b3cdf304a079c6b3fa964e9f82e91ec63)
2026-04-15 19:29:36 +04:00
Noel Georgi
730937eee9
chore: bump tools
Bump tools

Signed-off-by: Noel Georgi <git@frezbo.dev>
(cherry picked from commit e3e8f01ca66ee74898ebba5dadf4f199775d278e)
2026-04-15 19:29:36 +04:00
Andrey Smirnov
53609713f3
fix: upgrade API in maintenance mode (legacy)
Add an integration test and fix legacy upgrade API in maintenance mode.

There were several assumptions which do not hold true in maintenance as
we have no machine configuration.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit c464c7e88a3f058cb2bbc36af1910d69d903cd07)
2026-04-15 19:29:33 +04:00
Andrey Smirnov
2de7fb60d5
refactor: allow overriding out image name suffix
Also fix one more place when version.Name wasn't used properly.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 4ba11156fd164a0d94538508f5c028f249deed50)
2026-04-15 19:29:32 +04:00
Mateusz Urbanek
7d7776dcaa
fix: handle boot failure
Fixes #13083

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit 181584a5f1850f2bfb2a837c0d05bd9e30ee48b5)
2026-04-15 18:45:08 +04:00
Andrey Smirnov
db2c007ee7
fix: create correct blackhole routes for IPv4
For IPv4, they should be attached to no interfaces.

Discovered while doing some manual testing for the documentation.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 0bfdf7f7035fefe804ec4b568709cd6a09195293)
2026-04-15 18:44:14 +04:00
Andrey Smirnov
6f84628494
refactor: propagate NAME properly, allow to set on build
Allow to set build NAME on build, propagate it down to more consumers.

Expose name in `Version` resource, and use that in the dashboard
next to Talos version.

Fix some places where `Name` was hardcoded.

Propagate Name down to UKI build.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 968ec1e0ca26eb1f0de0836e0a55df09dea7dafe)
2026-04-15 18:43:43 +04:00
Andrey Smirnov
8499579f4a
fix: add os:meta:writer role to the dashboard
When dashboard runs within Talos, it previously used `os:admin` role
which allows anything.

With changes in 1.13, I dropped the role to `os:reader`, which is a way
tighter scope from the security perspective, but it broke network config
tab - it tries to write to META, which is not allowed under `os:reader`
role, so this change fixes the dashboard, but still keeps the RBAC
tight.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 649ab7fe4234de1a947071926603377e00910cb9)
2026-04-15 18:36:09 +04:00
Andrey Smirnov
f7be2c5984
feat: add resource view to talosctl dashboard
Fixes #12933

There are many usecases for this:

* exploring resources and state of the system, learning available
  resources
* when a Talos machine is booted up in an environment without network
  access, learning all available network interfaces, all disks
  available, etc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 5e24d5265bde9adee92c02e675140de87ee126bf)
2026-04-15 18:35:18 +04:00
Mateusz Urbanek
38d391e9dc
fix: always grow disks
Previously, there was no way to grow virtual disks attached to VMs,
even though resizing them was possible (e.g. through hypervisor changing
the size of disk). This forces the UserVolume of type=disk to always
grow to full size of the disk.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit e2df0f6ce8c47b0dc3e93bf257afb8a1ae9243fb)
2026-04-15 18:34:01 +04:00
Utku Ozdemir
f0c5cb517f
fix: add metal-agent mode to runtime capabilities
The runtime capabilities lookup did not include an entry for the metal-agent mode, causing an index out of range panic when any capability check was performed in that mode. This broke MetaWrite calls from Omni to machines running in metal-agent mode through the new unified apid, preventing them from appearing as pending machines.

Also fix the incorrect comments on the existing entries to match the actual iota order.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
(cherry picked from commit 783a35851ed1bac4ddd0f1fed583fc1b6477614d)
2026-04-15 18:33:41 +04:00
Andrey Smirnov
abc0ddf11e
feat: bump musl to 1.2.6
Bump via tools/extensions.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit b3dfbf743e6c2fd44020911ee1e0eea3a7676579)
2026-03-26 16:10:07 +04:00
Orzelius
fcdfeab2ba
fix: incorrect route source for on-link routes
when processing on-link routes, the source address was incorrectly set to the first address of the interface.
This caused issues when the interface had multiple addresses, as the source address may not have been valid for the route.
The source address is now set to an empty string, which allows the kernel to automatically select the appropriate source address for the route.

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
(cherry picked from commit 3400059ccf4811140a4326397d972f68693c708c)
2026-03-26 16:07:07 +04:00
Andrey Smirnov
7978152094
fix: allow blockdevice wipe in maintenance mode
This is a regression compared to Talos 1.12: allow blockdevice wipe in
maintenance mode (with `os:reader` role).

Also improve the test for maintenance via SideroLink - add a test on
install, META write and reboot preserving META value.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 1dd701efa8119b6515a62ff68c430c99a96f2b68)
2026-03-26 16:03:43 +04:00
Andrey Smirnov
902c78a17e
test: improve maintenance API provision tests
Add a test that covers all maintenance APIs in general.

Add a test for transition from SideroLink.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit ad72c73006abc3b51e5371496c61d8637b2222f0)
2026-03-26 16:01:16 +04:00
Andrey Smirnov
d82fada75b
fix: unset rlimits for extension services
See https://github.com/siderolabs/talos/discussions/13012

The containerd's default OCI spec sets NOFILE rlimit to 1024,
unset it to simply let machined defaults take over.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 8ac47d677703624ec6568294d94dcad7e533e6c4)
2026-03-26 15:59:25 +04:00
Andrey Smirnov
76931f4092
feat: enforce PID check on connections to services over file sockets
Whitelist services which can access the file socket, refuse other
connections.

Fixes #12701

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 038cb87354eea1c1ff4612bdd13d1e77e595955a)
2026-03-26 15:58:41 +04:00
Andrey Smirnov
b7d70cf625
feat: unify maintenance and regular APIs
Drop maintenance service and all the code supporting it directly.

Instead, move all network API termination into the `apid` service, which
now can work now in more modes to support maintenance operations as
well.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-17 17:00:35 +04:00
Andrey Smirnov
5c39a85814
fix: drop aws & azure KMS APIs from the machined build
Replace imports of `pkg/imager` which are reachable from machined.

See #12980

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-16 21:44:26 +04:00
Andrey Smirnov
3d059754c2
fix: accept image cache volume encryption config
Fixes #12945

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-16 19:01:49 +04:00
Mateusz Urbanek
13ef0cfc9b
fix: unmount pseudo-late recursively
Pseudo late mount points (`/system`, `/run` and `/system`) were consistently failing to unmount.
While reaching this unmount sequence, we should already have unmounted any children.
However, if those are not unmounted, we should log what are we unmounting and unmount them recursively.

Fixes #12974

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2026-03-16 14:14:01 +01:00
Andrey Smirnov
e9d45671a8
fix: panic in hardware.SystemInfoController
The panic:

```
2026/03/16 13:39:56 172.20.0.3: {"component":"controller-runtime","controller":"hardware.SystemInfoController","error":"controller \"hardware.SystemInfoController\" panicked: output tracking already enabled\n\ngoroutine 613 [running]:\nruntime/debug.Stack()\n\t/go/src/runtime/debug/stack.go:26 +0x5e\ngithub.com/cosi-project/runtime/pkg/controller/runtime/internal/rruntime.(*Adapter).runOnce.func2()\n\t/.cache/mod/github.com/cosi-project/runtime@v1.14.0/pkg/controller/runtime/internal/rruntime/run.go:67 +0x4c\npanic({0x2a43dc0?, 0x350ff30?})\n\t/go/src/runtime/panic.go:860 +0x13a\ngithub.com/cosi-project/runtime/pkg/controller/runtime/internal/rruntime.(*Adapter).StartTrackingOutputs(0x38246abe1c98?)\n\t/.cache/mod/github.com/cosi-project/runtime@v1.14.0/pkg/controller/runtime/internal/rruntime/output_tracker.go:25 +0x94\ngithub.com/siderolabs/talos/internal/app/machined/pkg/controllers/hardware.(*SystemInfoController).Run(0x38246a3fe280, {0x3549b50, 0x38246a96dbd0}, {0x358b070, 0x38246adaf0e0}, 0x38246adba000)\n\t/src/internal/app/machined/pkg/controllers/hardware/system.go:93 +0x127\ngithub.com/cosi-project/runtime/pkg/controller/runtime/internal/rruntime.(*Adapter).runOnce(0x38246adaf0e0, {0x3549b50, 0x38246a96dbd0}, 0x38246adba000)\n\t/.cache/mod/github.com/cosi-project/runtime@v1.14.0/pkg/controller/runtime/internal/rruntime/run.go:73 +0xfa\ngithub.com/cosi-project/runtime/pkg/controller/runtime/internal/rruntime.(*Adapter).Run(0x38246adaf0e0, {0x3549b50, 0x38246a96dbd0})\n\t/.cache/mod/github.com/cosi-project/runtime@v1.14.0/pkg/controller/runtime/internal/rruntime/run.go:25 +0x16b\ngithub.com/cosi-project/runtime/pkg/controller/runtime.(*Runtime).Run.func1.2()\n\t/.cache/mod/github.com/cosi-project/runtime@v1.14.0/pkg/controller/runtime/runtime.go:201 +0x2e\ngithub.com/cosi-project/runtime/pkg/controller/runtime.(*Runtime).Run.func1.goFunc.3()\n\t/.cache/mod/github.com/cosi-project/runtime@v1.14.0/pkg/controller/runtime/runtime.go:473 +0x13\ngolang.org/x/sync/errgroup.(*Group).Go.func1()\n\t/.cache/mod/golang.org/x/sync@v0.20.0/errgroup/errgroup.go:93 +0x50\ncreated by golang.org/x/sync/errgroup.(*Group).Go in goroutine 146\n\t/.cache/mod/golang.org/x/sync@v0.20.0/errgroup/errgroup.go:78 +0x95\n","msg":"2026-03-16T09:39:56.457Z \u001b[31mERROR\u001b[0m controller failed","talos-level":"info","talos-service":"controller-runtime","talos-time":"2026-03-16T09:39:56.718594712Z"}
```

This more of a cosmetic issue, but still - move tracking outputs below
the `continue` statement, otherwise it might be called twice in a single
run.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-16 13:52:46 +04:00
Noel Georgi
e7e21fe8ee
feat: bump dependencies
Bump dependencies.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2026-03-15 20:53:59 +05:30
Mateusz Urbanek
6bb5cf57a2
feat: implement routing rules support
Add RoutingRuleConfig multi-doc config type for management of routing rules.
KubeSpan now uses COSI resources instead of direct kernel management.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2026-03-13 15:17:49 +01:00
Mickaël Canévet
cff0f57825
fix(machined): support USERDATA legacy fallback in OpenNebula driver
The reference does USER_DATA="${USER_DATA:-${USERDATA}}". Talos only read
USER_DATA, silently returning ErrNoConfigSource when a VM used the legacy
USERDATA variable name.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:15:24 +04:00
Mickaël Canévet
5d3a326c80
feat(machined): add ONEGATE proxy route and deterministic interface iteration for OpenNebula
When ONEGATE_ENDPOINT contains a link-local IPv4 address (169.254.x.x),
emit a /32 scope-link host route via the first static interface, matching
the reference add_onegate_proxy_route behavior. Without this route, VMs
using link-local OneGate endpoints cannot reach the metadata service.

Interface names are now collected and sorted before processing, matching
the reference env | grep ... | sort behavior (ETH0, ETH1, ...). This
makes DNS server ordering and ONEGATE route attachment deterministic
regardless of Go map iteration order.

The interface loop is extracted into processInterfaces to keep ParseMetadata
within cyclomatic complexity limits.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:15:15 +04:00
Mickaël Canévet
3bec5cc7ba
feat(machined): inherit IP6_METHOD from METHOD in OpenNebula driver
When ETH*_IP6_METHOD is unset, fall back to the value of ETH*_METHOD,
matching the reference [ -z "$ip6_method" ] && ip6_method="${method}"
logic in setup_iface_vars. This means a DHCP interface now also gets a
DHCPv6 operator, a static interface stays static, and a skip interface
remains fully skipped. Update golden testdata to include the DHCPv6
operator that ETH1_METHOD=dhcp now emits.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:15:06 +04:00
Mickaël Canévet
4f4ec98060
fix(machined): align OpenNebula hostname precedence with reference
Use SET_HOSTNAME exclusively, matching the reference net-15-hostname
script. The previous implementation fell back to HOSTNAME (not used by
OpenNebula) and NAME (the VM name, not a hostname source in the
reference). DNS_HOSTNAME is a server-side flag that triggers a reverse
DNS lookup — a live network operation that cannot be performed inside
ParseMetadata.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:58 +04:00
Mickaël Canévet
4d0244ddf7
feat(machined): add IPv6 alias address support for OpenNebula (ETH*_ALIAS*_IP6)
Extends parseAliases to read ETH*_ALIAS*_IP6 (legacy: ETH*_ALIAS*_IPV6)
and ETH*_ALIAS*_IP6_PREFIX_LENGTH (default 64), emitting an IPv6
AddressSpecSpec subject to the same EXTERNAL/DETACH skip logic as IPv4
aliases.

Error tests for IPv4/IPv6 addresses, aliases, and gateway are consolidated
into a single TestParseErrors function to avoid duplication.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:51 +04:00
Mickaël Canévet
5bb896230e
feat(machined): support ETH*_IP6_METHOD (static/dhcp/auto/disable) for OpenNebula
Dispatches on ETH*_IP6_METHOD before the static IPv6 path:
- disable: skip all IPv6 config for the interface
- auto: emit nothing; Talos accepts Router Advertisements by default so
  SLAAC address auto-configuration works without any explicit operator
- dhcp: emit OperatorDHCP6 with RouteMetric from ETH*_IP6_METRIC (default 1)
- static / empty: fall through to the existing static address path

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:43 +04:00
Mickaël Canévet
469db18d39
refactor(machined): extract per-interface IPv4 helper in OpenNebula driver
Move the per-interface IPv4 logic from ParseMetadata into a dedicated
parseInterfaceIPv4 helper, and add an empty parseInterfaceIPv6 stub.
ParseMetadata now delegates all per-interface work to those two helpers
plus the existing parseAliases, keeping its own body small.

No behaviour change; all existing tests pass.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:35 +04:00
Mickaël Canévet
ae61f5a5e5
fix(machined): use ParseFQDN for hostname parsing in OpenNebula
Two bugs are fixed:

1. DNS_HOSTNAME was wrongly used as Domainname. DNS_HOSTNAME is a boolean
   flag (YES/NO) that tells the OpenNebula daemon to perform a reverse
   DNS lookup; it is not a domain name string. Using it as Domainname
   produced invalid FQDNs like "myhost.YES".

2. No FQDN splitting: if the hostname source contained a dot (e.g.
   NAME="myhost.example.com"), the full string was used as Hostname
   instead of splitting on the first dot.

Both bugs are fixed by switching to ParseFQDN(), consistent with how all
other Talos platform implementations handle hostname parsing.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:23 +04:00
Mickaël Canévet
7adbbd2f84
feat(machined): support per-interface route metric for OpenNebula (ETH*_METRIC)
Parse ETHn_METRIC context variables and apply the value as the route
priority for static default gateway routes and the DHCP4 operator's
RouteMetric. When absent, the existing default of 1024 is preserved,
matching the reference netcfg-networkd behavior.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:16 +04:00
Mickaël Canévet
196658c41c
feat(machined): add network alias support for OpenNebula (ETH*_ALIAS*)
Parse ETHn_ALIASm_* context variables and add secondary IPv4 addresses
to the parent interface as additional AddressSpecSpec entries. Aliases
are skipped when DETACH is non-empty or EXTERNAL=YES, matching the
reference netcfg-networkd behavior.

Also guard the ETHn_MAC interface loop to only process top-level
interface keys (ETH<digits>_MAC), preventing alias MAC keys such as
ETH0_ALIAS0_MAC from being mistakenly treated as interfaces.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:14:05 +04:00
Mickaël Canévet
e96766e810
feat(machined): merge global and per-interface DNS for OpenNebula
Accumulate DNS servers and search domains from both global context
variables (DNS, SEARCH_DOMAIN) and per-interface variables
(ETH*_DNS, ETH*_SEARCH_DOMAIN) into a single merged ResolverSpecSpec,
matching the reference one-apps context-linux get_nameservers() /
get_searchdomains() behavior that writes one /etc/resolv.conf.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:13:58 +04:00
Mickaël Canévet
23c99a3cb4
feat(machined): add static routes support via ETH*_ROUTES for OpenNebula
Parse the ETH*_ROUTES context variable in the OpenNebula platform and
install per-interface static routes into the platform network config.
Both legacy format ("DEST MASK GW [METRIC]") and CIDR format
("DEST/PREFIX GW [METRIC]") are supported, matching the reference
one-apps context-linux implementation.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-11 14:13:29 +04:00
Andrey Smirnov
da70cedfd2
refactor: drop apid file socket
This was yet another socket with implicit auth - remove it completely
by reworking the only usecase for it - cluster-side health checks.
Now these health checks build a "regular" network Talos API client (as
they anyways work only controlplane nodes).

Refactor the check for controlplane nodes to use resources instead of
machine config directly (as machine config might not be always present).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-10 21:52:03 +04:00
Andrey Smirnov
17335107be
fix: use non-sensitive resource for health check precondition
A fixup for #12896

The health check might be running as a reduced privilege role client, so
don't pull the machine config, but instead read a field from a
non-sensitive resource.

As this field doesn't exist in older versions of Talos, the check should
still run by default (as it will be empty).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-10 18:37:55 +04:00
Andrey Smirnov
a02d578faa
feat: add support for mirroring image signatures
Enable signature verification in image cache & airgapped tests.

Fixes #12892

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-09 20:07:51 +04:00