40 Commits

Author SHA1 Message Date
Noel Georgi
1c43c72aeb
docs: fix talos required kernel params
Fix Talos required kernel parameters. `talos.config` is optional.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-09-29 01:53:55 +05:30
Andrey Smirnov
a798dbd5d2
docs: update docs for upcoming 1.2.0 release
Update what's new, upgrading docs.

Fix up instances of `master` leftover in the docs.

Fix the formatting of kernel params reference.

Fixes #6150

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-31 21:54:45 +04:00
Utku Ozdemir
0b339a9dc5
feat: track progress of action API calls
Track the progress of the long-running actions `reboot`, `reset`, `upgrade` and `shutdown` on the client side by default, unless `--no-wait=true` is specified.

Use the events API to follow the events using the actor ID of the action and display it using an stderr reporter with a spinner.

Closes siderolabs/talos#5499.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-08-29 22:54:40 +02:00
Noel Georgi
b500d0aa90
chore: bump k8s to v1.25.0
Bump k8s to
[v1.25.0](https://github.com/kubernetes/kubernetes/releases/tag/v1.25.0)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-24 18:58:44 +05:30
Andrey Smirnov
2f2d97b6b5
fix: don't wait for the hostname in maintenance mode
Fixes #6119

With new stable default hostname feature, any default hostname is
disabled until the machine config is available.

Talos enters maintenance mode when the default config source is empty,
so it doesn't have any machine config available at the moment
maintenance service is started.

Hostname might be set via different sources, e.g. kernel args or via
DHCP before the machine config is available, but if all these sources
are not available, hostname won't be set at all.

This stops waiting for the hostname, and skips setting any DNS names in
the maintenance mode certificate SANs if the hostname is not available.

Also adds a regression test via new `--disable-dhcp-hostname` flag to
`talosctl cluster create`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-23 17:52:20 +04:00
Noel Georgi
faf92ce016
chore: bump kubernetes to v1.25.0-rc.1
Bump kubernetes to v1.25.0-rc.1

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-19 00:21:23 +05:30
Philipp Sauter
f37da96ef3
feat: enable talos client to connect to Talos through an auth proxy
Talos client can connect to Talos API via a proxy with basic auth.
Additionally it is now optional to specify a TLS CA,key or crt. Optionally
Developers can build talosctl with WITH_DEBUG=1 to allow insecure
connections when http:// endpoints are specified.

Fixes #5980

Signed-off-by: Philipp Sauter <philipp.sauter@siderolabs.com>
2022-08-15 18:05:26 +02:00
Utku Ozdemir
586e29dfca
feat: add event actor id to client api and events cmd
Add the missing actor id on the event and a way to filter by it to the events cli command.

Related to siderolabs/talos#5499.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-08-12 22:01:34 +02:00
Dmitriy Matrenichev
e422ea63d0
chore: add proto definitions for common types
This commit adds proto definitions for this types;
- *url.URL
- netaddr.IP
- netaddr.IPPort
- netaddr.IPPrefix
- *x509.PEMEncodedKey
- *x509.PEMEncodedCertificateAndKey

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-08-12 15:38:31 +03:00
Andrey Smirnov
dce923f747
feat: allow configuring etcd listen addresses
This introduces new configuration settings to configure
advertised/listen subnets. For backwards compatibility when using no
settings or old 'subnet' argument, etcd still listens on all addresses.

If new `advertisedSubnets` is being used, this automatically limits etcd
listen addresses to the same value. `listenSubnets` can be configured
also explicitly e.g. to listen on additional addresses for some other
scenarios (e.g. accessing etcd from outside of the cluster).

See #5668

One more thing left (for a separate PR) is to update etcd advertised
URLs on the fly.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-12 14:57:54 +04:00
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
Utku Ozdemir
b5da686a7b
feat: add actor ID to events & emit an initial empty event
Add a new field `actorID` to the events and populate it with a UUID for the lifecycle actions `reboot`, `reset`, `upgrade` and `shutdown`. This actor ID will be present on all events emitted by this triggered action. We can use this ID later on the client side to be able to track triggered actions.

We also emit an event with an empty payload on the events streaming GRPC endpoint when a client connects. The purpose of this event is to signal to the client that the event streaming has actually started.

Server-side part of siderolabs/talos#5499.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-08-11 15:14:11 +02:00
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
be351dcb99
release(v1.2.0-alpha.2): prepare release
This is the official v1.2.0-alpha.2 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-10 23:03:53 +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
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
e97b9f6d3e
feat: support dhcp options for vlan
Add `DHCPOptions` for VLAN device.

Fixes: #6011

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-05 01:41:46 +05:30
Noel Georgi
80d298abfb
feat: support skipping node registration
This PR supports skipping node registration from K8s.

This is an adavnced use case and only needs to be used in special cases.
In this mode Kubelet only runs the static pods.

Fixes: #5847

Operations that will be broken:

- `talosctl cluster create` would eventually timeout since it expects
  nodes to be registered.
- `talosctl health` since it expects nodes to be registered.
- `talosctl upgrade-k8s` since it expects nodes to be registered. Static
  pods can still be updated by editing the machine config..

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-08-04 23:09:47 +05:30
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
fe2ee3b100
feat: implement MachineStatus resource
Fixes #5789

Example:

```yaml
spec:
    stage: running
    status:
        ready: false
        unmetConditions:
            - name: staticPods
              reason: kube-system/kube-controller-manager-talos-default-master-1 not ready, kube-system/kube-scheduler-talos-default-master-1 not ready
```

As events (CLI doesn't show full contents):

```
172.20.0.2   cbhf2l6f9lrs738hehfg   talos/runtime/machine.MachineStatusEvent   BOOTING   ready: false, unmet conditions: [time network services]
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-01 18:36:10 +04:00
Tommy Botten Jensen
08d2612e07
docs: bond devices are comma separated
Update kernel arguments bond doc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-29 20:51:35 +04:00
Andrey Smirnov
1db097f509
release(v1.2.0-alpha.1): prepare release
This is the official v1.2.0-alpha.1 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-28 21:43:44 +04: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
Artem Chernyshev
ae1bec59e9
feat: allow running only one sequence at a time
Fix `Talos` sequencer to run only a single sequence at the same time.
Sequences priority was updated. To match the table:

| what is running (columns) what is requested (rows) | boot | reboot | reset | upgrade |
|----------------------------------------------------|------|--------|-------|---------|
| reboot                                             | Y    | Y      | Y     | N       |
| reset                                              | Y    | N      | N     | N       |
| upgrade                                            | Y    | N      | N     | N       |

With a small addition that `WithTakeover` is still there.
If set, priority is ignored.

This is mainly used for `Shutdown` sequence invokation.
And if doing apply config with reboot enabled.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2022-07-27 17:21:36 +03:00
Andrey Smirnov
3addea83b9
feat: introduce support for Talos API access from Kubernetes
This is a first step: providing a service to access Talos API.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-26 00:02:19 +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
Noel Georgi
d650afb6cd
chore: fix typo in powercycle
Fix typo in `powercycle`

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-07-20 21:33:17 +05:30
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
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
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
Utku Ozdemir
d924901b79
feat: add cli subcommand to generate secrets
Adds a new command `talosctl gen secrets` to generate a `secrets.yaml` file with Talos and Kubenetes secrets. This file can later be used like `talosctl gen config ... --with-secrets secrets` to generate a config with these pre-generated secrets. Closes siderolabs/talos#5861.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-07-06 20:00:35 +02:00
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
86a0a7bdf7
refactor: use pointer types more in machine config structs
There should be no functional change with this PR.

The primary driver is supporting strategic merge configuration patches.
For such type of patches machine config should be loaded from incomplete
fragments, so it becomes critically important to distinguish between a
field having zero value vs. field being set in YAML.

E.g. with following struct:

```go
struct { AEnabled *bool `yaml:"a"` }
```

It's possible to distinguish between:

```yaml
a: false
```

and no metion of `a` in YAML.

Merging process trewats zero values as "not set" (skips them when
merging), so it's important to allow overriding value to explicit
`false`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-07-01 17:27:11 +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
Andrey Smirnov
022581d809
release(v1.2.0-alpha.0): prepare release
This is the official v1.2.0-alpha.0 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-30 19:01:07 +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
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
Andrey Smirnov
90bf34fed9
docs: fork docs for Talos 1.2
Now master generates docs for the future v1.2.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-06-10 22:21:39 +04:00