4527 Commits

Author SHA1 Message Date
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
Andrey Smirnov
c97db5dfe1
chore: bump Go dependencies
Update Go modules.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-03 12:55:23 +04:00
Andrey Smirnov
807a9950ac
fix: use custom Talos/kernel version when generating UKI
See https://github.com/siderolabs/image-factory/issues/44

Instead of using constants, use proper Talos version and kernel version
discovered from the image.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-03 11:14:02 +04:00
Andrey Smirnov
eb94468a65
docs: add documentation for Image Factory
Document Image Factory in general, and also provide specific examples
for boot assets.

Secure Boot section is not covered, as we don't have Secure Boot support
(yet) in the Image Factory.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-02 22:51:05 +04:00
Andrey Smirnov
2e78513e16
refactor: drop the dependency link platform -> network ctrl
This leads to lots of unnecessary improts, as the chain from network
controllers is pretty long.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-01 21:56:49 +04:00
Andrey Smirnov
6dc776b8aa
fix: when writing to META in the installer/imager, use fixed name
Use fixed partition name instead of trying to auto-discover by label.

Auto-discovery by label might hit completely wrong blockdevice.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-01 20:34:41 +04:00
budimanjojo
3703041e98
chore: remove uneeded code
`Input` is initialized with fields populated and at the end of the
function the fields are updated again with the same value

Signed-off-by: budimanjojo <budimanjojo@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-01 17:15:24 +04:00
Andrey Smirnov
cbe6e7622d
fix: generate images for SBCs using imager
See https://github.com/siderolabs/image-factory/issues/43

Two fixes:

* pass path to the dtb, uboot and rpi-firmware explicitly
* include dtb, uboot and rpi-firmware into arm64 installer image when
  generated via imager (regular arm64 installer was fine)

(The generation of SBC images was not broken for Talos itself, but only
when used via Image Factory).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-30 13:46:58 +04:00
Utku Ozdemir
5dff164f1c
fix: fix error output of cli action tracker
Before we started a reboot/shutdown/reset/upgrade action with the action tracker (`--wait`), we were setting a flag to prevent cobra from printing the returned error from the command.

This was to prevent the error from being printed twice, as the reporter of the action tracker already prints any errors occurred during the action execution.

But if the error happens too early - i.e. before we even started the status printer goroutine, then that error wouldn't be printed at all, as we have suppressed the errors.

This PR moves the suppression flag to be set after the status printer is started - so we still do not double-print the errors, but neither do we suppress any early-stage error from being printed.

Closes siderolabs/talos#7900.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2023-10-27 21:16:54 +02:00
Andrey Smirnov
ef5056122b
feat: update etcd to 3.5.10
See https://github.com/etcd-io/etcd/releases/tag/v3.5.10

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-27 15:04:10 +04:00
Utku Ozdemir
45ae80873f
chore: bump go-api-signature dependency to v0.3.1
Bring in the fix in https://github.com/siderolabs/go-api-signature/pull/31

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2023-10-25 16:15:43 +02:00
Artem Chernyshev
ffa5e05cb9
fix: make Talos work on Rockpi 4c boards again
Suppress `efivars` `ENODEV` errors: skip mount and proceed with boot
sequence.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2023-10-25 13:51:38 +03:00
Andrey Smirnov
8eba4c5999
feat: generate secrets bundle from the machine config
This allows to "recover" secrets if the machine config was generated
first without explicitly saving secrets bundle.

Fixes #7895

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-25 13:44:14 +04:00
Andrey Smirnov
c7de745f61
chore: drop deprecated code
This was done pre-1.5, so time to drop compatibility shims to make things
less confusing.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-24 21:49:24 +04:00
Florian Berchtold
cc0c3ab69c
docs: update rpi_generic.md
Update image extension.

Signed-off-by: Florian Berchtold <florian.berchtold@luminartech.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-24 14:35:13 +04:00
Nico Berlee
a009f5c60c
fix: accept sysctl paths with dots
Fixes #7878

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-20 21:16:15 +04:00
Nico Berlee
4919f6ee22
feat: add GOMEMLIMIT to shipped manifests with memory limits
This commit integrates the GOMEMLIMIT environment variable into shipped K8S
manifests when resources.limits.memory is defined. It is set to 95% of the
memory limit to optimize the performance of the Go garbage collector,
mitigating the risk of OOMKills in containerized environments.

When configuring the controller-manager or scheduler custom resources in
machine config, they where accepted, but ignored.

This commit adds Resources to NewControlPlaneSchedulerController and
NewControlPlaneControllerManagerController so machine config resources
Fixes #7874

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-20 20:41:40 +04:00
Andrey Smirnov
73ee576ea7
chore: update sonobuouy library, drop the fork
PR https://github.com/vmware-tanzu/sonobuoy/pull/1933 got merged and
0.57.0 releases, so update accordingly.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-19 12:55:23 +04:00
Andrey Smirnov
c23bc2f4a7
chore: support OCI layout as a source for profile input
This supports full Image interface.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-18 22:04:37 +04:00
Oscar Utbult
154bbd70f7
docs: fix talos version in guide for docker
Also update VIP and other network docs.

Signed-off-by: Oscar Utbult <oscar.utbult@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-18 18:56:30 +04:00
Andrey Smirnov
11d1f61635
release(v1.6.0-alpha.1): prepare release
This is the official v1.6.0-alpha.1 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-17 21:20:13 +04:00
Andrey Smirnov
9dfae8467d
chore: update dependencies
Containerd 1.7.7, Linux 6.1.58.

Fixes #7859

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-17 17:41:38 +04:00
Serge Logvinov
38ce3c827a
feat: nocloud prefer mac address
Use MAC address over network interface name.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-16 17:35:58 +04:00
Serge Logvinov
401e894112
feat: customize image size
Can possible to change boot image size.
Change the default image size for some cloud platform.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-16 15:51:13 +04:00
Thomas Lemarchand
865f08f867
docs: kubeadm migration guide improvements
Add a note about service token issues.

Signed-off-by: Thomas Lemarchand <tlemarchand@users.noreply.github.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-16 15:04:37 +04:00
Andrey Smirnov
c3e4182000
refactor: use COSI runtime with new controller runtime DB
See https://github.com/cosi-project/runtime/pull/336

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-12 19:44:44 +04:00
Andrey Smirnov
c1ee24465a
feat: update Kubernetes to v1.29.0-alpha.2
See https://github.com/kubernetes/kubernetes/releases/tag/v1.29.0-alpha.2

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-12 18:31:06 +04:00
Serge Logvinov
0ff7350abe
fix: oracle integration fixes
* Set static gateway IPv6 if it possible.
  Some cni do not work properly with ipv6, so we will fix it.
* Disable talos dashboard.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-12 17:51:50 +04:00
Andrey Smirnov
675bada454
test: add config generation stability tests
These tests ensure that config generation for older versions of Talos is
stable as we move forward and introduce new features in the machine
configuration.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-12 17:30:14 +04:00
Andrey Smirnov
f9639fb531
test: fix 'talosctl gen' tests
There were weird hacks put into the tests, while each test already runs
in a temporary directory as 'working directory', so no hacks are needed.

Moreover, using fixed `/tmp/...` paths leads to test failures, as CI
runs docker & QEMU tests in parallel conflicting with each other.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-12 16:24:02 +04:00
Andrei Kvapil
6142d87a0f
feat: hostname configuration improvements on the NoCloud platform
* support for local-hostname parameter
* support for hostnames passed via user-data (for Proxmox VE)

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-12 15:45:25 +04:00
Andrey Smirnov
7bb205ebe2
fix: don't use runtime-specs Mount struct in machine config
First of all, it breaks our backwards compatibility promises and breaks
documentation generation. Upstream `specs.Mount` might change at any
time.

The issue was that containerd 1.7.x brings in new `specs.Mount` which
contains extra fields which don't have `omitempty` for YAML, so
machinery always generates them which confuses old Talos versions.

Use a copy of the upstream struct with proper YAML tags, and also
provide a special trick to make sure if the upstream struct changes, we
have a chance to update our copy of the struct.

Also this fixes docs and JSON schema.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-11 23:06:19 +04:00
Andrey Smirnov
d1b27926c2
feat: update Go to 1.21.3
Update related dependencies.

See [CVE-2023-44487](https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-11 15:10:02 +04:00
Thomas Way
b87092ab69
fix: handle secure boot state policy pcr digest error
This does not fix the underlying digest mismatch issue, but does handle the error and should provide
further insight into issues (if present).

Refs: #7828

Signed-off-by: Thomas Way <thomas@6f.io>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-09 18:24:56 +04:00
mikucat0309
498aeb8c32
docs: fix incorrect image suffix
When user follow instructions in document v1.5 and v1.6, curl will make
a request with invalid image URL, this correct image suffixes.

Fixes siderolabs#7809

Signed-off-by: mikucat0309 <admin@mikuc.at>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-09 15:28:42 +04:00
Utku Ozdemir
c14a5d4f79
feat: support service account auth in cli
Move the common GRPC interceptor code for siderov1 auth into go-api-signature.

Refactor go-api-signature to attempt to read the known environment variables for service accounts.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2023-10-06 12:15:24 +02:00
Thomas Way
336aee0fdb
fix: use tpm2 hash algorithm constants and allow non-SHA-256 PCRs
The conversion from TPM 2 hash algorithm to Go crypto algorithm will fail for
uncommon algorithms like SM3256. This can be avoided by checking the constants
directly, rather than converting them. It should also be fine to allow some non
SHA-256 PCRs.

Fixes: #7810

Signed-off-by: Thomas Way <thomas@6f.io>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-10-04 01:02:20 +05:30
Noel Georgi
69d8054c9e
chore: drop UpdateEndpointSuite
drop `UpdateEndpointSuite` suite since KubePrism is enabled by default
starting Talos 1.6 and the test never passes since K8s node is always
ready since it can connect to api server over KubePrism.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-10-04 00:26:59 +05:30
Andrey Smirnov
ef7be16c80
fix: clear the encryption config in META when STATE is reset
When STATE is reset, we need to make sure we wipe the META keys
containing encryption config as well.

Fixes #7819

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-03 22:00:21 +04:00
Jacob McSwain
5fc60d2caa
feat: add Solarflare SFC9000 support
These cards are still relevant today at 10gbps and are cheaply available
for homelab use.

Signed-off-by: Jacob McSwain <jacob.a.mcswain@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-10-03 01:27:03 +05:30
Noel Georgi
9b5cfdd0bc
chore: add tests for iscsi
Add tests for iscsi to make sure it works.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-10-02 22:12:42 +05:30
Mans Matulewicz
b897764f8e
docs: update proxmox.md
Replacing virtualbox cluster name with proxmox.

Signed-off-by: Mans Matulewicz <mans.matulewicz@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-02 18:48:27 +04:00
Zachary Milonas
159f45bde6
docs: fix typos in CLI calls to endpoints
It should be `--endpoints`.

Signed-off-by: Zachary Milonas <25948390+zmilonas@users.noreply.github.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-02 18:08:38 +04:00
Andrey Smirnov
0bd1bdd744
chore: allow insecure access to installer base image (imager)
This allows to force pull over insecure from non-local endpoints.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-29 14:43:19 +04:00
Andrey Smirnov
10ed130679
fix: the node IP for kubelet shouldn't change if nothing matches
This was a fix some time ago, but it was incorrect (missing `continue`),
which was failing the unit-tests.

Also fix a data race in another unit-test (which is unit-test only, not
affecting production).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-29 14:22:52 +04:00
Andrey Smirnov
e7575ecaae
feat: support n-5 latest Kubernetes versions
For Talos 1.6 this means 1.24-1.29 Kubernetes.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-29 13:41:56 +04:00
Andrey Smirnov
e71508ec10
chore: update dependencies
Go modules, Cilium CLI, Helm, etc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-28 19:48:02 +04:00