mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-15 10:51:12 +02:00
The gist is that `kubelet` service code only manages the container lifecycle, while `kubelet` configuration is managed now in the controllers and resources. New resources: * `secrets.Kubelet` contains Kubelet PKI derived directly from the machine configuration * `k8s.KubeletConfig` contains Kubelet non-secret config derived directly from the machine configuration * `k8s.NodeIPConfig` contains configuration on picking up Node IP for the kubelet (from machine configuration) * `k8s.NodeIP` contains actual Node IPs picked from the node addresses based on `NodeIPConfig` * `k8s.KubeletSpec` contains final `kubelet` container configuration, including merged arguments, KubeletConfig, etc. It is derived from `KubeletConfig`, `Nodename` and `NodeIP`. Final controller `KubeletServiceController` writes down configuration and PKI to disk, and manages restart/start of the `kubelet` service which is a pure wrapper around container lifecycle. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
21 lines
911 B
Go
21 lines
911 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
// Package k8s provides resources which interface with Kubernetes.
|
|
package k8s
|
|
|
|
import "github.com/cosi-project/runtime/pkg/resource"
|
|
|
|
// NamespaceName contains resources supporting Kubernetes components on all node types.
|
|
const NamespaceName resource.Namespace = "k8s"
|
|
|
|
// ControlPlaneNamespaceName contains resources supporting Kubernetes control plane.
|
|
const ControlPlaneNamespaceName resource.Namespace = "controlplane"
|
|
|
|
// NodeAddressFilterOnlyK8s is the ID for the node address filter which leaves only Kubernetes IPs.
|
|
const NodeAddressFilterOnlyK8s = "only-k8s"
|
|
|
|
// NodeAddressFilterNoK8s is the ID for the node address filter which removes any Kubernetes IPs.
|
|
const NodeAddressFilterNoK8s = "no-k8s"
|