4494 Commits

Author SHA1 Message Date
Andrey Smirnov
6bf50fdc14
chore: disable x/net/trace in gRPC to enable dead code elimination
See https://github.com/grpc/grpc-go/pull/6954

Before:

```
-rw-r--r-- 1 smira smira 68241300 Feb 20 20:08 _out/initramfs-amd64.xz
```

After:

```
-rw-r--r-- 1 smira smira 66376648 Feb 20 20:08 _out/initramfs-amd64.xz
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-22 14:46:35 +04:00
Utku Ozdemir
815a8e9cc5
feat: add partial config support to talosctl cluster create
Allow passing a partial config to the machines using the `--input-dir` flag of `talosctl cluster create`.
With this change, it is not required to have talosconfig inside the input directory, neither for the configuration documents to contain a `v1alpha1` config document. They can solely contain maintenance config, e.g., `KmsgLogConfig`.

This is useful for testing scenarios such as partial machine configs being provided via cloud user data.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2024-02-20 17:08:58 +01:00
Fabiano Fidêncio
64e9703f86
chore: add tests for the Kata Containers extension
Let's add a very basic test for the Kata Containers extension, mimicing
what's already in place for gVisor.

This depends on the work being done in:
https://github.com/siderolabs/extensions/pull/279

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-20 18:49:47 +05:30
Andrey Smirnov
9b62919253
feat: update pkgs
Pulls in following PRs:

* https://github.com/siderolabs/pkgs/pull/893
* https://github.com/siderolabs/pkgs/pull/896
* https://github.com/siderolabs/pkgs/pull/889
* https://github.com/siderolabs/pkgs/pull/899
* https://github.com/siderolabs/pkgs/pull/902

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-20 15:52:41 +04:00
Andrey Smirnov
66f3ffdd4a
fix: ensure that Talos runs in a pod (container)
Drop the Kubernetes manifests as static files clean up (this is only
needed for upgrades from 1.2.x).

Fix Talos handling of cgroup hierarchy: if started in container in a
non-root cgroup hiearachy, use that to handle proper cgroup paths.

Add a test for a simple TinK mode (Talos-in-Kubernetes).

Update the docs.

Fixes #8274

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-20 15:06:48 +04:00
Noel Georgi
9dbc33972a
feat: add basic syslog implementation
Add a basic syslog listening on `/dev/log`.

Fixes: #8087

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-20 15:02:06 +05:30
Utku Ozdemir
0b7a27e6a1
feat: allow access to all resources over siderolink in maintenance mode
SideroLink is a secure channel, so we can allow read access to the resources. This will give us more control of the node via Omni and/or other systems using SideroLink.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2024-02-16 16:39:11 +01:00
pardomue
53721883d5
feat: support AWS KMS for the SecureBoot signing
Fixes #8197

Signed-off-by: pardomue <edgar_ruben.pardo_munoz@roche.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-16 18:41:46 +04:00
Andrey Smirnov
7ee999f8a3
fix: disable KubeSpan endpoint harvesting by default
This disables by default (if not specified in the machine config) the
endpoint harvesting for KubeSpan peers.

The idea was to observe Wireguard endpoints as seen by other peers in
the cluster, and add them to the list of endpoints for the node. This
might be helpful only in case of some special type of NATs which are
almost never seen in the wild today.

So disable by default, but keep an option to enable it.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-16 18:18:33 +04:00
Andrey Smirnov
7b87c7fe97
chore: bump Go dependencies
Update to address also some minor security alerts on the repo.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-16 14:53:54 +04:00
Justin Garrison
8e9596d3c6
docs: rpi talosctl install update
Replaces default architecture in install instructions

fixes #8129

Signed-off-by: Justin Garrison <justin.garrison@siderolabs.com>
2024-02-16 14:19:02 +04:00
Utku Ozdemir
493bb60f81
fix: correctly handle partial configs in DNSUpstreamController
Prevent `DNSUpstreamController` from panicking by checking if the `machine` section in the config is `nil`. This is the case when a machine has partial configuration, e.g., when the machine has only a `SideroLinkConfig` in its config.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2024-02-16 10:31:54 +01:00
Noel Georgi
6deb10ae25
chore: deprecate environmentFile for extensions
Deprecate `environmentFile` for extension services in favor of
`ExtensionServiceConfig`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-16 12:07:47 +05:30
Noel Georgi
f8b4ee82ae
chore: update extensions test
Update extensions test to use strategic patches and use
`ExtensionServiceConfig` document.

Depends on: https://github.com/siderolabs/extensions/pull/320

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-15 23:50:05 +05:30
Andrey Smirnov
1366ce14a8
feat: update Kubernetes to v1.30.0-alpha.2
Talos Linux 1.7.0 will ship with Kubernetes v1.30.0.

Drop some compatibility for Kubernetes < 1.25, as 1.25 is the minimum
supported version now.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-15 21:56:56 +04:00
Andrey Smirnov
559308ef7e
fix: use MachineStatus resource to check for boot done
The previous implementation used old events API, which had several
issues:

* buffer overruns, and weird checks
* big timeout even if the all nodes are booted up

Replace that with direct reading of `MachineStatus` resource which is
available since Talos 1.2.0.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-15 20:33:56 +04:00
Noel Georgi
15e8bca2b2
feat: support environment in ExtensionServicesConfig
Support setting extension services environment variables in
`ExtensionServiceConfig` document.

Refactor `ExtensionServicesConfig` -> `ExtensionServiceConfig` and move extensions config under `runtime` pkg.

Fixes: #8271

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-15 20:16:29 +05:30
Matthieu S
3fe82ec461
feat: custom image settings for k8s upgrade
Allows to use custom registry/images.

Fixes: #8275

Co-authored-by:  @g3offrey
Signed-off-by: Matthieu STROHL <mstrohl@dive-in-it.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-15 17:54:01 +04:00
Dmitriy Matrenichev
fa3b933705
chore: replace fmt.Errorf with errors.New where possible
This time use `eg` from `x/tools` repo tool to do this.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-14 17:39:30 +03:00
Andrey Smirnov
d4521ee9c4
feat: update kernel with sfc driver and LSM updates
See:

* https://github.com/siderolabs/pkgs/pull/890
* https://github.com/siderolabs/pkgs/pull/891

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-14 14:48:45 +04:00
Noel Georgi
2f0421b406
fix: run xfs_repair on invalid argument error
Run `xfs_repair` for invalid argument error.

Part of: #8292

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-13 23:01:33 +05:30
Michael Stephenson
f868fb8e8f
docs: update vmware tools url
Fixed URL to point to repository that exists.

Signed-off-by: Michael Stephenson <m.k.stephenson@outlook.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-13 14:35:11 +04:00
Dmitriy Matrenichev
fa2d34dd88
chore: enable v6 support on the same port
Replace `SO_REUSEPORT` with `SO_REUSEPORT`.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-13 01:02:27 +03:00
Dmitriy Matrenichev
83e0b0c19a
chore: adjust dns sockets settings
Enable some TCP optimization, set minimal TTL, set socket reuse.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-12 17:13:03 +03:00
Andrey Smirnov
a1ec1705bc
chore: update Go to 1.22.0
Finally!

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-12 14:33:38 +04:00
Andrei Kvapil
76b50fcd4a
chore: add Ænix to the Adopters list
Add Ænix to the Adopters list.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-12 15:02:08 +05:30
Dmitriy Matrenichev
5324d39167
chore: bump stuff
Also fix .golangci.yml file.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-09 19:19:25 +03:00
Andrey Smirnov
087b50f429
feat: support systemd-boot ISO enroll keys option
Fixes #8196

Example (profile excerpt):

```yaml
output:
  kind: iso
  isoOptions:
    sdBootEnrollKeys: force
  outFormat: raw
```

Defaults are still same (`if-safe` unless explicitly overridden).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-09 17:48:13 +04:00
Dmitriy Matrenichev
afa71d6b02
chore: use "handle-like" resource in DNSResolveCacheController
Rework (and simplify) `DNSResolveCacheController` to use `DNSUpstream` "handle-like" resources.

Depends on https://github.com/cosi-project/runtime/pull/400

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-08 21:40:57 +03:00
Andrey Smirnov
013e130702
fix: error with decoding config document with wrong apiVersion
Fixes #8270

The base bug was that the registry will return `nil` `ConfigDocument` if
the version is not registered for a kind, which would result into weird
config decoding errors.

Add more unit-tests, while at it, also add more fuzzing samples.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-08 18:39:21 +04:00
Louis SCHNEIDER
1e77bb1c3d
chore: allow custom pkgs to build talos
Allow to override each package reference.

Signed-off-by: Louis SCHNEIDER <louis.schneider@bedrockstreaming.com>
Signed-off-by: Louis SCHNEIDER <louis@schne.id>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-08 17:07:31 +04:00
Andrey Smirnov
3f8a85f1b3
fix: unlock the upgrade mutex properly
Fixes #4525

The previous implementation had several issues:

* etcd concurrency session never closed
* Unlock() with potentially closed context
* unlocking when upgrade sequence finishes, but this overlaps with the
  machine reboot, so a chance that it never got unlocked

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-08 15:50:02 +04:00
AvnarJakob
61c3331b14
docs: update indentation in vip.md
Wrong YAML indentation.

Signed-off-by: AvnarJakob <75129695+AvnarJakob@users.noreply.github.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-08 15:16:40 +04:00
Andrey Smirnov
383e528df8
chore: allow uuid-based hostnames in talosctl cluster create
This is useful when the VMs are booted without machine config,
so default hostnames based on controlplanes/workers no longer make
sense.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-07 16:22:53 +04:00
Noel Georgi
1e6c8c4dec
feat: extensions services config
Support config files for extension services.

Fixes: #7791

Co-authored-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-06 17:12:01 +05:30
shurkys
989ca3ade1
feat: add OpenNebula platform support
Initial support without documentation.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Signed-off-by: shurkys <no@mail.com>
2024-02-05 20:43:47 +04:00
bri
914f887788
docs: update nocloud.md Proxmox information
Proxmox _does_ support manually editing the configuration files, but a safer option is to use the CLI or API for the sake of option validation.

This PR updates the documentation that suggested reading and editing the VM configuration by hand, and replaces that with CLI commands to do the same. The `qm` command needs to be run from a root shell, but you need to be `root` to edit (or even read!) the configuration via something like SFTP, anyway.

I also updated the UUID to be a real UUID, and then tested these commands on my home Proxmox server.

Signed-off-by: bri <284789+b-@users.noreply.github.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-05 20:05:09 +04:00
Henno Schooljan
a04cc80154
fix: pass TTL when generating client certificate
Pass the TTL to the talosconfig generation function.

Signed-off-by: Henno Schooljan <github@sfynx.nl>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-05 18:54:16 +04:00
Dmitriy Matrenichev
3fe8c12ca6
fix: add log line about controller runtime failing
While we decide what to do with #8263 and #8256 this quickfix at least allows us to
see what went wrong

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-05 17:22:02 +03:00
Andrey Smirnov
ddbabc7e58
fix: use a separate cgroup for each extension service
Fixes #8229

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-05 17:37:55 +04:00
Andrey Smirnov
6ccdd2c09c
chore: fix markdown-lint call
Don't ask me why this weird syntax for flags.

Don't ask me why it fails with exit code zero (success) on invalid
flags.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-05 17:18:45 +04:00
Saiyam Pathak
4184e617ab
chore: add test for wasmedge runtime extension
Add tests for WasmEdge container runtime system extension.

Signed-off-by: Saiyam Pathak <saiyam911@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-02-05 18:18:13 +05:30
Andrey Smirnov
95ea3a6c65
chore: bump timeout in acquire tests
With switching to RSA service account, machine config generation time is
considerably higher now, so the test might not make it in time.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-05 15:18:22 +04:00
Andrey Smirnov
c19a505d8c
chore: bump docker dind image
We don't need hacked one anymore.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-05 14:43:39 +04:00
fazledyn-or
d7d4154d5d
chore: remove channel blocking in qemu launch
The channel is never read from.

Signed-off-by: fazledyn-or <ataf@openrefactory.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-02 18:57:36 +04:00
Andrey Smirnov
029d7f7b9b
release(v1.7.0-alpha.0): prepare release
This is the official v1.7.0-alpha.0 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-01 22:10:27 +04:00
Andrey Smirnov
2ff81c06bc
feat: update runc 1.1.12, containerd 1.7.13
Also:

* Linux 6.6.14 + XDP enablement
* etcd 3.5.12

Various other bumps for the tools, utilities, and Go modules.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-01 17:01:04 +04:00
Andrey Smirnov
9d8cd4d058
chore: drop deprecated method EtcdRemoveMember
It was deprecated 16 months ago, time to cleanup.

(This is to prepare for the first v1.7 release)

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-01 15:54:29 +04:00
Andrey Smirnov
17567f19be
fix: take into account the moment seen when cleaning up CRI images
Fixes #8069

The image age from the CRI is the moment the image was pulled, so if it
was pulled long time ago, the previous version would nuke the image as
soon as it is unreferenced. The new version would allow the image to
stay for the full grace period in case the rollback is requested.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-01 14:44:22 +04:00
Andrey Smirnov
aa03204b86
docs: document the process of building custom kernel packages
Fixes #7612

Drop the customizing rootfs docs, and point towards system extensions
documentation, as it is the right way.

Document building custom Talos Linux kernel.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-02-01 14:24:31 +04:00