2759 Commits

Author SHA1 Message Date
Alexey Palazhchenko
4dae9ea55c chore: use vtprotobuf compiled marshaling in Talos API
Use `vtprobuf` optimized Marshal/Unmarshal methods which do not depend
on reflection to reduce memory and CPU usage while using Talos API.

See https://github.com/planetscale/vtprotobuf and
https://vitess.io/blog/2021-06-03-a-new-protobuf-generator-for-go/

Co-authored-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-09 08:42:13 -07:00
Andrey Smirnov
7ca5749ad4 chore: bump dependencies via dependabot
PRs #4033 #4034 #4035 #4036 #4037 #4038 #4039 #4040

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-09 08:32:02 -07:00
Andrey Smirnov
b2507b41d2 chore: improve artifacts generation reproducibility
Sparse file generation replaced with Go native calls.

Final artifact `.tar` reproducible with new tar flags and using GNU tar
instead of busybox one, but as the image itself is not reproducible,
this only helps a bit.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-09 06:54:47 -07:00
Andrey Smirnov
1f7dad234b chore: update PKGS version (512 cpus, new ca-certficates)
This pulls in a change to bump number of max CPUs in the kernel to 512
and update ca-certificates.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-09 06:54:14 -07:00
Andrew Rynhard
1a2e78a24e fix: update go-blockdevice
Brings in the latest version of go-blockdevice to fix and issues with
the PMBR.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2021-08-08 09:09:03 -07:00
Andrey Smirnov
6d6ed1170f chore: use parallel xz with higher compression level
Preset `-0` for xz means fast compression but low compression level.
Changing this to `-6` (default) means that result is 10% smaller (tested
with RPi4 image).

Enable parallel compression with number of threads equal to number of
CPUs to make it compress even faster then with `-0`:

* `-0`: 15s
* `-6`: 60s
* `-6 -T 0`: 10s (on my machine, depends on number of cores)

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-06 12:51:31 -07:00
Andrey Smirnov
571f7db1bb chore: workaround GitHub new release notes limit
GitHub recently introduced limit of 25000 byte for the release notes,
which breaks our release process, as our notes are over the limit.

PR https://github.com/talos-systems/talos/pull/4021 introduced support
for GFM release notes, which are at least 50% smaller.

This PR enables GFM, adds a check for release notes size and pushes
release-notes step to every build so that we known in advance if release
notes are over the limit (vs. the moment we push the release).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-06 11:56:26 -07:00
Alexey Palazhchenko
09d70b7eaf feat: update Kubernetes to v1.22.0
Closes #3967.
Closes #3997.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-06 09:06:32 -07:00
Andrey Smirnov
f25f10e73e feat: add an option to disable PSP
This feature comes as PSP is deprecated and going to be removed in 1.25.
In preparation for that, add an option to disable PSP which was always
enabled in Talos by default.

To keep backwards compatibility, PSP is still enabled by default.

See also #3971

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Co-authored-by: Adam Szucs-Matyas <szucsitg@gmail.com>
2021-08-06 06:45:33 -07:00
Andrey Smirnov
7c6e4cf230 feat: allow both DHCP and static addressing for the interface
No need to do hacks with multiple interface entries just to get multiple
addressing methods

Fixes #2804

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-05 14:48:18 -07:00
Andrey Smirnov
3c566dbc30 fix: remove admission plugins enabled by default from the list
This allows to disable these plugins via `extraArgs` and shortens
argument list for the `kube-apiserver`.

There are no functional changes, as these plugins are enabled by default
anyways.

Based on #3971

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Co-authored-by: Adam Szucs-Matyas <szucsitg@gmail.com>
Signed-off-by: Adam Szucs-Matyas <szucsitg@gmail.com>
2021-08-04 22:59:22 -07:00
Andrey Smirnov
69ead37353 fix: preserve PMBR bootable flag correctly
See https://github.com/talos-systems/go-blockdevice/pull/41

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-04 22:58:15 -07:00
Andrey Smirnov
dee6305170 fix: align partitions with minimal I/O size
Also print discovered blockdevice properties before partitioning the
device.

See https://github.com/talos-systems/go-blockdevice/pull/40

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-04 11:51:00 -07:00
Andrey Smirnov
628902297d feat: update GRUB to 2.06
See https://github.com/talos-systems/pkgs/pull/310

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-04 10:07:21 -07:00
Serge Logvinov
b9d04928d9 feat: move system processes to cgroups
* use cgroup v2
* cgroups: /init, /system, /system/runtime
* kubelet cgroup metrics

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-08-04 09:00:38 -07:00
Andrey Smirnov
0b8681b4b4 fix: resolve several issues with Wireguard link specs
* correctly merge wireguard specs across multiple configuration layers
(partially stolen from #3577)

* fix erroneous wireguard reconfig when listen port in the config is
zero

* add tests for link merging (once again, partially stolen from #3577)

* fix ugly bug with LinkSpec Type merging (I believe it's a major source
of pain for you, Seán, in your PR).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-03 13:25:19 -07:00
Serge Logvinov
f8f4bf3bae docs: add disk encryptions examples
* Update partition encryption mount options

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-08-03 12:54:54 -07:00
Andrey Smirnov
79b8fa64b9 feat: update containerd to 1.5.5
* https://github.com/containerd/containerd/releases/tag/v1.5.5

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-03 10:26:21 -07:00
Andrey Smirnov
539f42090e chore: bump dependencies via dependabot
Fixes #3993

Fixes #3994

Fixes #3995

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-03 10:25:17 -07:00
Andrey Smirnov
0c7ce1cd81 feat: remove remnants of bootkube support
Fixes #3951

Bootkube support was removed in Talos 0.9. Talos versions 0.9-0.11
support conversion of self-hosted bootkube-based control plane to the
new style control plane running as static pods managed by Talos.

This commit removes all backwards compatibility and removes conversion
code.

For the k8s controllers, `BootstrapStatus` is removed and a dependency
on `etcd` service status is added (as it was implicitly there via
`BootstrapStatus`).

Remove control plane conversion code.

In k8s upgrade code, remove self-hosted part.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-03 07:55:42 -07:00
Alexey Palazhchenko
d4f9804f86 chore: fix typos
"Optimizations" wasn't spelled correctly.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-08-03 07:42:15 -07:00
Artem Chernyshev
5f027615ff feat: expose more encryption options to the machine config
Fixes: https://github.com/talos-systems/talos/issues/3606

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-27 11:19:26 -07:00
Alexey Palazhchenko
585152a0be chore: bump dependencies
Closes #3983.
Closes #3984.
Closes #3985.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-26 04:37:25 -07:00
Serge Logvinov
fc66ec5969 feat: set oom score for main processes
This PR change oom score:
* containerd to -999
* apid, trustd to -998
* cri to -100
* etcd to -998

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-07-24 20:29:03 -07:00
Serge Logvinov
df54584a33 fix: drop linux capabilities
apid, trusted, etcd run as root and do not need this permissions

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-07-23 18:00:37 -07:00
Spencer Smith
f65d0b739b docs: add 0.11.3 AMIs
This PR adds AMIs for 0.11.3

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-07-23 09:40:36 -04:00
Spencer Smith
7332d63695 fix: bump pkgs for new kernel 5.10.52
This PR pulls in new pkgs to ensure we're patched against CVE-2021-33909

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-07-22 13:18:42 -07:00
Artem Chernyshev
70d2505b7c fix: do not require ToVersion to be set when detecting version
We do not know the upgrade version when checking components versions in
Theila.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-21 08:51:26 -07:00
Alexey Palazhchenko
0953b19985 chore: update extras to bring a new CNI bundle
https://github.com/containernetworking/plugins/releases/tag/v0.9.1

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-20 07:27:13 -07:00
Rui Lopes
b6c47f866a fix: set the /etc/os-release HOME_URL parameter
the previous url was failing as described in https://github.com/talos-systems/talos/issues/3968

Signed-off-by: Rui Lopes <rgl@ruilopes.com>
2021-07-20 05:20:48 -07:00
Alexey Palazhchenko
c780821d0b feat: update containerd to 1.5.3, runc to 1.0.1
Update pkgs and constants.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-19 08:56:32 -07:00
Artem Chernyshev
f8f1c83a75 feat: detect the lowest Kubernetes version in upgrade-k8s CLI command
Scan all pods in `kube-system` and find `kube-proxy`, `kube-scheduler`,
`kube-controller-manager` and `kube-apiserver` ones, then check the
lowest version amongst them.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-19 08:24:04 -07:00
Artem Chernyshev
55e17ccdd1 chore: bump dependencies
Fixes: https://github.com/talos-systems/talos/pull/3954 https://github.com/talos-systems/talos/pull/3955 https://github.com/talos-systems/talos/pull/3956 https://github.com/talos-systems/talos/pull/3957 https://github.com/talos-systems/talos/pull/3958 https://github.com/talos-systems/talos/pull/3959 https://github.com/talos-systems/talos/pull/3960 https://github.com/talos-systems/talos/pull/3961 https://github.com/talos-systems/talos/pull/3962 https://github.com/talos-systems/talos/pull/3963 https://github.com/talos-systems/talos/pull/3964

And update kubelet to 1.21.3.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-19 06:06:01 -07:00
Caleb Woodbine
da6f786cab fix: kuberentes => kubernetes typo
uh uh, small typo... nothing to see here.

Signed-off-by: Caleb Woodbine <calebwoodbine.public@gmail.com>
2021-07-19 05:59:35 -07:00
Artem Chernyshev
2e463348b2 fix: pass all logs through the options.Log method
Looks like I've missed some 🤦

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-15 08:32:48 -07:00
Andrey Smirnov
4e9c5afb6d fix: make ethtool optional in link status controller
When Talos runs in a container, `ethtool` availability depends on host
kernel support, and we don't strictly need `ethtool` to make networking
work, so make it optional instead of hard failure.

Example: https://gist.github.com/rgl/392d6e16d176f28430230b06ec80496c

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-15 08:32:15 -07:00
Artem Chernyshev
bf61c2cc4a fix: write upgrade logs only to the LogOutput if it's defined
No need to print them to stdout in that case.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-15 07:02:45 -07:00
Andrey Smirnov
9c73257cb1 feat: update Go to 1.16.6
See:

* https://github.com/talos-systems/tools/pull/140
* https://github.com/talos-systems/pkgs/pull/300
* https://github.com/talos-systems/extras/pull/21

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-14 06:44:22 -07:00
Artem Chernyshev
23ef1d40af chore: add ability to redirect talos upgrade module logs to io.Writer
This is going to be useful in the third party code which is using
upgrade modules, to collect output logs instead of printing them to the
stdout.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-13 08:12:06 -07:00
dependabot[bot]
33e9d6c984 chore: bump github.com/aws/aws-sdk-go in /hack/cloud-image-uploader
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.39.0 to 1.39.4.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.39.0...v1.39.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 05:06:06 -07:00
dependabot[bot]
604434c43e chore: bump github.com/prometheus/procfs from 0.6.0 to 0.7.0
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/procfs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 04:33:39 -07:00
dependabot[bot]
2ea28f62d8 chore: bump node from 16.3.0-alpine to 16.4.2-alpine
Bumps node from 16.3.0-alpine to 16.4.2-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 03:20:49 -07:00
Andrey Smirnov
b358a189bc fix: correctly pick route scope for link-local destination
Route scope doesn't depend on destination IP type being link-local, e.g.
in Azure route to link local address is create with gateway, and that
should be global (universe) scope route.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-09 13:01:27 -07:00
Serge Logvinov
6848d43142 feat: can change clusterdns ip lists
Add change clusterdns ip list on node

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-07-09 12:33:34 -07:00
Andrey Smirnov
72b76abfd4 fix: workaround issues when IPv6 is fully or partially disabled
Fixes #3847

Fixes #3919

1. Looks like `::1/128` is assigned to `lo` interface by the kernel
without our help, and kernel does it properly whether IPv6 is enabled
for not (including particular interface).

2. If IPv6 is disabled completely with command line, we should ignore
failures to write ipv6 sysctls (as these are not security-related,
skipping them isn't a risk).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-09 12:33:22 -07:00
Alexey Palazhchenko
679b08f4fa docs: update docs for 0.12
Plus remove versions in a few places.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-09 09:39:51 -07:00
Andrey Smirnov
6fbec9e0cb fix: cache etcd client used for healthchecks
We run etcd health check every 30s, and create/destroy client every 30s.
This puts a lot of pressure on etcd itself and machined.

There's protobuf overhead, TLS connection overhead, etc.

As we don't support changing etcd PKI (yet), client created once is good
enough for the lifetime of the node.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-09 07:40:00 -07:00
Alexey Palazhchenko
eea750de2c chore: rename "join" type to "worker"
Closes #3413.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-09 07:10:45 -07:00
Andrey Smirnov
951493ac83 docs: update what's new for Talos 0.11
This is just copy-paste from our changelog.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-08 14:47:48 -07:00
Andrey Smirnov
b47d1098b1 docs: promote 0.11 docs to be the latest
Also adds AWS AMIs for 0.11.0

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-08 13:37:12 -07:00