632 Commits

Author SHA1 Message Date
Andrey Smirnov
4c3485ae3f
feat: update Kubernetes to 1.25.0-rc.0
See https://github.com/kubernetes/kubernetes/releases/tag/v1.25.0-rc.0

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-12 00:17:45 +04:00
Noel Georgi
ea6ceab245
chore: bump kernel to 5.15.60
Bump kernel to [5.15.60](https://github.com/siderolabs/pkgs/pull/547)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-12 00:34:29 +05:30
Noel Georgi
07cd0924ea
fix: recursive seccomp mounts
Since `/var/lib/kubelet` was mounted with `rbind` and `rshared`, the
seccomp profile mount from the host at `/var/lib/seccomp/profiles` when
mounted at `/var/lib/kubelet/seccomp/profiles` would create a mount back
to the host creating an extra mount everytime kubelet starts/restarts.

Fix the issue by using the same path for the seccomp profiles on both
host and kubelet.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-11 19:48:45 +05:30
Artem Chernyshev
13499fc302
feat: support patching the machine config in the apply-config cmd
Fixes: https://github.com/siderolabs/talos/issues/6045

`talosctl apply-config` now supports `--config-patch` flag that takes
machine config patches as the input.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2022-08-11 13:56:23 +03:00
Andrey Smirnov
5dd1b40020
feat: disable Kubernetes discovery backend by default
Fixes #5827

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-10 22:25:31 +04:00
Noel Georgi
b62b18a972
feat: bump k8s to v1.25.0-beta.0
Bump k8s to v1.25.0-beta.0

Update most kubernetes `master` references to `controlplane`

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-10 22:17:53 +05:30
Andrey Smirnov
98f056603e
chore: bump dependencies
go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-08 22:31:59 +04:00
Utku Ozdemir
84e712a9f1
feat: introduce Talos API access from Kubernetes
We add a new CRD, `serviceaccounts.talos.dev` (with `tsa` as short name), and its controller which allows users to get a `Secret` containing a short-lived Talosconfig in their namespaces with the roles they need. Additionally, we introduce the `talosctl inject serviceaccount` command to accept a YAML file with Kubernetes manifests and inject them with Talos service accounts so that they can be directly applied to Kubernetes afterwards. If Talos API access feature is enabled on Talos side, the injected workloads will be able to talk to Talos API.

Closes siderolabs/talos#4422.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-08-08 18:27:26 +02:00
Noel Georgi
d7be308921
chore: bump kernel to 5.15.59
Bump kernel to [5.15.59](https://github.com/siderolabs/pkgs/pull/546)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-08 19:28:34 +05:30
Andrey Smirnov
856beb21cc
feat: containerd 1.6.7, Flannel 1.19.1
See

* https://github.com/flannel-io/flannel/releases/tag/v0.19.1
* https://github.com/containerd/containerd/releases/tag/v1.6.7

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-05 19:40:32 +04:00
Andrey Smirnov
1a8f6ec8e1
fix: don't advertise Kubernetes pod networks over KubeSpan by default
This is incompatible with Calico and Cilium in default configuration, as
it's not easy to figure out exact PodCIDRs of the node.

We change the default but provide the option to revert the old behavior.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-03 22:33:59 +04:00
Andrey Smirnov
a6b010a8b4
chore: update Go to 1.19, Linux to 5.15.58
See https://go.dev/doc/go1.19

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-03 17:03:58 +04:00
Eng Zer Jun
fb058a7c92
test: use T.TempDir to create temporary test directory
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-03 16:31:55 +04:00
Andrey Smirnov
670d274c45
chore: bump dependencies
Dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-01 17:37:43 +04:00
Dmitriy Matrenichev
c3c3e14db5
chore: add gotagsrewrite tool and use it to add tags to resources
This commit adds gotagsrewrite tool, which is used to add `protobuf:"<n>"` tags to structs with //gotagsrewrite:gen comment. This will be used in conjunction with github.com/siderolabs/protoenc.

Closes #5941

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-07-29 14:51:02 +03:00
Noel Georgi
5ac4947b63
feat: enable default seccomp profile for kubelet
Enable the default seccomp profile provided by the container runtime

Fixes: #5293

Ref: https://kubernetes.io/docs/tutorials/security/seccomp/

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-07-28 21:45:49 +05:30
Noel Georgi
0326bac1f9
chore: bump kernel to 5.15.57
Bump kernel to [5.15.57](https://github.com/siderolabs/pkgs/pull/539)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-07-25 21:16:18 +05:30
Andrey Smirnov
86820c33f1
chore: bump dependencies
dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-25 18:14:49 +04:00
Utku Ozdemir
47c35dc474
feat: set stable default hostname based on machine-id
Use machine-id as the source for the default hostname (e.g. `talos-2gd-76y`) instead of DHCP-assigned IP (e.g. `talos-172-20-0-2`). This way, DHCP IP changes won't impact the hostname. Defaults to true for Talos version >=1.2.

Closes siderolabs/talos#5896.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-07-21 19:37:28 +02:00
Andrey Smirnov
065b59276c
feat: implement packet capture API
This uses the `go-packet` library with native bindings for the packet
capture (without `libpcap`). This is not the most performant way, but it
allows us to avoid CGo.

There is a problem with converting network filter expressions (like
`tcp port 3222`) into BPF instructions, it's only available in C
libraries, but there's a workaround with `tcpdump`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-19 01:23:09 +04:00
Andrey Smirnov
7c006cabc7
feat: update Kubernetes to 1.24.3
See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md#changelog-since-v1242

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-18 22:10:34 +04:00
Andrey Smirnov
551290195c
chore: bump dependencies
dependabot + go-mod-outdated

Kubernetes 1.24.3 will go as a separate PR.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-18 21:22:01 +04:00
Utku Ozdemir
a75fe7600d
feat: gen secrets from kubernetes pki dir
This PR allows the ability to generate `secrets.yaml` (`talosctl gen secrets`) using a Kubernetes PKI directory path (e.g. `/etc/kubernetes/pki`) as input. Also introduces the flag `--kubernetes-bootstrap-token` to be able to set a static Kubernetes bootstrap token to the generated `secrets.yaml` file instead of a randomly-generated one. Closes siderolabs/talos#5894.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-07-16 13:06:32 +02:00
Andrey Smirnov
ec74ab38aa
feat: update Go to 1.18.4, Linux to 5.15.54
See https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-13 12:28:17 +04:00
Andrey Smirnov
641f6a1e4e
feat: expose strategic merge config patches
The end result is that every Talos CLI accepts both JSON and strategic
patches to patch machine configuration.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-12 15:38:01 +04:00
Andrey Smirnov
551887528c
chore: bump dependencies
go-mod-outdated + dependabot

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-11 17:55:20 +04:00
Noel Georgi
c170ec0b09
chore: bump kernel to 5.15.53
Bump kernel to [5.15.53](https://github.com/siderolabs/pkgs/pull/532)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-07-08 16:45:46 +05:30
Andrey Smirnov
4f044e4664
feat: implement strategic merge machine config patching
This format is much easier to understand when compared to JSON patches,
it allows for more patch validation, and it should provide better user
experience.

This just implements the config merge, but it doesn't yet hook it up to
any CLI utility, so no user-facing docs.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-05 17:37:24 +04:00
Noel Georgi
e437445b40
chore: bump kernel to 5.15.52
Bump kernel to [5.15.52](https://github.com/siderolabs/pkgs/pull/529)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-07-04 23:54:31 +05:30
Eirik Askheim
d27a6a4ac0
feat: add vlan support to cmdline
this commits adds dracut style vlan support to allow
installing talos in networks where ports is not tagged
with a default vlan.

Signed-off-by: Eirik Askheim <eirik@x13.no>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-04 21:59:11 +04:00
Andrey Smirnov
fdca5d8a95
chore: bump dependencies
dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-04 21:22:20 +04:00
Utku Ozdemir
915de9cf9b
docs: fix bridge documentation
This PR fixes a mistake in the bridge support docs and the reference to its docs in changelog.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-07-01 11:21:46 +02:00
Noel Georgi
bdfee2b3b7
chore: bump kernel to 5.15.51
Bump kernel to [5.15.51](https://github.com/siderolabs/pkgs/pull/527)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-29 22:49:11 +05:30
Noel Georgi
923600a73c
chore: bump kernel to 5.15.50
Bump kernel to [5.15.50](https://github.com/siderolabs/pkgs/pull/524)
Also pulls in https://github.com/siderolabs/pkgs/pull/526

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-28 03:01:23 +05:30
Andrey Smirnov
6ae1e9bf2b
chore: bump dependencies
dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-27 18:15:22 +04:00
Philipp Sauter
2deff6b6e1
feat: add support for variable substitution in talos.config kernel parameter
The URL to fetch the configuration for a talos node is given by the
talos.config kernel parameter. We add support for 4 variables ${uuid},
${serial}, ${mac} and ${hostname} which substitute the device UUID,
DMI-sourced serial number, MAC address of the first network interface to
be up and the hostname respectively.

Fixes #3272

Signed-off-by: Philipp Sauter <philipp.sauter@siderolabs.com>
2022-06-24 12:38:08 +02:00
Utku Ozdemir
797596229a
feat: add support for configuring network bridges
Allows configuring bridge interfaces (similar to bonds). Closes siderolabs#5414.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-06-22 21:09:18 +02:00
Noel Georgi
d4606c33ec
chore: bump kernel to 5.15.49
Bump kernel to 5.15.49

Remove the `random.trust_cpu` kernel cmdline as it already enabled in
Kconfig

Ref:
 - https://github.com/siderolabs/pkgs/pull/520
 - https://github.com/siderolabs/pkgs/pull/522

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-22 23:03:24 +05:30
Andrey Smirnov
3c263bb446
chore: bump dependencies
dependabot + go-mod-outdated

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-20 18:43:36 +04:00
Noel Georgi
e8113527f9
chore: bump kubernetes to v1.24.2
Bump kubernetes to [v1.24.2](https://github.com/kubernetes/kubernetes/releases/tag/v1.24.2)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-17 23:23:06 +05:30
Noel Georgi
2aad3a1e49
chore: bump kernel to 5.15.48
Bump kernel to [5.15.48](https://github.com/siderolabs/pkgs/pull/518)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-17 00:34:58 +05:30
Noel Georgi
89aaaef9f5
chore: bump kernel to 5.15.47
Bump kernel to [5.15.47](https://github.com/siderolabs/pkgs/pull/514)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-15 20:07:00 +05:30
Andrey Smirnov
217fba288f
test: fix csi tests
With Pod Security, we need to allow privileged for rook-ceph.

This fix was lost when reverting day-two.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-10 23:00:47 +04:00
Andrey Smirnov
b037096202
feat: build Talos images with system extensions included
This allows to build a custom Talos image which comes with some system
extension bundled in. Sometimes we might need to have an extension in
the initial image, e.g. `vmtoolsd` for VMWare Talos image.

Syntax:

```
make image-aws \
  IMAGER_SYSTEM_EXTENSIONS="ghcr.io/siderolabs/amd-ucode:..."
```

System extensions are not supported for now for ISO images, as they
don't go through the common installer flow (#5725).

Also it might be nice to add a simple way to generate just
`initramfs.xz` with system extensions bundled in (e.g. for PXE booting).
(#5726)

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-10 00:10:22 +04:00
Noel Georgi
43def7490f
chore: bump kernel and runc
Bump kernel to [5.15.46](https://github.com/siderolabs/pkgs/pull/511)
Bump runc to [v1.1.3](https://github.com/siderolabs/pkgs/pull/513)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-09 21:08:26 +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
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
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