81 Commits

Author SHA1 Message Date
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
ac140324eb
fix: skip PCR extension if TPM1.2 is found
When extending PCR or trying to seed entropy pool from TPM if the found
device is a TPM1.2 device, skip it, since Talos only supports TPM2.0

Fixes: #10847

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-05-05 12:31:25 +05:30
Andrey Smirnov
09ef1f8a41
fix: ignore http proxy on grpc socket dial
Fixes #10867

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-05-04 18:06:32 +04:00
Noel Georgi
01bb294af6
fix(ci): provision tests
Fix the provision-0 cron tests.
Support zstd disk images for `talosctl cluster create`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-05-02 08:28:11 +05:30
Andrey Smirnov
ae94377d15
feat: support encryption config for user volumes
No big changes, mostly wiring things together:

* implement encryption config (identical to existing v1alpha1 one) for
  user volume configuration
* provide validation, some small fixes
* add support for encrypted user volumes in `talosctl cluster create`

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-22 12:20:27 +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
5eaaa7ffa1
test: fix enforcing steps in cron
Build UKI certs in cron.

Also pass `enforcing=1` to the initial step (if applicable).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-02 15:11:12 +04:00
Dmitrii Sharshakov
7e0475488d
fix: qemu: archive cluster logs only after stopping VMs
Otherwise the archive is corrupted due to QEMU still writing to the logs while they are being archived

ci: enable --with-json-logs by default for e2e-qemu

Also pull in golangci fixes

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
2025-03-10 15:46:11 +01:00
Noel Georgi
fd8131cb86
feat: generate unified installer
Generate `installer` from `imager` so installer always have UKI's.

Push `installer-base` which just contains base tools to install.

Fixes: #10188
Fixes: #10323

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-02-28 19:18:19 +05:30
Noel Georgi
b1d410cb62
feat: dual boot disk image
Generate disk image with both grub and sd-boot.

Fixes: #10332

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-02-25 21:21:10 +05:30
Noel Georgi
cd5e549039
feat: generate iso's with both UKI and grub
Starting with Talos 1.10, the default generated ISO's will use GRUB for
BIOS boot and sd-boot for EFI boot.

Fixes: #10192

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-01-24 22:32:02 +05:30
Noel Georgi
82c9ec158e
chore(ci): add tests with longhorn v2 engine
Add tests with longhorn v2 engine.

Fixes: #9669

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-01-22 23:10:48 +05:30
Andrey Smirnov
7a712fad2a
fix: disks with 4k sector size and systemd-boot
The previous fix was completely wrong.

See #10097

The core part of the problem was that `dosfstools` was not installed in
the `installer`, so this causes a busybox version of it to be used which
is totally broken for 4k disks.

Adds an integration test.

go-blockdevice updates revert first partition alignment for 4k disks and
allow `talosctl cluster create` to detect properly installation status.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-01-22 19:21:29 +04:00
Andrey Smirnov
0664807229
test: fix apparmor tests
Remove selinux more actively.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-24 20:10:59 +04:00
Andrey Smirnov
82ea44a6b2
fix: reduce installer image
This still allows running install on 1 GiB hardware.

Fixes #10024

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-24 19:03:42 +04:00
Noel Georgi
a5660ed778
feat: pcirebind controller
Add a controller to support rebinding drivers for PCI devices.

Fixes: https://github.com/siderolabs/extensions/pull/488

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-12-20 17:35:37 +05:30
Dmitriy Matrenichev
c4724fc975
chore: add integration tests for image-cache
Provide separate `integration/image-cache` tag.

Closes #9860

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-12-06 20:28:34 +03:00
Andrey Smirnov
77e9db4abf
test: use two workers in qemu tests by default
Fixes #9870

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-04 16:34:42 +04:00
Noel Georgi
347b758465
chore: support saving cluster logs on destroy
Support saving cluster logs on destroy

Fixes: #9808

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-29 14:39:15 +05:30
Andrey Smirnov
ef69c9d39b
feat: update Linux to 6.12.1
No other changes, just update default bundled module list.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 23:08:14 +04:00
Noel Georgi
2001167058
chore(ci): save support zip always after tests
Save `support.zip` always, also use a different folder for saving logs,
so we can save artifacts of multi cluster tests.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-08 19:18:06 +05:30
Noel Georgi
1800f81044
fix: selinux handling and apparmor tests
Conditionally mount selinuxfs only if it's present.

Fix AppArmor tests, `apparmor` and other minor LSM's and set
`apparmor=1`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-07 07:50:00 +05:30
Andrey Smirnov
d39393879a
fix: rework the 'metal-iso' config acquisition
Fixes #9538

Re-do the implementation by using the volume management primitives, so
that we can avoid/skip old code. This should fix all issues related to
the partition/whole disk.

Fix issues in the volume management (exposed, as we haven't used it this
way before).

Build a test case in `talosctl cluster create` to inject machine config
via `metal-iso`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-24 16:18:50 +04:00
Andrey Smirnov
bc4c21f41a
test: add json logs test environment
Add an option to `talosctl cluster create` to start a JSON log receiver,
and enabled it optionally.

Enable in `integration-qemu`.

See #9510

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-17 16:23:26 +04:00
Andrey Smirnov
3038ccfa88
feat: add configuration for EPHEMERAL volume
Fixes #9261

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-09-06 14:11:35 +04:00
Noel Georgi
8fe39eacba
chore: move csi tests as go test
Move rook-ceph CSI tests as go tests.
This allows us to add more CSI tests in the future.

Fixes: #9135

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-08-26 18:18:09 +05:30
Noel Georgi
36f83eea9f
chore: make qemu check flag consistent with code
Restructure code as per changes from #9198.

This makes the flag name to be in sync with what it actually does.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-08-20 20:33:56 +05:30
Noel Georgi
2ac8d2274f
chore: support unsupported flag for mkfs
Support `unsupported` flag for mkfs, so that `STATE` partition with size
less than 300M can be created by `mkfs.xfs`.

This allows to bring in newer `xfsprogs` that can repair corrupted FS
better.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-08-08 20:21:02 +05:30
Noel Georgi
50e5f37efb
chore: add test for apparmor
Add a test that verifies pods can be scheduled with `RuntimeDefault`
apparmor profile.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-07-30 20:24:57 +05:30
Noel Georgi
8ee0872683
chore(ci): drop crashdump, save logs as artifacts
Drop `--crashdump` and save talos cluster logs as artifacts.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-06-07 10:52:05 +08:00
Noel Georgi
9c3ebad9fd
chore(ci): kresify gh actions
Kresify, only handle gh workflows.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-05-22 00:17:09 +05:30
Andrey Smirnov
84cd7dbec4
feat: update Linux to 6.6.29
Pull in fixes for cloud-image-uploader from #8667.:w

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-05-01 15:59:04 +04:00
Dmitriy Matrenichev
8dc4910c48
chore: enable "WG over GRPC" testing in siderolink agent tests
Fixes https://github.com/siderolabs/talos/issues/8514
For https://github.com/siderolabs/talos/issues/8392

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-04-01 18:24:57 +03:00
Dmitriy Matrenichev
949ad11a2d
chore: import siderolink as siderolink-launch subcommand
This PR ensures that we can test our siderolink communication using embedded siderolink-agent.
If `--with-siderolink` provided during `talos cluster create` talosctl will embed proper kernel string and setup `siderolink-agent` as a separate process. It should be used with combination of `--skip-injecting-config` and `--with-apply-config` (the latter will use newly generated IPv6 siderolink addresses which talosctl passes to the agent as a "pre-bind").

Fixes #8392

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-03-23 16:08:56 +03:00
Andrey Smirnov
36c8ddb5e1
feat: implement ingress firewall rules
Fixes #4421

See documentation for details on how to use the feature.

With `talosctl cluster create`, firewall can be easily test with
`--with-firewall=accept|block` (default mode).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-30 22:58:16 +04:00
Andrey Smirnov
2b548ad0d9
feat: update containerd to 1.7.x
Also update Linux and other pkgs.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-28 16:33:57 +04:00
Andrey Smirnov
390137447f
feat: enable KubePrism by default
Fixes #7787

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-25 23:12:33 +04:00
Noel Georgi
6b0373ebef
chore: move bash tests to integration
move extensions and secureboot tests to integration.
Makes it easier to test.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-17 19:58:35 +05:30
Andrey Smirnov
87fe8f1a2a
feat: implement image generation profiles
Support full configuration for image generation, including image
outputs, support most features (where applicable) for all image output
types, unify image generation process.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-02 19:13:44 +04:00
Noel Georgi
209c34801e
chore: drop with-secureboot talosctl flag
The code picks up firmware files in the order it's defined. The
secureboot QEMU firmware files are defined first, so this flag is a
no-op. This was leftover from when `ovmfctl` was used.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-07-31 17:33:12 +04:00
Dmitriy Matrenichev
5f34f5b41f
chore: rename api load balancer to KubePrism
Closes #7432

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-07-14 15:23:53 +03:00
Noel Georgi
79365d9bac
feat: tpm2 based disk encryption
Support disk encryption using tpm2 and pre-calculated signed PCR values.

Fixes: #7266

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-07-12 20:41:28 +05:30
Artem Chernyshev
ce63abb219
feat: add KMS assisted encryption key handler
Talos now supports new type of encryption keys which rely on Sealing/Unsealing randomly generated bytes with a KMS server:

```
systemDiskEncryption:
  ephemeral:
    keys:
      - kms:
          endpoint: https://1.2.3.4:443
        slot: 0
```
gRPC API definitions and a simple reference implementation of the KMS server can be found in this
[repository](https://github.com/siderolabs/kms-client/blob/main/cmd/kms-server/main.go).

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2023-07-07 19:02:39 +03:00
Noel Georgi
e5306ef263
chore: format and cleanup test scripts
This formats and cleanups the test scripts.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-06-27 16:53:40 +05:30
Andrey Smirnov
fe0f46980f
feat: implement secure boot from disk
This includes sd-boot handling, EFI variables, etc.

There are some TODOs which need to be addressed to make things smooth.

Install to disk, upgrades work.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-06-16 20:15:16 +05:30
Dmitriy Matrenichev
445f5ad542
feat: support API server load balancer
This commit adds support for API load balancer. Quick way to enable it is during cluster creation using new `api-server-balancer-port` flag (0 by default - disabled). When enabled all API request will be routed across
cluster control plane endpoints.

Closes #7191

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-06-16 10:09:20 -04:00
Dmitriy Matrenichev
665702ddd3
chore: fix cilium e2e tests
`WITH_CONFIG_PATCH_WORKER` check result was overriding any value set in `CONFIG_PATCH_FLAG` variable.
Move it to the different variable.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-06-14 15:08:31 +04:00
Christian Rolland
e6dde8ffc5
feat: add network chaos to qemu development environment
Add flags for configuring the qemu bridge interface with chaos options:
- network-chaos-enabled
- network-jitter
- network-latency
- network-packet-loss
- network-packet-reorder
- network-packet-corrupt
- network-bandwidth

These flags are used in /pkg/provision/providers/vm/network.go at the end of the CreateNetwork function to first see if the network-chaos-enabled flag is set, and then check if bandwidth is set.  This will allow developers to simulate clusters having a degraded WAN connection in the development environment and testing pipelines.

If bandwidth is not set, it will then enable the other options.
- Note that if bandwidth is set, the other options such as jitter, latency, packet loss, reordering and corruption will not be used.  This is for two reasons:
	- Restriction the bandwidth can often intoduce many of the other issues being set by the other options.
	- Setting the bandwidth uses a separate queuing discipline (Token Bucket Filter) from the other options (Network Emulator) and requires a much more complex configuration using a Heirarchial Token Bucket Filter which cannot be configured at a granular enough level using the vishvananda/netlink library.

Adding both queuing disciplines to the same interface may be an option to look into in the future, but would take more extensive testing and control over many more variables which I believe is out of the scope of this PR.  It is also possible to add custom profiles, but will also take more research to develop common scenarios which combine different options in a realistic manner.

Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-06-06 20:15:26 +04:00
Noel Georgi
3b36993b99
fix: rlimit nofile test
The test was added at the wrong place.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-05-12 16:20:52 +05:30
Andrey Smirnov
d30cf9c86e
test: fix misprint in e2e scripts
This bug breaks `e2e-extensions`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-03-24 15:28:18 +04:00