293 Commits

Author SHA1 Message Date
Mateusz Urbanek
aebbbaf274
feat: support relative voume size
Include percent-based maxSize, e.g. use 50% of available space.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit 83f2bdb9ce6c9466716a6ac9c94dc2222e569ee8)
2025-11-14 16:55:51 +01:00
Andrey Smirnov
68560b53ab
fix: split volume/disk locators
Don't guess based on the volume type, but use explicit fields for
different locators.

IMAGECACHE-ISO is a disk volume, but uses full volume locator (by
filesystem type, etc.)

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-14 12:18:22 +04:00
Andrey Smirnov
82ac1119ec
feat: implement new registry configuration
Move to using multi-doc registry configuration.

Fixes #12120

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-12 17:25:01 +04:00
Laura Brehm
66c01a706f
chore: deprecate interactive installer mode
Removes `interactive` from `talosctl apply-config --mode interactive`,
and deprecates related APIs.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2025-11-11 18:22:38 +01:00
Laura Brehm
957770f65a
feat(machined): add panic/force mode reboot
In certain situations, Talos's shutdown/reboot sequence hangs while
waiting for services/mounts to be gracefully stopped (see:
https://github.com/siderolabs/talos/issues/11775).

This patch adds a forceful mode to the reboot sequence (`talosctl reboot
--mode force`) that bypasses graceful userspace teardown and hard
reboots the machine.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2025-11-11 12:08:34 +01:00
Andrey Smirnov
f4ad3077b0
feat: implement bond multi-doc configuration
Also expand internal bond configuration to cover missing fields.
They are not going to be exposed in legacy configuration.

Fixes #10960

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-07 13:45:09 +04:00
Mateusz Urbanek
f3df0f80b9
feat: add directory backed UserVolumes
Resolves #11848

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-10-29 12:00:24 +01:00
Andrey Smirnov
1dffa5d996
feat: implement virtual IP operator config
Fixes #10959

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-24 17:37:03 +04:00
Andrey Smirnov
d110727263
fix: provide offset for partitions in discovered volumes
This was missing in the resource which makes rendering partitions
in the GUI hard.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-23 21:25:42 +04:00
Andrey Smirnov
6c98f4cdb0
feat: implement new DHCP network configuration
Fixes #11661

Fixes #10958

This also implement proper client identifier handling.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-21 20:51:58 +04:00
Dmitrii Sharshakov
4e12df8c5c
test: integration test for OOM controller
- Improve docs
- Disable OOM controller in container mode
- Log OOM events
- Add an integration test verifying the system can sustain an OOM event

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
2025-10-20 17:50:59 +02:00
Noel Georgi
ced57b047a
feat: support optionally disabling module sig verification
Support disabling kernel module signature verification.
Note that this does not work when SecureBoot is enabled.

Fixes: #11989

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-10-16 20:18:46 +05:30
Andrey Smirnov
9a42b05bda
feat: implement link aliasing
Fixes #10956

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-08 16:27:27 +04:00
Andrey Smirnov
825622d90a
fix: resource proto definitions
There was a mismatch between how Talos encodes resource specs to
protobuf on the wire, and `.proto` files generated by `structprotogen`
for the same specs.

This only affected `LinkStatus`/`LinkSpec` resources, and it doesn't
affect Talos/Omni as they go via `protoenc`, bypassing `.proto` files.

Also if default proto library is used, it also works correctly.

The only place where it fails is a strict `vtprotobuf` encoding.

Also imports `protoenc` 0.2.4 skipping encoding of zero fields, which
should make COSI responses smaller for resources with lots of zero
fields.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-06 22:28:18 +04:00
Andrey Smirnov
6bc0b1bcf7
feat: drop and lock deprecated features
These features don't make any sense right now, so remove them from the
machine config to reduce clutter.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-01 20:47:48 +04:00
Dmitrii Sharshakov
251df70f6d
feat: add a userspace OOM controller
OOM controller helps mitigate out-of-memory by monitoring PSI, selecting
and killing cgroups to free up memory when RAM is near full.

Add config document and tests.

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-25 19:32:26 +02:00
Andrey Smirnov
7bae5b40b4
feat: implement link configuration
New multi-doc way to apply static configuration to network links.

Fixes #10957

Also implements related changes:

* new-style auto-DHCP mode - run DHCP as long as there is no new-style
  config document
* refactoring of controllers/tests which were touched in this PR
* implemented embedded config structs handling in docgen -> Markdown and
  docgen -> JSON schema

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-25 18:28:06 +04:00
Andrey Smirnov
1fca111e24
feat: support setting wake-on-lan for Ethernet
Fixes #11866

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-22 21:05:50 +04:00
Mateusz Urbanek
9db6dc06c3
feat: stop mounting state partition
Fixes #11608

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-09-18 15:34:28 +02:00
Andrey Smirnov
a2122ee5cb
feat: implement HostConfig multi-doc
Fixes #10952

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-12 14:28:50 +04:00
Noel Georgi
895133de99
feat: support configuring PCR states to bind disk encryption
See 4b840414be for more information.

Talos versions prior to 1.12 locked to PCR 7 state and PCR 11 for signed policies.

In-order for backwards compatibility newer installs will still default to PCR 7 state. Locking to PCR 7 can be disabled by passing an empty list.

Fixes: #10677

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-09-05 20:08:01 +05:30
Andrey Smirnov
70612c1f9f
refactor: split the PlatformConfigController
Fixes #10992

The plan is detailed in the issue, but tl;dr is to get one big
controller into 4 smaller controllers, each doing its own part of the
work.

Each controller has its own set of tests.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-20 14:11:35 +04:00
Andrey Smirnov
f65f39b78b
fix: provide mitigation CVE-1999-0524
Block some ICMP packet types in Ingress Firewall block mode.

Verified manually with `hping3 <IP> --icmp --icmp-ts -V`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-15 18:37:21 +04:00
Andrey Smirnov
c079119337
chore: refactor how tools are being installed
Move stuff into `tools/go.mod`.

Also fix linting issues on the way (updating golangci-lint).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-14 17:45:39 +04:00
Andrey Smirnov
a5f3000f2e
feat: implement encryption locking to STATE
Fixes #10676

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-01 18:24:56 +04:00
Noel Georgi
181d0bbf53
feat: bootedentry resource
Add a new bootedentry resource that shows the current booted UKI.

Fixes: #11458

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-08-01 13:50:03 +08:00
Mateusz Urbanek
9920da3e1a
feat: add etcd downgrade API
Fixes #11058

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-07-16 15:33:51 +02:00
Dmitrii Sharshakov
c38682279b
feat: bump pkgs and tools, read extensions' SBOMs, rekres
SBOMs from /usr/local/share/spdx will now also be read, this is to be
used by system extensions. Add a sample for testing this feature.

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
2025-07-16 14:57:02 +02:00
Mateusz Urbanek
0b8c180b82
fix: rename instances to referenceCount
ReferenceCount is a more common name, so replacing Instances will
provide better UX and will match online resources.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-07-10 18:39:31 +02:00
Andrey Smirnov
52656cc3c1
feat: allow taloscl disk wipe in maintenance mode
Fixes #10011

Also implement a hidden option to skip secondary disks check which
allows to wipe disks which are used as part of active LVM volume. This
is unsafe in general, but sometimes if you know what you're doing, it's
fine.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-09 17:44:21 +04:00
Andrey Smirnov
850579448e
feat: export SBOM as resources
Fixes #10942

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-09 16:48:48 +04:00
Andrey Smirnov
d531b682cb
fix: provide FIPS 140-3 compliance
Provide compliant unit-test runs.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-08 21:18:04 +04:00
Mateusz Urbanek
8789a02c3e
feat: present loaded kernel modules
Fixes #11280

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-07-07 15:13:14 +02:00
Andrey Smirnov
3801413309
feat: expose kernel cmdline as a resource
Fixes #11279

Co-authored-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-02 15:31:10 +02:00
Andrey Smirnov
c880835c80
feat: implement zswap support
Zswap allows to compress pages in memory before they hit the actual swap
device.

Both swap and zswap (or either one of these) can be enabled.

Fixes #10675

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-06-30 20:17:27 +04:00
Andrey Smirnov
d32ccfa598
feat: implement swap support
Fixes #10674

Provide a way to see current swap status, configure additional swap
devices (block) and de-configure them on the fly.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-06-11 14:25:38 +04:00
Noel Georgi
f90c79474b
chore: show bound driver in pcidevices info
Fixes: #10754

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-04-24 22:48:21 +05:30
Andrey Smirnov
f0ea478cb8
feat: support address priority
See https://github.com/jsimonetti/rtnetlink/pull/256

See https://github.com/siderolabs/talos/issues/10696

Support setting address priority, this is important to ensure that the
prefix route has appropriate priority.

For now, we don't have it exposed in the machine config except for the
DHCP4 operator, so now both routes created explicitly by DHCP and routes
created implicitly have same metric/priority:

```
172.20.0.2   network     RouteStatus   inet4//172.20.0.0/24/1024                                1         172.20.0.0/24                                enp0s2      1024
172.20.0.2   network     RouteStatus   inet4/172.20.0.1//1024                                   1                                         172.20.0.1   enp0s2      1024
```

Before this change, the first route would have a metric zero.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-16 13:35:37 +04:00
Andrey Smirnov
664fa36973
feat: implement user volumes
User volumes are identified by a short name which serves both
as a `/var/mnt` mount point and a partition label.

User volumes can be added and removed on the fly, and they are
automatically propagated into the `kubelet` mount namespace.

Also deprecate `.machine.disks`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-11 20:27:39 +04:00
Andrey Smirnov
60448b516e
feat: add support for instance tags on AWS
We can add on other platforms as well as we go.

See https://github.com/siderolabs/omni/issues/1059

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-08 12:57:56 +04:00
Andrey Smirnov
372c62b728
fix: handle override path for registry mirrors correctly
See https://github.com/siderolabs/talos/discussions/10641

The problem is that `overridePath` config option should be per-endpoint,
not a global one.

As we can't easily change v1alpha1 config, change the interface instead,
and update the controller which generates final registry config to
use per-endpoint setting.

Ensure that `registryd` endpoint never uses `overridePath`.

E.g., with this PR:

```toml
[host]
  [host.'http://127.0.0.1:3172']
    capabilities = ['pull', 'resolve']
  [host.'http://172.20.0.1:5006/v2/']
    capabilities = ['pull', 'resolve']
    override_path = true
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-07 14:33:38 +04:00
Noel Georgi
1996610375
feat: expose if system is booted with UKI
Expose if system is booted with a UKI in `securitystate` resource.

Fixes: #10620

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-04-04 16:14:11 +02:00
Andrey Smirnov
203e02df49
refactor: implement directory and overlay mounts
This complements the previous PRs to implement more volume features:
directory volumes control their permissions, SELinux labels, etc.

Overlay mounts support additional parent relationship.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-01 20:51:02 +04:00
Dmitrii Sharshakov
087a85f409
feat: support running with SELinux enforcing
Add more rules alongside supporting code.

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
2025-03-22 14:39:48 +01:00
Andrey Smirnov
d4aacb0d85
refactor: mount operation for STATE and user disks
Use new controller for user disk and STATE mounts, drop
old code in the sequencer.

Also support mounts with parent (when e.g. `/var/lib` is mounted on top
of `/var`).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-03-20 20:46:57 +04:00
Andrey Smirnov
f9b14e7848
fix: reconnect on SideroLink tunnel on/off change
The issue is not so easy to fix, as GRPC tunnel on/off change requires
two different flow for the link (interface):

* no tunnel -> Talos link controller should create in-kernel `wireguard`
  link and no userspace components
* tunnel on -> Talos link controller should never create the link, and
  only adjust WG settings via UAPI, while the actual link is created by
  the userspace implementation (it's a `tun` device)

Transition between those two links is impossible for the link controller
to distinguish, as it doesn't know that it has to drop old link and skip
creating new one based on the information available.

So, instead, use different names for the link in two states:
`siderolink` for the kernel flow, and `siderolinktun` for the userspace
flow. This fixes the issue of proper link cleanup/re-creation.

Add integration tests.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-03-13 15:08:09 +04:00
Andrey Smirnov
9a5914048c
refactor: ephemeral mount
Mount EPHEMERAL volume via new controller.

Implement the first cut of volume dependencies from services, refactor
the way system disk wipe works.

Update volume manager controller to destroy volume statuses on shutdown,
which allows to signal mount operations to be terminated.

Lots of WIP ideas still, but I want to complete this PR and move on to
the next one:

* refactor user disks mounts to use new API
* refactor STATE mountes to use new API
* implement directory/overlay mounts

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-03-11 17:19:58 +04:00
Andrey Smirnov
47f377b21f
feat: implement the last ethtool feature - channels
Fixes #9173

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-02-11 15:34:57 +04:00
Andrey Smirnov
5dbf9e3502
refactor: implement volume mount controller
Fixes #9602

Aggregate incoming volume mount requests, reconcile them with volume
status, perform actual mounting, and produce mount status.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-02-10 22:12:55 +04:00
Andrey Smirnov
0419f5d8ba
feat: implement features in ethtool-like support
Support showing current feature state, and changing features on the fly.

The output and interface should be similar to `ethtool`.

We don't support legacy feature names.

```
node: 172.20.0.5
metadata:
    namespace: network
    type: EthernetStatuses.net.talos.dev
    id: enp0s2
    version: 2
    owner: network.EthernetStatusController
    phase: running
    created: 2025-02-10T11:40:32Z
    updated: 2025-02-10T11:40:32Z
spec:
    linkState: true
    port: Other
    duplex: Unknown
    rings:
        rx-max: 256
        tx-max: 256
        rx: 256
        tx: 256
        tx-push: false
        rx-push: false
    features:
        tx-scatter-gather: on
        tx-checksum-ipv4: off [fixed]
        tx-checksum-ip-generic: on
        tx-checksum-ipv6: off [fixed]
        highdma: on [fixed]
        tx-scatter-gather-fraglist: off [fixed]
        tx-vlan-hw-insert: off [fixed]
        rx-vlan-hw-parse: off [fixed]
        rx-vlan-filter: on [fixed]
        vlan-challenged: off [fixed]
        tx-generic-segmentation: on
        rx-gro: on
        rx-lro: off [fixed]
        tx-tcp-segmentation: on
        tx-gso-robust: on [fixed]
        tx-tcp-ecn-segmentation: on
        tx-tcp-mangleid-segmentation: off
        tx-tcp6-segmentation: on
        tx-fcoe-segmentation: off [fixed]
        tx-gre-segmentation: off [fixed]
        tx-gre-csum-segmentation: off [fixed]
        tx-ipxip4-segmentation: off [fixed]
        tx-ipxip6-segmentation: off [fixed]
        tx-udp_tnl-segmentation: off [fixed]
        tx-udp_tnl-csum-segmentation: off [fixed]
        tx-gso-partial: off [fixed]
        tx-tunnel-remcsum-segmentation: off [fixed]
        tx-sctp-segmentation: off [fixed]
        tx-esp-segmentation: off [fixed]
        tx-udp-segmentation: off
        tx-gso-list: off [fixed]
        tx-checksum-fcoe-crc: off [fixed]
        tx-checksum-sctp: off [fixed]
        rx-ntuple-filter: off [fixed]
        rx-hashing: off [fixed]
        rx-checksum: on [fixed]
        tx-nocache-copy: off
        loopback: off [fixed]
        rx-fcs: off [fixed]
        rx-all: off [fixed]
        tx-vlan-stag-hw-insert: off [fixed]
        rx-vlan-stag-hw-parse: off [fixed]
        rx-vlan-stag-filter: off [fixed]
        l2-fwd-offload: off [fixed]
        hw-tc-offload: off [fixed]
        esp-hw-offload: off [fixed]
        esp-tx-csum-hw-offload: off [fixed]
        rx-udp_tunnel-port-offload: off [fixed]
        tls-hw-tx-offload: off [fixed]
        tls-hw-rx-offload: off [fixed]
        rx-gro-hw: on
        tls-hw-record: off [fixed]
        rx-gro-list: off
        macsec-hw-offload: off [fixed]
        rx-udp-gro-forwarding: off
        hsr-tag-ins-offload: off [fixed]
        hsr-tag-rm-offload: off [fixed]
        hsr-fwd-offload: off [fixed]
        hsr-dup-offload: off [fixed]
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-02-10 16:05:49 +04:00