3932 Commits

Author SHA1 Message Date
Noel Georgi
7114292b6c
docs: fix latest release version in docs
Fix latest release version in docs

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-09 19:15:29 +05:30
Andrey Smirnov
da2985fe1b
fix: respect local API server port
It wasn't used when building an endpoint to the local API server, so
Talos couldn't talk to the local API server when port was changed from
the default one.

Fixes #5706

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-09 00:33:49 +04:00
Andrey Smirnov
e03266667f
fix: correctly validate reboot mode in CLI
This fixes an issue when invalid `--mode` option was treated as a
default mode.

Fixes #5712

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-08 23:45:04 +04:00
Dmitriy Matrenichev
70fc424099
chore: add generic methods and use them
Things like ToSet, Keys etc...

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-06-09 02:59:23 +08:00
Noel Georgi
3ae8bdd92e
chore: run xfs_repair on xfs filesystem returing EUCLEAN
Run `xfs_repair` on XFS filesystems that needs repairing indicated by
the `unix.EUCLEAN` error when mounting

Fixes #5319
Fixes #5437

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-08 23:59:15 +05:30
Tim Jones
0c91c89f4f
chore: revert day-two tests for csi tests
This reverts commit d1294d014f5bee7fc1b5dfd6865f22b22f18f5f1.

Signed-off-by: Tim Jones <tim.jones@siderolabs.com>
2022-06-08 11:04:00 +02:00
Rio Kierkels
f71b583122
feat: disallow anonymous requests by default (kube-apiserver)
This is inline with CIS guidelines. Otherwise the kube-apiserver will pass along the request with the group
set to `system:unauthenticated`. This will expose anything that is allowed by the `system:public-info-viewer`
and `system:discovery` cluster roles.

Signed-off-by: Rio Kierkels <riokierkels@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-08 01:01:04 +04:00
Utku Ozdemir
c19dd1b892
feat: add 'etcd members should be control plane nodes' health check
Add new health check which checks if the etcd members match the control plane nodes. Closes siderolabs#5553.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-06-07 10:34:38 +02:00
Andrey Smirnov
f2997c0f22
chore: bump dependencies
dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-06 23:27:17 +04:00
Andrey Smirnov
f3efec4b56
feat: update containerd 1.6.6, Linux 5.15.45, Flannel 0.18.1
See:

* https://github.com/containerd/containerd/releases/tag/v1.6.6
* https://github.com/containerd/containerd/releases/tag/v1.6.5
* https://github.com/flannel-io/flannel/releases/tag/v0.18.1

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-06 22:52:41 +04:00
Han Cen
27f8e50ce9
fix: add ovmf image path for rhel
Add an OVMF image source path for QEMU, needed on RHEL-based systems.

Signed-off-by: Han Cen <hi@chamburr.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-06 18:23:11 +04:00
Andrey Smirnov
87e7de30cb
docs: fix required ports
Workers need port 50000 to be open for control plane nodes, not port
50001.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-03 23:31:29 +04:00
Noel Georgi
c126f2ee85
chore: bump golang to 1.18.3
Bump Golang to 1.18.3

Ref:
  - https://github.com/siderolabs/pkgs/pull/498
  - https://github.com/siderolabs/extras/pull/51

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-03 19:07:17 +05:30
Andrey Smirnov
c1aed62405
fix: wait for /var to be mounted in kubelet service controller
This is a cosmetic fix: when `KubeletServiceController` tries to write
files to `/etc/kubernetes` before `/var` mounted, it would fail.
Controller will be restarted, but each restart involves a backoff on
each restart which gets longer with each restart.

On the first boot, or when EPHEMERAL is encrypted, mounting might take
considerable time (seconds), so during that time controller might enter
such long backoff timeout that it will delay whole boot sequence - it
won't finish before `kubelet` is started.

By waiting for `EPHEMERAL` to be mounted before starting the controller
we eliminate long backoff cycles.

Also fix a bug when `StartAllServices` task might start a kubelet early
(before `KubeletServiceController` is actually going to start it).

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-02 01:00:47 +04:00
Andrey Smirnov
d7a64f5d2a
fix: improve vip operator shutdown sequence
Fix a bug: when etcd session is closed during election campaign, we
should quit the campaign instead of continuing which is the case when
the election was won (bug found by @frezbo).

Also in the same controller, even before election is won, we should
observer changes to kubelet lifecycle and etcd lifecycle events to make
sure we quit the campaign on appropriate events. This fixes a delay on
kubelet shutdown of control plane when VIP is enabled, but the node
doesn't own the VIP on upgrade.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-01 23:13:58 +04:00
Andrey Smirnov
7b9dfcb852
chore: add 'make go-mod-outdated'
This provides an easy target to find outdated `go.mod` dependencies.

Sample output:

```
>>>> pkg/machinery:
+---------------------------------+------------------------------------+------------------------------------+--------+------------------+
|             MODULE              |              VERSION               |            NEW VERSION             | DIRECT | VALID TIMESTAMPS |
+---------------------------------+------------------------------------+------------------------------------+--------+------------------+
| github.com/cosi-project/runtime | v0.0.0-20220426184241-e22a85955e81 | v0.0.0-20220527181155-95d06feaf8b5 | true   | true             |
| google.golang.org/genproto      | v0.0.0-20220505152158-f39f71e6c8f3 | v0.0.0-20220531173845-685668d2de03 | true   | true             |
| gopkg.in/yaml.v3                | v0.0.0-20220527175918-f17b0f05cf2c |                                    | true   | true             |
+---------------------------------+------------------------------------+------------------------------------+--------+------------------+

>>>> .:
+---------------------------------+--------------------------------------+------------------------------------+--------+------------------+
|             MODULE              |               VERSION                |            NEW VERSION             | DIRECT | VALID TIMESTAMPS |
+---------------------------------+--------------------------------------+------------------------------------+--------+------------------+
| github.com/aws/aws-sdk-go       | v1.44.19                             | v1.44.24                           | true   | true             |
| github.com/containerd/cgroups   | v1.0.4-0.20220301195952-2e502f6b9e43 | v1.0.4                             | true   | true             |
| github.com/cosi-project/runtime | v0.0.0-20220426184241-e22a85955e81   | v0.0.0-20220527181155-95d06feaf8b5 | true   | true             |
| github.com/google/nftables      | v0.0.0-20220515211605-06687b6e34eb   | v0.0.0-20220516205333-a9775fb167d2 | true   | true             |
| github.com/safchain/ethtool     | v0.0.0-20210803160452-9aa261dae9b1   | v0.2.0                             | true   | true             |
| golang.org/x/net                | v0.0.0-20220513224357-95641704303c   | v0.0.0-20220526153639-5463443f8c37 | true   | true             |
| golang.org/x/sys                | v0.0.0-20220517195934-5e4e11fc645e   | v0.0.0-20220520151302-bc2c85ada10a | true   | true             |
| golang.org/x/term               | v0.0.0-20220411215600-e5f449aeb171   | v0.0.0-20220526004731-065cf7ba2467 | true   | true             |
| gopkg.in/yaml.v3                | v0.0.0-20220527175918-f17b0f05cf2c   |                                    | true   | true             |
+---------------------------------+--------------------------------------+------------------------------------+--------+------------------+

>>>> hack/cloud-image-uploader:
+---------------------------+------------------------------------+------------------------------------+--------+------------------+
|          MODULE           |              VERSION               |            NEW VERSION             | DIRECT | VALID TIMESTAMPS |
+---------------------------+------------------------------------+------------------------------------+--------+------------------+
| github.com/aws/aws-sdk-go | v1.44.19                           | v1.44.24                           | true   | true             |
| golang.org/x/sync         | v0.0.0-20210220032951-036812b2e83c | v0.0.0-20220513210516-0976fa681c29 | true   | true             |
+---------------------------+------------------------------------+------------------------------------+--------+------------------+
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-31 23:52:22 +04:00
Andrey Smirnov
98bbab12ea
chore: bump dependencies
dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-31 22:42:52 +04:00
Serge Logvinov
0a6fc906fc
fix: table align hosts file
Easy to read/parse the hosts file

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-31 22:21:30 +04:00
Serge Logvinov
be644c96e4
fix: flannel ipv6 compatibility
Flannel v0.18.0 requares ipv6-cidr in the config file if node.spec.PodCIDRs
has IPv6 subnet.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-31 21:42:46 +04:00
Spencer Smith
99e8f1261f
feat: add support for equinix metal events
This PR gets us closer to being a supported option on Equinix Metal. We
now look for a new kernel arg `em.events_url` and will send events there
based on the state of our install. These events are then presented to
the user in the GUI or via calls to the EM API.

Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
2022-05-31 13:22:40 -04:00
Artem Chernyshev
1ba8a6b94e
chore: update go yaml to the latest version
The updated version has several important bugfixes.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2022-05-31 19:48:32 +03:00
Noel Georgi
400a88dc5f
chore: disable kexec on rpi4 and rockpi
Disable kexec on SBC's known to have issues when doing kexec

Fixes: https://github.com/siderolabs/talos/issues/5649

Raspberry Pi seems to have issues enabling secondary CPU's on subsequent
reboots. RockPi's doesn't seem to work at all with kexec.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-31 19:31:54 +05:30
Noel Georgi
48423a9830
chore: bump kernel to 5.15.44
Bump kernel to [5.15.44](https://github.com/siderolabs/pkgs/pull/494)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-05-31 18:33:18 +05:30
Serge Logvinov
458e44c27c
feat: include azure public IPs from standard LB SKU into extips
Add public IP from Azure Standard SKU LB to the list of external IP (for
proper certificate generation).

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-27 23:25:54 +04:00
Spencer Smith
19edbb5bd4
docs: fix typo in main page
This PR fixes a typo that a kubecon attendee noticed :)

Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
2022-05-27 23:11:08 +04:00
Andrey Smirnov
4ad773f017
feat: update CoreDNS to 1.9.3
See https://github.com/coredns/coredns/releases/tag/v1.9.3

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-05-27 22:48:46 +04:00
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