Commit Graph

4211 Commits

Author SHA1 Message Date
Andrey Smirnov
e9077a6fb9
feat: filter the hostname to produce nodename
Fixes #7615

This extends the previous handling when Talos did `ToLower()` on the
hostname to do the full filtering as expected.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-22 12:41:57 +04:00
Andrey Smirnov
dc8361c1d5
fix: properly GC images supplied with both tag and digest
This is a follow-up fix for #7640

I noticed that image cleanup controller cleans up the images if
specified with both tag and digest.

The problem was incorrectly building image references in the expected
set of images, so they were incorrectly marked as unused.

Refactor the code to make the core part testable.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-21 21:04:24 +04:00
Andrey Smirnov
ccfa8de117
fix: automatically change rpi_4 board on upgrade
As `rpi_4` was removed in Talos 1.5, automatically migrate to
`rpi_generic`.

Fixes #7632

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-21 18:05:42 +04:00
Andrey Smirnov
b56e8b7d9b
fix: support 'List' type manifests
Fixes #7636

This support a `List`-type manifests by unwrapping them into individual
objects.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-21 16:48:37 +04:00
Andrey Smirnov
574d48e540
fix: use image digest when starting a container
First of all, it seems to be "right way", as it makes sure the image is
looked up by the digest.

Second, it fixes the case when image is specified with both tag and
digest (which is not supposed to be the correct ref, but it is used
frequently).

Talos since 1.5.0 stores images with the following aliases:

```
gcr.io/etcd-development/etcd:v3.5.9
gcr.io/etcd-development/etcd@sha256:8c956d9b0d39745fa574bb4dbacd362ffdc1109479432f54094859d4cf984b17
ghcr.io/siderolabs/kubelet:v1.28.0
ghcr.io/siderolabs/kubelet@sha256:50710f2cd3328c23f57dfc7fb00940d8cfd402315e33fc7cb8184fc660650a5c
sha256:50710f2cd3328c23f57dfc7fb00940d8cfd402315e33fc7cb8184fc660650a5c
sha256:8c956d9b0d39745fa574bb4dbacd362ffdc1109479432f54094859d4cf984b17
```

This change pulls the digest format (the last in this list) and uses it
to start a container.

Fixes #7640

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-21 15:48:59 +04:00
Andrey Smirnov
175747cea5
fix: ntp query error with bare IPv6 address
Fixes #7637

See 196f2d4b71

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-21 15:18:14 +04:00
Tim Jones
c8b507fb26
docs: fix kubeprism typo
Fix a small typo ion the KubePrism howto.

Signed-off-by: Tim Jones <tim.jones@siderolabs.com>
2023-08-18 12:40:32 +02:00
Sascha Desch
0cdcb2e0e8
docs: restructure docs for nvidia drivers for v1.4
Re-structure docs for proprietary NVIDIA docs for Talos v1.4.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-18 11:14:52 +05:30
Andrey Smirnov
676db97684
docs: fork docs for Talos 1.6
Create a copy of documentation for Talos 1.6.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-17 19:37:38 +04:00
Andrey Smirnov
92ad18c18f
fix: write correct capacity to the ovf
With the refactoring to 1.5, the confusion between bytes and megabytes
introduced this bug.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-17 18:54:28 +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
52b3d8d37c
docs: make Talos 1.5 documentation the default one
This matches upcoming Talos 1.5.0 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-17 15:08:44 +04:00
Andrey Smirnov
dc873df9b4
chore: fix the filenames of openstack images
They weren't picked up as release artifacts.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-17 13:36:35 +04:00
Noel Georgi
b5c0e7b24c
docs: update nvidia docs
Update NVIDIA docs to point to use pre-built extensions.

Ref: https://github.com/siderolabs/extensions/pull/201

Fixes: #7611

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-16 21:08:17 +05:30
Henry Sachs
9606e871e4
docs: update Jiva Pod Security Policy
Update pod security requirements.

Signed-off-by: Henry Sachs <henrysachs@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-16 17:25:05 +04:00
Andrey Smirnov
a86ed4362c
chore: update Kubernetes Go modules to 0.28.0
Follow-up for #7617.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-16 15:38:25 +04:00
Andrey Smirnov
97b4e3e91c
feat: update Kubernetes to 1.28.0
See https://github.com/kubernetes/kubernetes/releases/tag/v1.28.0

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-15 22:05:49 +04:00
Noel Georgi
79ca1a3dfb
feat: e2e-aws using tf code
e2e-aws using TF code.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-11 19:58:14 +05:30
Andrey Smirnov
bf3a5e0119
chore: add version compatibility for Talos 1.6
This will be backported to 1.5, so that Talos 1.5 machinery will still
provide compatibility for (future) Talos 1.6.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-11 16:09:08 +04:00
Andrey Smirnov
969e8097ce
feat: update Kubernetes to 1.28.0-rc.1
See https://github.com/kubernetes/kubernetes/releases/tag/v1.28.0-rc.1

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-11 15:39:58 +04:00
Noel Georgi
ca41b611e9
chore: drone jsonnet cleanup
Drone jsonnet cleanup.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-11 01:52:43 +05:30
Nico Berlee
bc198e98ef
docs: retain cilium autoMount pending upstream hostPath fix
Partial rollback of 76fa45a.

The cilium helm chart requires an fix to handle the hostPath
at /sys/fs/bpf when bpf.autoMount.enabled=false. The earlier commit
disabled bpf automount, removing the init container's mount. Helm
missed adding the hostPath, and neither /sys nor /sys/fs got added.
This made cilium wrongly mount /sys/fs/bpf.

Fixes error message at: https://github.com/siderolabs/talos/pull/7565#issuecomment-1671063014

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-11 01:13:16 +05:30
Andrey Smirnov
86c94eff8d
refactor: docgen and config examples
Short version is: move from global variables/`init()` function into
explicit functions.

`docgen` was updated to skip creating any top-level global variables,
now `Doc` information is generated on the fly when it is accessed.
Talos itself doesn't marshal the configuration often, so in general it
should never be accessed for Talos (but will be accessed e.g. for
`talosctl`).

Machine config examples were changed manually from variables to
functions returning a value and moved to a separate file.

There are no changes to the output of `talosctl gen config`.

There is a small change to the generated documentation, which I believe
is a correct one, as previously due to value reuse it was clobbered with
other data.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-10 14:56:01 +04:00
Andrey Smirnov
ee6d639f6c
fix: match routes on the priority properly
Fixes #7592

The problem was a mismatch between a "primary key" (ID) of the
`RouteSpec` and the way routes are looked up in the kernel - with two
idential routes but different priority Talos would end up in an infinite
loop fighting to remove and re-add back same route, as priority never
matches.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-10 14:29:47 +04:00
Andrey Smirnov
bff0d8f32c
chore: fix dependencies in the release pipeline
The `images` step modifies files in `_out/` breaking the concurrent
`save-artifacts` step.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-09 22:47:49 +04:00
Andrey Smirnov
e1b288679e
refactor: compile regex in validation method on the first use
See #7578

With this change and #7590, init allocation:

```
init github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1 @2.1 ms, 0.006 ms clock, 1408 bytes, 26 allocs
```

Previously, it was:

```
init github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1 @3.8 ms, 0.30 ms clock, 184248 bytes, 1176 allocs
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-09 19:32:12 +04:00
Andrey Smirnov
daa4c185ae
docs: add what's new and documentation for Talos 1.5
* SecureBoot
* TPM disk encryption
* KubePrism
* Boot Asset Generation

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-08-09 15:48:50 +04:00
Dmitriy Matrenichev
c4a1ca8d61
chore: remove <-errCh where possible in grpc methods
Simplify code by passing error directly into the pipe closer.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-08-07 22:28:58 +03:00
Andrey Smirnov
e0f383598e
chore: clean up the output of the imager
Use `Progress`, and options to pass around the way messages are written.

Fixed some tiny issues in the code, but otherwise no functional changes.

To make colored output work with `docker run`, switched back image
generation to use volume mount for output (old mode is still
functioning, but it's not the default, and it works when docker is not
running on the same host).

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-07 16:00:14 +04:00
Andrey Smirnov
fb536af4d1
chore: optimize memory usage of tcell library on init
There are two changes here:

* build `machined` binary with `tcell_minimal` tag (which disables
  loading some parts of the terminfo database), which also affects
  `apid`, `trustd` and `dashboard` processes, as they run from the same
  executable; in `dashboard` explicitly import `linux` terminal we're
  using when the `dashboard` runs on the machine
* pass `TCELL_MINIMIZE=1` environment variable to each Talos process
  which removes 0.5MiB of runewdith allocation for a lookup table

See #7578

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-04 17:59:18 +04:00
Andrey Smirnov
7c86a365e2
chore: publish systemd-boot and systemd-stub assets
These assets are required to build a UKI, so publish them as part of the
release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-04 16:04:52 +04:00
Artem Chernyshev
7d688ccfeb
fix: make encryption config provider default to luks2 if not set
Fixes: https://github.com/siderolabs/talos/issues/7515

Rename `Kind` to `Provider` in the `v1alpha1_provider`.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2023-08-04 12:20:55 +03:00
Dmitriy Matrenichev
80238a05a6
chore: unify semver under github.com/blang/semver/v4
Currently, we use `github.com/coreos/go-semver/semver` and `github.com/hashicorp/go-version`
for version parsing. As we use `github.com/blang/semver/v4` in our other projects, and it
has more features, it makes sense to use it across the projects. It also doesn't allocate
like crazy in `KubernetesVersion.SupportedWith`.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-08-04 00:29:52 +03:00
Andrey Smirnov
0f1920bdda
chore: provide a resource to peek into Linux clock adjustments
This is a follow-up for #7567, which won't be backported to 1.5.

This allows to get an output like:

```
$ talosctl -n 172.20.0.5 get adjtimestatus -w
NODE         *   NAMESPACE TYPE            ID     VERSION   OFFSET        ESTERROR   MAXERROR   STATUS               SYNC
172.20.0.5   +   runtime   AdjtimeStatus   node   47        -18.14306ms   0s         191.5ms    STA_PLL | STA_NANO   true
172.20.0.5       runtime   AdjtimeStatus   node   48        -17.109555ms  0s         206.5ms    STA_NANO | STA_PLL   true
172.20.0.5       runtime   AdjtimeStatus   node   49        -16.134923ms  0s         221.5ms    STA_NANO | STA_PLL   true
172.20.0.5       runtime   AdjtimeStatus   node   50        -15.21581ms   0s         236.5ms    STA_PLL | STA_NANO   true
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-03 22:06:53 +04:00
Andrey Smirnov
4eab3017b0
fix: calculate log2i properly
Fixes #7080

The real bug was off-by-one in `log2i` implementation, other changes are
cleanups as `x/sys/unix` package now contains all the constants we need.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-03 21:17:58 +04:00
Jared Davenport
bcf2845307
fix: update providerid prefix for aws
This PR updates the ProviderID format for aws resources. There seems to
be a bug when using Talos CCM (which consumes this value from Talos)
because the format is `aws://x/y` (two slashes) vs. the expected
`aws:///x/y` (three slashes) that is set with the AWS CCM code
[here](d055109367/pkg/providers/v1/instances.go (L47-L53)).

Setting only two slashes causes important software in the workload
cluster to fail, specifically cluster-autoscaler. The regex they use for
pulling providerID is [here](702e9685d6/cluster-autoscaler/cloudprovider/aws/aws_cloud_provider.go (L195)).

Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
2023-08-03 10:21:56 -04:00
Christian Rolland
ac2aff5cc5
fix: fix azure portion of cloud uploader
Correctly propagate errors back. Drop ARM templates and use native APIs.
Correctly handle restarted runs for creating image versions. fixes #7512.

Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com>
2023-08-03 09:38:16 -04:00
Andrey Smirnov
793dcedc95
fix: fast-wipe the system disk on talosctl reset
Fixes #7558

I see no reason to keep old behavior (removing all partitions on the
disk), as it's only compatible with Talos itself.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-03 16:28:59 +04:00
Noel Georgi
76fa45afba
docs: update cilium instructions
Update cilium instructions to skip mounting `bpffs`.

Also fix the TPM example in release notes.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-03 14:47:23 +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
Andrey Smirnov
e685208ce5
chore: update go 1.20.7
Some final bumps for the go.mod before going beta.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-02 17:11:51 +04:00
Andrei Kvapil
10f958cf41
feat: network configuration improvements on the NoCloud platform
* support for bonding
* added interface selection by MAC address
* added routes management

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-08-02 15:03:33 +04:00
Noel Georgi
5adeb5042f
feat: update extension spec allowlist for opengl
NVIDIA OpenGL/Vulkan files are super hard-coded.

Ref: https://github.com/siderolabs/extensions/pull/191

Fixes: https://github.com/siderolabs/extensions/issues/171

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-08-02 04:06:09 +05:30
Dmitriy Matrenichev
abf3831174
chore: remove cpu_manager_state on cpuManagerPolicy change
After we closed `kubelet`, remove `/var/lib/kubelet/cpu_manager_state` if there are any changes in `cpuManagerPolicy`.
We do not add any other safeguards, so it's user responsibility to cordon/drain the node in advance.

Also minor fixes in other files.

Closes #7504

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-08-01 18:53:04 +03:00
Andrey Smirnov
018e7f5871
chore: bump dependencies
Linux: 6.1.42
containerd: 1.6.22
Flannel: 0.22.1

And some other Go module bumps, new pkgs/tools/extras.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-07-31 22:33:22 +04:00
Noel Georgi
68e6b98f7d
feat: add security state resource
Add security state resource that describes the state of Talos SecureBoot
and PCR signing key fingerprints.

The UKI fingerprint is currently not populated.

Fixes: #7514

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-07-31 22:02:08 +05:30
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
Steve Francis
ab14905d98
docs: note that Talos API requires TCP only load balancer, not HTTPS
Same note for Kubernetes API.

Signed-off-by: Steve Francis <steve.francis@talos-systems.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-07-31 15:26:13 +04:00
Andrey Smirnov
078c29c733
chore: re-enable cloud images step
The step was disabled for the latest alpha release to workaround AWS
issues which have been resolved.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-07-31 14:55:35 +04:00
Andrey Smirnov
a17272cdda
chore: update hcloud API SDK to v2
There are no functional changes, but SDK got updated to handle int ->
int64 changes. v1 version is only supported to Sep 2023.

See https://github.com/hetznercloud/hcloud-go#support

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-07-28 19:00:10 +04:00