4373 Commits

Author SHA1 Message Date
Andrey Smirnov
4f195dd271
chore: fix the release.toml
It was using `note` instead of `notes`, so some entries got dropped.

I blame CodePilot for that ;)

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-04 20:23:03 +04:00
Andrey Smirnov
474fa0480d
fix: store and execute desired action on emergency action
Fixes #7854

Talos runs an emergency handler if the sequence experience and
unrecoverable failure. The emergency handler was unconditionally
executing "reboot" action if no other action was received (which only
gets received if the sequence completes successfully), so the Shutdown
request might result in a Reboot behavior on error during shutdown
phase.

This is not a pretty fix, but it's hard to deliver the intent from one
part of the code to another right now, so instead use a global variable
which stores default emergency intention, and gets overridden early in
the Shutdown sequence.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-04 19:51:48 +04:00
Sebastian Gaiser
515ae2a184
docs: extend hetzner-cloud docs for arm64
Added docs for arm64 and updated packer plugin.

Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-12-04 20:49:25 +05:30
Dmitriy Matrenichev
eecc4dbd51
fix: trim leading spaces\newlines in inline manifest contents
In route `LoadPatches` -> `configpatcher.Apply` -> `configloader.NewFromBytes` any leading newlines will be transformed  into `|4` yaml. We want to prevent that.

Closes #7993

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-12-04 17:12:20 +03:00
Andrey Smirnov
dbf274ddf7
fix: skip writing the file if the contents haven't changed
As the controller reconciles every /etc file present, it might be called
multiple times for the same file, even if the actual contents haven't
changed.

Rewriting the file might lead to some concurrent process seeing
incomplete file contents more often than needed.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-04 15:58:03 +04:00
Dmitriy Matrenichev
6329222bdc
fix: do not panic in merge.Merge if map value is nil
Checking for `zeroValue` is not enough when accessing `map[string]any`.

Closes #8005

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-12-04 12:38:09 +03:00
Andrey Smirnov
d8a435f0e4
fix: initialize boot assets with defaults early
The problem was that bootloaders were correctly picking up defaults for
`installer` mode (vs. `imager` mode), but DTB and other SBC stuff wasn't
properly initialized, so installing on SBC fails.

Now all options are properly initialized with defaults early in the
process.

Fixes #8009

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-01 17:47:05 +04:00
Andrey Smirnov
c6835de17a
fix: pick etcd adverised addresses from 'current' addresses
Fixes #7947

This way etcd advertised address can be picked from the `external IPs`
of the machine.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-01 17:26:28 +04:00
Andrey Smirnov
6b5bc8b85b
feat: update Linux to 6.1.64
Bump pkgs/extras to the final 1.6.0 versions.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-01 16:59:54 +04:00
Andrey Smirnov
e71e3e4161
feat: support extra arguments for flanneld
Fixes #7754

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-01 16:18:02 +04: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
Dmitriy Matrenichev
0b111ecb81
fix: support slices of enums and fix NfTablesConntrackStateMatch
We already have the code which supports custom enums, so let's extend it to support custom enums in slices and
fix the NfTablesConntrackStateMatch proto definition.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-11-30 00:23:16 +03:00
Andrey Smirnov
9a85217412
feat: improve nftables backend
Many changes to the nftables backend which will be used in the follow-up
PR with #4421.

1. Add support for chain policy: drop/accept.
2. Properly handle match on all IPs in the set (`0.0.0.0/0` like).
3. Implement conntrack state matching.
4. Implement multiple ifname matching in a single rule.
5. Implement anonymous counters.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-29 21:22:47 +04:00
Andrey Smirnov
db4e2539d4
feat: update Kubernetes 1.29.0-rc.1 and other bumps
Bump Go modules, final tools and semi-final pkgs.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-29 18:29:52 +04:00
Noel Georgi
7a4a92854f
feat: support sanitized kernel args
Support dropping kernel args that start with `-`.

Fixes: #7613

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-28 16:23:05 +05:30
Noel Georgi
f041b26299
chore: add tests for mdadm extension
Add tests for mdadm extension.

See: https://github.com/siderolabs/extensions/pull/271

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-27 23:18:35 +05:30
Andrey Smirnov
e46e6a312f
feat: implement nftables backend
Implement initial set of backend controllers/resources to handle
nftables chains/rules etc.

Replace the KubeSpan nftables operations with controller-based.

See #4421

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-27 21:14:15 +04:00
Dmitriy Matrenichev
ba827bf8b8
chore: support getting multiple endpoints from the Provision rpc call
The code will rotate through the endpoints, until it reaches the end, and only then it will try to do the provisioning again.

Closes #7973

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-11-25 21:38:44 +03:00
Dmitriy Matrenichev
dd45dd06cf
chore: add custom node taints
This PR adds support for custom node taints. Refer to `nodeTaints` in the `configuration` for more information.

Closes #7581

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-11-25 18:33:18 +03:00
Oscar Utbult
8e23074665
docs: fix talosctl pcap argument
Fixes a formatting issue on the website

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-23 21:56:02 +05:30
Oscar Utbult
e4a050cb1d
docs: fix talosctl inspect dependencies example indentation
Adds missing whitespace to ensure correct rendering on web

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-23 19:16:18 +05:30
Oscar Utbult
fbcf4264ff
docs: fix talosctl dashboard cli docs
Fixes the shortcuts for the dashboard command by encoding < and >

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-23 15:18:59 +05:30
Dmitriy Matrenichev
70d53ee13c
chore: deprecate .persist and .extensions
This commit deprecates those things:
- Removes the support of `.persist` flag. From now, it should always be enabled or not defined in the config.
- Removes the documentation for `.bootloader`. It never worked anyway.
- Adds a warning for `.machine.install.extensions`, suggests to use boot-assets.

Closes #7972
Closes #7507

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-11-22 20:35:38 +03:00
Andrey Smirnov
95e33f6fce
release(v1.6.0-alpha.2): prepare release
This is the official v1.6.0-alpha.2 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-22 00:55:55 +04:00
Andrey Smirnov
514e514ba6
feat: update Linux 6.1.63, containerd 1.7.9
Also various small bumps.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-21 18:01:36 +04:00
Noel Georgi
aca8b5e179
fix: ignore kernel command line in container mode
Ignore kernel command line for `SideroLink` and `EventsSink` config when
running in container mode. Otherwise when running Talos as a docker
container in Talos it picks up the host kernel cmdline and try to
configure SideroLink/EventsSink.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-21 18:55:37 +05:30
Oscar Utbult
020a0eb63e
docs: fix table formatting for bootstraprequest
Fixes formatting for https://www.talos.dev/v1.6/reference/api/#bootstraprequest

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-20 20:11:43 +04:00
Oscar Utbult
0eb245e043
docs: fix talosctl pcap example indentation
Fixes whitespaces in examples.

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-20 18:45:27 +04:00
Oscar Utbult
de6caf5348
docs: fix table formatting for machineservice api
Fixes formatting for https://www.talos.dev/v1.6/reference/api/#machineservice

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
2023-11-20 17:13:10 +04:00
Andrey Smirnov
27d208c26b
feat: implement OAuth2 device flow for machine config
Fixes #7939

See documentation in the PR for the description of the feature.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-20 14:31:43 +04:00
Noel Georgi
5c8fa2a803
chore: start containerd early in boot
Start container early in the boot process so system extension services
start in maintenance mode.

Fixes: #7083

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-16 23:19:33 +05:30
Oscar Utbult
95a252cfc9
docs: fix link in what is new page
Fixes a malformed link.

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-16 08:10:11 +05:30
Noel Georgi
0d3c3ed716
feat: support kube scheduler config
Support kube-scheduler config.

Fixes: #7905
Partially fixes: #7911

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-15 10:15:23 +05:30
Andrey Smirnov
06941b7e5c
fix: allow rootfs propagation configuration for extension services
Fixes #7873

Some services which perform mounts inside the container which require
mounts to propagate back to the host (e.g. `stargz-snapshotter`) require
this configuration setting.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-13 21:58:22 +04:00
Oscar Utbult
57dc796f38
docs: update lastRelease to v1.5.5 in _index.md
Keeping things up to date.

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-13 21:08:02 +04:00
Steve Francis
21d944a643
docs: add timezone information
Add FAQ entry.

Signed-off-by: Steve Francis <steve.francis@talos-systems.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-13 20:03:21 +04:00
Noel Georgi
4f1ad16c76
feat: support kubelet credentialprovider config
Support configuring kubelet credential provider config.

Partially fixes: #7911

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-13 19:40:43 +05:30
Andrey Smirnov
71a3bf0e3e
fix: allow extra kernel args for secureboot installer
With SecureBoot, kernel args are part of the UKI (and signed), so we
need to allow kernel args when building an installer, as this is the
only way to allow updating kernel args in SecureBoot mode.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-13 16:28:24 +04:00
Andrey Smirnov
f38eaaab87
feat: rework secureboot and PCR signing key
Support different providers, not only static file paths.

Drop `pcr-signing-key-public.pem` file, as we generate it on the fly
now.

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

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-10 21:14:21 +04:00
Dmitriy Matrenichev
6eade3d5ef
chore: add ability to rewrite uuids and set unique tokens for Talos
This PR does those things:
- It allows API calls `MetaWrite` and `MetaRead` in maintenance mode.
- SystemInformation resource now waits for available META
- SystemInformation resource now overwrites UUID from META if there is an override
- META now supports "UUID override" and "unique token" keys
- ProvisionRequest now includes unique token and Talos version

For #7694

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-11-10 18:17:54 +03:00
Andrey Smirnov
e9c7ac17a9
fix: set max msg recv size when proxying
Previously a fix was deployed in the Talos API client, but when the
request passes through `apid`, we need to make sure that proxy doesn't
reject large responses.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-09 21:08:54 +04:00
Andrey Smirnov
e22ab440d7
feat: update Linux 6.1.61, containerd 1.7.8, runc 1.1.10
Bump tools/pkgs/extras.

Update Go dependencies.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-09 20:17:28 +04:00
Andrey Smirnov
8245361f9c
feat: show first 32 bytes of response body on download error
Fixes #7919

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-08 17:06:04 +04:00
Noel Georgi
75d3987c05
chore: drop sha1 from genereated pcr json
Drop `sha1` algorithm from expected PCR json calculation.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-11-07 22:11:33 +05:30
Utku Ozdemir
6f32d2990f
feat: add .der output talosctl gen secureboot pcr
Output the PCR public key in `.der` format in addition to the `.pem` format.

Closes siderolabs/talos#7742.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2023-11-07 16:25:54 +01:00
Andrey Smirnov
87c40da6cc
fix: proper logging in machined on startup
Move `setupLogging` inside the controller, so that logger is set up
correctly before Talos starts printing first messages.

This fixes an inconsistency that first messages are printed using
"default" logger, while after that the proper logger is set up, and
format of the messages matches kernel log.

Also move `waitForUSBDelay` into the sequencer after `udevd` was
started (this is when blockdevices including USB ones are discovered).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-07 17:09:18 +04:00
Andrey Smirnov
a54da5f641
fix: image build for nanopi_4s
Path was missing a slash.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-07 16:50:22 +04:00
Andrey Smirnov
6f3cd05935
refactor: update packet capture to use 'afpacket' interface
First of all, this interface is way more performant than `pcap`
interface. It is Linux-specific, but we don't care in Talos Linux :)

Second, this drop dependency of `machined` on `gopacket/layers` package,
which has huge issues with memory allocations and startup time.

This cuts around 20MiB of process RSS for all Talos processes.
(`talosctl` still requires this `gopacket/layers` library for decoding
packets).

Fixes #7880

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-07 15:52:04 +04:00
Andrey Smirnov
813442dd7a
fix: don't validate machine.install if installed
As Talos doesn't consume `.machine.install` if already installed, there
is no point in validating it once already installed.

This fixes a problem users often run into: after a reboot/upgrade the
system disk blockdevice name changes, due to the kernel upgrade, or just
unpredictable behavior of device discovery. Talos fails to boot as it
can't validate the machine config, while it's already installed, so
actual blockdevice name doesn't matter.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-03 15:08:42 +04:00
Andrey Smirnov
dff60069c0
feat: update Kubernetes to 1.29.0-alpha.3
See https://github.com/kubernetes/kubernetes/releases/v1.29.0-alpha.3

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-03 14:22:40 +04:00