5086 Commits

Author SHA1 Message Date
Andrey Smirnov
b7609edd16
chore: update pkgs/extras to final 1.9.0 tags
Almost no changes (pulls in xfs scrub kernel changes).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-29 18:40:59 +04:00
Andrey Smirnov
c7b25430bb
fix: multiple small fixes for service runners
It all started debugging the issue on Talos being stuck on reboot when
`talosctl logs -f kubelet` is being used.

Fixes:

* abort goroutine runner even if the goroutine doesn't terminate - we
  have no way to force termination, so at least don't hang forever
* align timeouts for apid/trustd for graceful termination - so that at
  least the service is not SIGKILLed while it does its own graceful
  shutdown
* in stream chunker, act on canceled context immediately instead of
  relying on `Read` to return: with `logs -f` the reader will block
  forever waiting for new logs

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-29 17:43:03 +04:00
Andrey Smirnov
e33d2f581f
feat: support overriding base OCI spec for CRI
Fixes #9827

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-29 16:22:25 +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
Dmitry Sharshakov
c254f261fd
fix: do not extract xattrs in unsquashfs
Fix building on SELinux systems. Extracting xattrs led to return code 2 as a non-critical error. This should not influence extension build.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-28 19:57:48 +01:00
Andrey Smirnov
fc3b31575c
fix: multiple issues with opening encrypted volumes
Fixes #9820

This only affects volumes with multiple key slots configured.

Make sync issues non-fatal, so that if some keys fail to sync, proceed
with normal boot, but record an error in the `VolumeStatus` resource.

When opening, correctly try all key slots.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-28 21:34:41 +04:00
Dmitry Sharshakov
145b02642e
chore: deprecate cgroupsv1 in non-container mode
Fixes #9729.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-28 18:08:47 +01:00
Andrey Smirnov
581c0851d8
feat: update dependencies
Kubernetes: 1.32.0-rc.0
Flannel: 0.26.1
Coredns: 1.12.0

Plus some small bumps.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-28 19:51:02 +04:00
Noel Georgi
e9058461e4
feat: add api-server authorization config
Add support for configuring KubeAPIServer authorization config.

Fixes: #9791

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-28 16:27:50 +05:30
Andrey Smirnov
db1c707689
chore: move enabling SELinux by default to 1.10
For 1.9, we keep it disabled until it gets more production ready in
1.10.

It still can be enabled with `selinux=1`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-28 13:59:50 +04:00
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
Dmitriy Matrenichev
ccc5a8d34c
chore: split config.Registry into the separate resource
Required for #9614

Closes #9766

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-27 19:58:08 +03:00
Andrey Smirnov
c735d14928
fix: wait for udevd before starting sync
Fixes #8074

One part of the fix is to wait for udevd to be ready, as anyways before
udevd is ready network interfaces are not ready, so sync is not
possible.

Second part is that now u-root's rtc package supports closing rtc
devices, so we can properly open/close it as part of the sync loop (vs.
previous workaround with sync.Once).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 20:33:03 +04:00
Andrey Smirnov
bef4d51508
fix: make system_disk condition work properly before install
The problem was with specific disk selector `!system_disk` - in previous
implementation, as `system_disk` defaulted to false even if the system
disk is not known yet, this might result in picking up a disk which is
going to be system disk before system disk is picked.

In new implementation, as `system_disk` is not set before it is
detected, the condition containing `system_disk` (in either way) would
fail to execute and volume provision will be delayed until system disk
is detected.

Also:

Fixes #9809

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 19:39:39 +04:00
Andrey Smirnov
af91c99ba1
chore: update image cache config
Make it nested, so that we can expand easily to support e.g. distributed
cache.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 18:18:36 +04:00
Andrey Smirnov
e10e90b05a
fix: nocloud network link matching on MAC addresses
Fixes #9811

Fall back to non-permanent hardware addresses, ignore non-physical links
(e.g. bonds).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 17:03:51 +04:00
Andrey Smirnov
2a9130a2e0
fix: make Talos META partition match more precise
Fixes #9786

Match on exact expected size otherwise as `META` name is common, Talos
might find `META` where it shouldn't be.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 16:14:51 +04:00
Rémi Paulmier
9adaf7f012
docs: update local-storage.md
Add an explicit example of kubelet config.

Signed-off-by: Rémi Paulmier <remi.paulmier@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 14:22:27 +04:00
Justin Garrison
7e19d5c4c7
docs: add kubevirt install
from PR #9522

Signed-off-by: Justin Garrison <justin.garrison@siderolabs.com>
2024-11-26 13:55:32 -08:00
Dmitriy Matrenichev
f1d1628c86
fix: properly halt installation if Talos already installed
Do not return from the function unless ctx is canceled.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-26 22:19:18 +03:00
Dmitriy Matrenichev
177df62a0e
fix: small logrus fixes
Ensure correct logrus setup.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-26 21:32:52 +03:00
Dmitriy Matrenichev
a9875b7704
fix: return proper number from the timeStampWriter
All `io.Writers` implementations expect that you return exactly `len(p)` bytes on successful exit.
So do just that, and ensure in runtime that we do the proper thing.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-26 21:07:21 +03:00
Noel Georgi
e8a262490b
fix: systemd-udevd restore old naming behavior
Restore old naming behavior as `eudevd`.

Ref:

* https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
* https://www.freedesktop.org/software/systemd/man/latest/systemd-udevd.service.html
* https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-26 22:24:46 +05:30
Noel Georgi
939c555f9a
fix: imager disk image-cache generator
Move things around so `talosctl` is not dependent on `go-blockdevice`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-26 21:47:08 +05:30
Noel Georgi
1bac0b183a
feat: support generating disk images with image cache
Add support for generating disk images with image cache.

Fixes: #9616

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-26 18:52:25 +05:30
Andrey Smirnov
84459d9025
fix: make immage cache config apply immediately
Allow to change image cache config without a reboot.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-25 18:50:21 +04:00
Andrey Smirnov
56e1ee72e9
release(v1.9.0-alpha.3): prepare release
This is the official v1.9.0-alpha.3 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
v1.9.0-alpha.3 pkg/machinery/v1.9.0-alpha.3
2024-11-25 18:01:11 +04:00
Dmitry Sharshakov
af5d6b8c41
fix: show SELinux labels on pseudo-fs
On devtmpfs or sysfs SELinux attribute is not listed unless it has been set, yet it is available and represents the SELinux label of file.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-24 17:57:50 +01:00
Noel Georgi
f46922fa9a
chore: fix dockerfile warnings
This fixes the rather irksome warning when using buildkit to build
images.

This should not break anything since the defaults are set to `scratch`
and if the `build-arg` is not passed the copy stage will fail.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-22 21:19:12 +05:30
Dmitry Sharshakov
a13f82c594
feat: udev: label device nodes
Use udev rules to assign basic device file labels based on their subsystem

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-22 12:42:22 +01:00
Dmitry Sharshakov
e899fb37fd
feat: label created files in /etc
Implement SELinux labeling support in EtcFileController, label both squashfs and runtime-created files in /etc and /system/etc.

Add corresponding test cases.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-22 09:16:13 +01:00
Andrey Smirnov
5f68c17eda
feat: implement image cache configuration
Implement a feature flag, a resource which controls the flow.

This controls the volume configuration, mounting, etc.

Fixes #9767

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-21 21:24:39 +04:00
Dmitriy Matrenichev
0ffb2187a3
feat: registry proxy
Implement container registry proxy.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-21 19:28:10 +03:00
Noel Georgi
77cf84fb57
feat: support generating iso with imagecache
Support generating iso with imagecache.

Part-of: #9616

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-21 20:40:05 +05:30
Noel Georgi
5de6275b8f
chore: image cache generator improvements
* Save image in OCI format, so imager can either use as OCI input or from
a registry.
* Support caching layers to a path, so subsequent runs are faster

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-21 20:09:50 +05:30
Dmitry Sharshakov
1a8cc5f8b2
feat: add SELinux labels to volumes
Label mounted filesystems like ephemeral, overlay mounts, as well as data directories (going to become volumes later).

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-21 14:23:43 +01:00
Noel Georgi
61b9129e0c
fix: add directory entries and filemode to tarball
Always add directory entries to tarball.
Handle directory v/s files in tarball `build`.
Use the source file info to set file permissions.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-21 15:22:28 +05:30
Dmitry Sharshakov
4caeae21e5
refactor: optimize flags and SetLabel
Do not do string lookups in repetitive calls. We do not support changing SELinux status during runtime, so once we read this we can assume status does not change.

Also avoid unneeded FS writes when appropriate label is already set on file.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-21 08:25:49 +01:00
Noel Georgi
6074a870ad
feat: add e2fsprogs to talos rootfs
Bring in e2fsprogs from pkgs.

Initial support for ext* filesystems.

Fixes: #9746

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-20 21:48:26 +05:30
SpiReCZ
7ffcf5b932
docs: update getting started
Add missing talosconfig parameter.

Signed-off-by: SpiReCZ <SpiReCZ@users.noreply.github.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-20 18:35:31 +04:00
Andrey Smirnov
c4c1a0d7c7
fix: make vmware platform common code build on all arches
Even though VMWare doesn't support non-amd64 case, for the imager (and
Image Factory), the common stuff should work correctly for any arch the
imager is running with (as arm64 imager can generate amd64 VMWare
image).

See https://github.com/siderolabs/image-factory/issues/164

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-20 18:05:34 +04:00
Andrey Smirnov
cc768037f8
feat: implement block device wipe
Fixes #9731

The wipe doesn't require a reboot, but it requires the blockdevice not
to be used as a volume.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-20 15:46:37 +04:00
Andrey Smirnov
6fb518ae57
fix: don't activate LVM volumes in agent mode
In agent mode, we don't need to activate LVMs so that we can safely wipe
them.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-20 14:00:47 +04:00
Dmitriy Matrenichev
0e3ed30723
fix: no longer leak Close reader
Optimize code.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-20 00:36:20 +03:00
Dmitriy Matrenichev
4dc58cfdf3
chore: small fixes
QoL PR

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-19 22:21:55 +03:00
Andrey Smirnov
f400ae911b
fix: small fixes for image cache generation
* print some progress
* properly save manifests for image refs which are both tagged and
  digested
* skip pulling duplicate blobs

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-20 00:02:38 +05:30
Noel Georgi
93754b7de6
fix: config and platform manifest generation
The initial code missed saving the image config and the platform
specific manifest.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-19 23:20:18 +05:30
Noel Georgi
95b2fc946e
feat: image cache gen
Fixes: #9611

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-19 19:08:38 +05:30
Noel Georgi
e4c6186c63
chore: remove i915/amdgpu drivers
Drop i915 and amdgpu drivers from Talos rootfs, these will be packaged
as extensions containing both firmware and drivers.

Some modules like `ttm`, `i2c-algo-bit` etc have been left off since they are used by both amdgpu and
i915, so makes sense to keep in plain talos.

Part of: #9728

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-19 15:07:53 +05:30
Alessio Moiso
744ad12a6e
docs: update replicated-local-storage-with-openebs.md
Fix `openebs` path.

Signed-off-by: Alessio Moiso <a.moiso@outlook.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-18 21:02:48 +04:00