3506 Commits

Author SHA1 Message Date
Andrey Smirnov
7a4062904e
chore: update Sidero Labs go modules to released versions
In preparation for beta release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-27 22:04:42 +04:00
Andrey Smirnov
e40153aefb
fix: introduce more route protocols as constants
This fixes marshaling of route information.

Taken from `/etc/iproute2/rt_protos`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-27 21:46:44 +04:00
Andrey Smirnov
3ed254976b
feat: update Kubernetes to 1.24.1
See https://github.com/kubernetes/kubernetes/releases/tag/v1.24.1

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-27 19:33:07 +04:00
Andrey Smirnov
ceae420a84
chore: update tools/pkgs/extras to 1.1.0
In preparation for Talos 1.1.0-beta, update all dependencies to release
versions.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-27 19:12:57 +04:00
Andrey Smirnov
f9c46fb18d
fix: unmarshal HardwareAddr without stdlib help
Stdlib `net.ParseMAC` does lots of validations, but some hardware addrs
we can see (on logical interfaces) are not valid, so parse MACs in a
simple way.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-26 23:30:31 +04:00
Andrey Smirnov
f2e94d6020
fix: implement unmarshaling from YAML for LinkStatus
This adds missing conversion back from text as needed.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-26 22:39:00 +04:00
Andrey Smirnov
fe858041bd
feat: enable version API in maintenance mode
Version API is only available over SideroLink connection.

This is useful to find Talos version as it got booted (e.g. to generate
proper machine configuration).

There's a security concern that version API might return sensitive
information via public API. At the same time Talos version can be
guessed by looking at the output of other APIs, e.g. resource type list
(`talosctl get rd`), which changes with every minor version.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-26 21:47:10 +04:00
Andrey Smirnov
875f67a6e1
fix: correctly parse empty route flags from YAML
This fixes unmarshaling of resource spec for routes with empty flags.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-26 21:14:54 +04:00
Noel Georgi
00515b4bae
chore: rename memory to memorymodules
Rename `memory` to `memorymodules` to be more explicit

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-26 22:13:18 +05:30
Andrey Smirnov
9c4b7d6e8c
feat: update Flannel to 0.18.0
See https://github.com/flannel-io/flannel/releases/tag/v0.18.0

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-26 17:38:09 +04:00
Philipp Sauter
c5297009e0
feat: support join token as part of siderolink kernel parameter
To enable authorization to services via siderolink on startup we extend
the kernel parameter siderolink.api to accept an optional join token as
a parameter as in grpc://<host>:<port>?jointoken=1234

Fixes #5592

Signed-off-by: Philipp Sauter <philipp.sauter@siderolabs.com>
2022-05-26 15:12:35 +02:00
Noel Georgi
0dc4ad58e5
chore: bump kernel to 5.15.43
Bump kernel to [5.15.43](https://github.com/siderolabs/pkgs/pull/490)

Also pulls in:

- [Azure disks udev rules](https://github.com/siderolabs/pkgs/pull/488)
- [pkgs stable build time](https://github.com/siderolabs/pkgs/pull/489)
- [extras stable build time](https://github.com/siderolabs/extras/pull/49)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-26 18:16:28 +05:30
Philipp Sauter
610884aa09
docs: correct the install-image tag in the Developing Talos section
The tag was already corrected in v1.1 of the doc but we also need to
correct it for v1.0. When we check out git tag v1.0.5 and build the
installer it will create the image with `siderolabs` in the image tag.

Signed-off-by: Philipp Sauter <philipp.sauter@siderolabs.com>
2022-05-26 10:10:24 +02:00
Andrey Smirnov
af5ac30a7b
feat: enable passing custom kernel args to the ISO creator
Instead of hardcoded `grub.cfg`, use common code to generate list of
kernel arguments and allow using `--extra-kernel-arg` as well.

Before the change:

```
linux /boot/vmlinuz init_on_alloc=1 slab_nomerge pti=on panic=0 consoleblank=0 printk.devkmsg=on earlyprintk=ttyS0 console=tty0 console=ttyS0 talos.platform=metal
```

New (default line):

```
linux /boot/vmlinuz talos.platform=metal earlyprintk=ttyS0 console=ttyS0 console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 random.trust_cpu=on printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-25 18:26:44 +04:00
Noel Georgi
b7d068f60c
chore: add cloud-image-uploader to go workspace
Add cloud-image-uploader to go workspace

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-25 19:19:23 +05:30
Noel Georgi
88efd75d3f
docs: fix install script url
Fix VMWare install script url

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-25 15:37:41 +05:30
Andrey Smirnov
3f88030ca7
test: use use correct method to generate Wireguard private key
`GenerateKey` generates random 32 bytes vs. the key suitable for
Wireguard endpoint key.

This is the only place in code with this bug, and it is only used in
test code (`talosctl cluster create` with fixed Wireguard
configuration).

SideroLink and Kubespan are not affected.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-24 23:18:23 +04:00
Dmitriy Matrenichev
8c675c6692
chore: siderolink maintenance mode
If SideroLink is enabled, maintenance mode should only allow Siderolink connections.

Closes #5627

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-05-25 02:23:58 +08:00
Tim Jones
4551cbd7fc
fix: cluster creation error message formatting
Use "%w" to properly unwrap the error operand

Signed-off-by: Tim Jones <tim.jones@siderolabs.com>
2022-05-24 18:12:33 +02:00
Tim Jones
bafa1f49d4
fix: improve error message when creating cluster
Add extra context to error message when unable to properly
open the talos config file when creating a cluster.

Signed-off-by: Tim Jones <tim.jones@siderolabs.com>
2022-05-24 13:40:15 +02:00
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs
f03002ec68
feat: add support for disabling search domains
This adds the option to toggle the automatic creation of search domains.

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-23 22:14:27 +04:00
Andrey Smirnov
a1b6f21a82
chore: bump dependencies
dependabot-based, go-mod-outdated is broken due to sum issue with Azure
SDK package :(

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-23 21:25:04 +04:00
Serge Logvinov
1156daac2f
fix: azure hostname definition
Fixes:
* Node hostname has a different place in metadata config.
* Do not reboot if machine-config is empty.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-23 17:42:50 +04:00
Andrey Smirnov
33a631f026
feat: look up Links PCI vendor/product via PCI ID database
This increases `initramfs` size by 356060 bytes (raw text database is
1.3 MiB).

In QEMU:

```
$ talosctl -n 172.20.0.2 get links eth0 -o yaml
spec:
    ...
    productID: "0x1000"
    vendorID: "0x1af4"
    product: Virtio network device
    vendor: Red Hat, Inc.
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-23 17:21:49 +04:00
Noel Georgi
40e57efa40
chore: fix reference to talosconfig
Fix reference to talosconfig in VirtualBox docs

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-23 18:25:01 +05:30
Noel Georgi
30eeb851b7
docs: extension service security options
Explain extension service `container.security` options

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-23 16:05:23 +05:30
Dmitriy Matrenichev
bf7a6443ee
feat: add 'etcd membership is consistent across nodes' health check
Add new health check which waits for all etcd members. Closes #5552.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-05-20 21:51:17 +08:00
Noel Georgi
4b3935fa4d
docs: fix 1.1.x support matrix
Update 1.1.x support matrix

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-20 00:28:24 +05:30
Noel Georgi
efcdc16c5a
chore: add go.work
Add go.work to work with `talos` and `pkg/machinery`

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-19 23:13:57 +05:30
Noel Georgi
20286c9082
feat: add cpu/ram info as resource
Expose processor and memory information from SMBIOS as Talos resources.

Output from QEMU:

```bash
❯ talosctl -n 10.5.0.2 get cpu
NODE       NAMESPACE   TYPE        ID      VERSION   MANUFACTURER   MODEL        CORES   THREADS
10.5.0.2   hardware    Processor   CPU-0   1         QEMU           pc-q35-6.2   4       1

❯ talosctl -n 10.5.0.2 get ram
NODE       NAMESPACE   TYPE     ID       VERSION   MANUFACTURER   MODEL   SIZE
10.5.0.2   hardware    Memory   DIMM-0   1         QEMU                   2048

❯ talosctl -n 10.5.0.2 get cpu CPU-0 -o yaml
node: 10.5.0.2
metadata:
    namespace: hardware
    type: Processors.hardware.talos.dev
    id: CPU-0
    version: 1
    owner: hardware.SystemInfoController
    phase: running
    created: 2022-05-19T13:58:12Z
    updated: 2022-05-19T13:58:12Z
spec:
    socket: CPU 0
    manufacturer: QEMU
    productName: pc-q35-6.2
    maxSpeed: 2000
    bootSpeed: 2000
    status: 65
    coreCount: 4
    coreEnabled: 4
    threadCount: 1

❯ talosctl -n 10.5.0.2 get ram DIMM-0 -o yaml
node: 10.5.0.2
metadata:
    namespace: hardware
    type: Memories.hardware.talos.dev
    id: DIMM-0
    version: 1
    owner: hardware.SystemInfoController
    phase: running
    created: 2022-05-19T13:58:12Z
    updated: 2022-05-19T13:58:12Z
spec:
    size: 2048
    deviceLocator: DIMM 0
    bankLocator: ""
    speed: 0
    manufacturer: QEMU
```

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-19 22:48:27 +05:30
Andrey Smirnov
c3f29031b7
feat: add ethtool ioctl as additional source of information
This expands `LinkStatus` information when available.

Example, for QEMU:

```
$ talosctl -n 172.20.0.6 get links eth0 -o yaml
    busPath: "0000:00:02.0"
    driver: virtio_net
    driverVersion: "1.0.0\00-talos"
```

```
$ talosctl -n 172.20.0.6 get links bond0 -o yaml
    driver: bonding
    driverVersion: 5.15.40-talos
    firmwareVersion: "2"
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-18 23:54:38 +03:00
Noel Georgi
34d9a875ac
chore: go-smbios updates
go-smbios library updates

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-18 19:27:06 +05:30
Noel Georgi
f477eb8820
chore: bump kernel to 5.15.41
Bump kernel to [5.15.41](https://github.com/siderolabs/pkgs/pull/483)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-18 18:55:04 +05:30
Andrey Smirnov
5bac5e91ab
docs: fix "double-base64-encode" in cert/key examples
The examples contain raw structures which will be base64-encoded on
marshaling to YAML which might be confusing if someone tries to decode
values.

At the same time we want to make sure that example certs/keys are not
useable to prevent clusters being created with fixed secrets.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-18 15:38:18 +03:00
Artem Chernyshev
396e1386cf
feat: implement network device selector
Fixes: https://github.com/siderolabs/talos/issues/4203

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2022-05-18 13:46:52 +03:00
Andrey Smirnov
5a8e011db9
fix: match for WSL platform in case-insentive way
```
$ cat /proc/sys/kernel/osrelease
4.19.128-microsoft-standard
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-17 20:09:10 +03:00
Nat Allan
ee8113b5f2
docs: add vector logging example
Adds a example setup for sending talos logs to a vector aggregator

Signed-off-by: Nat Allan <19149206+Truxnell@users.noreply.github.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-17 19:40:09 +05:30
Andrey Smirnov
14985674ce
fix: allow SideroLink IPs in NodeAddresses
Fixes #5588

This fixes `apid` certificate generation for SideroLink IPs, so that
Talos API can be accessed over SideroLink connection.

We also drop SideroLink addresses from cluster discovery, as these
addresses don't work across nodes, so that they are not used for
KubeSpan, endpoints, etc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-16 21:15:57 +03:00
Serge Logvinov
63f23e905e
feat: openstack dhcp-v6 types
Support ipv6_dhcp-* types of network.
Apply static IPs in all supported network types.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-16 17:38:42 +03:00
Noel Georgi
5ec4e9096e
chore: bump kernel to 5.15.40
Bump kernel to [5.15.40](https://github.com/siderolabs/pkgs/pull/481)

Also bumps u-boot to [v2022.04](https://github.com/siderolabs/pkgs/pull/479)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-16 19:28:09 +05:30
Noel Georgi
8cef958dd1
docs: update jetson nano docs
Update Jetson Nano docs to use R32.7.2 release and u-boot 2022.04

Ref: https://github.com/siderolabs/pkgs/pull/479

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-16 19:03:32 +05:30
Andrey Smirnov
554edd3e89
chore: bump dependencies
dependabot + go-mod-outdated

`arp` library is now using Go stdlib `netip.Addr`, so we need an ugly
way to convert `netaddr.IP` to `netip.Addr`. We should soon refactor to
use `netip.Addr` everywhere (starting with `siderolabs/net` package).

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-16 16:11:54 +03:00
Philipp Sauter
f2d89735fd
feat: extend the extension service spec with container security options
We extend the extension service spec with three security options,
WithWriteableSysfs, WithMaskedPaths, WithReadonlyPaths

Fixes #5411

Signed-off-by: Philipp Sauter <philipp.sauter@siderolabs.com>
2022-05-16 14:33:04 +02:00
Dmitriy Matrenichev
850cfba72f
chore: fix type order in deep-copy generation line
Rewrite types in deep-copy generation line to ascending order. Coming from #5563.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-05-16 19:49:42 +08:00
Andrey Smirnov
5a91f6076d
fix: ignore completed pods in cluster health check
This fixes an error when integration test become stuck with the message
like:

```
waiting for coredns to report ready: some pods are not ready: [coredns-868c687b7-g2z64]
```

After some random sequence of node restarts one of the pods might become
"stuck" in `Completed` state (as it is shown in `kubectl get pods`)
blocking the check, as the pod will never become ready.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-16 14:28:25 +03:00
Tim Jones
488ce753fd
docs: tidy up adopters
Add a markdown newline marker (double-space) to Equinix Metal entry.

Signed-off-by: Tim Jones <tim.jones@siderolabs.com>
2022-05-13 19:19:18 +02:00
Andrey Smirnov
290f968fea
release(v1.1.0-alpha.2): prepare release
This is the official v1.1.0-alpha.2 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-13 16:12:56 +03:00
Dmitriy Matrenichev
a6e4365823
feat: implement DeepCopy using code generation
Refactor every typed.Resource except KubeletConfigSpec to use deep-copy tool for generating DeepCopy method.

KubeletConfigSpec is excluded because its DeepCopy method is not trivial.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-05-13 04:39:36 +08:00
Serge Logvinov
91a49c4e7c
fix: dhcpv6 leasetime segfault loop
We are trying to get an IP-address lifetime, but we do not have it yet.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-12 21:51:45 +03:00
Andrey Smirnov
afb679586a
fix: reset certificate SANs on update
This affects both API server and Talos API cert SANs.

Before the fix, SANs accumulated changes over time, so even if the
hostname changes, old hostname is still kept in SANs. Even though it
shouldn't be a problem in general, it is confusing as after reboot list
will be reset back to expected value.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-12 21:03:35 +03:00