8 Commits

Author SHA1 Message Date
Andrey Smirnov
96aa9638f7
chore: rename talos-systems/talos to siderolabs/talos
There's a cyclic dependency on siderolink library which imports talos
machinery back. We will fix that after we get talos pushed under a new
name.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-11-03 16:50:32 +04:00
Andrey Smirnov
0b41923c36
fix: restore the StaticPodStatus resource
It got broken with the changes to the kubelet now sourcing static pods
from a HTTP internal server.

As we don't want it to be broken, and to make health checks better, add
a new check to make sure kubelet reports control plane static pods as
running. This coupled with API server check should make it more
thorough.

Also add logging when static pod definitions are updated (they were
previously there for file-based implementation). These logs are very
helpful for troubleshooting.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-10-31 18:48:03 +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
Utku Ozdemir
284a2f9596
fix: filter static pods correctly and optimize fetching
When we query kubelet API to populate the StaticPodStatuses, instead of checking for ownerReferences to be empty, we check the annotation "kubernetes.io/config.source" value so we avoid including standalone pods (that are regular pods but not part of a replicaset).

We also optimize their fetching by avoiding to unmarshal the fields we do not need.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2022-06-27 18:50:47 +02:00
Andrey Smirnov
3aae94e530 feat: provide Kubernetes nodename as a COSI resource
This changes the way Kubernetes nodename is computed: it is set by the
controller based on the hostname and machine configuration, and pulled
from the resource when needed.

Kubelet client now also uses nodename to fix the certifcate mismatch
issue on AWS.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-18 19:58:19 +03:00
Andrey Smirnov
2261d7ed02 fix: use both self-signed and Kubernetes CA to verify Kubelet cert
Kubelet might be running either self-signed cert (by default) or API
server issued cert (signed by the CA). User might switch between the two
methods, so instead of guessing based on filesystem contents, accept
both Kubernetes CA and self-signed cert (if available).

Spotted by @aceat64

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-04-26 12:21:22 -07:00
Andrey Smirnov
41430e72d2 fix: handle case when kubelet serving certificates are issued
If kubelet is configured to issue certificates from the control plane,
`/var/lib/kubelet/pki/kubelet.crt` file is never created, and cluster CA
canv be used to verify the TLS connection.

Use k8s `RESTClient` instead of a custom client, this also results in
much more descriptive error messages if API call fails.

Fix a problem in apid on worker nodes with issued serving certificates:
`/var/lib/kubelet/pki` doesn't exist by the time `apid` starts.

First write static pods, then try to build kubelet client: for issued
serving kubelet certificates, control plane should be up first.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-02-19 13:21:26 -08:00
Andrey Smirnov
0aaf8fa968 feat: replace bootkube with Talos-managed control plane
Control plane components are running as static pods managed by the
kubelets.

Whole subsystem is managed via resources/controllers from os-runtime.

Many supporting changes/refactoring to enable new code paths.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-01-26 14:22:35 -08:00