Controller · manager
TalosCluster controller
The TalosCluster controller brings a TalosCluster from "nodes booted" to "bootstrapped, healthy, kubeconfig available". It bootstraps etcd once, and it publishes the admin kubeconfig and talosconfig as Secrets.
At a glance
Section titled “At a glance”- Reconciles
- TalosCluster (
For, spec or annotation changes only). Controller nametaloscluster. - Writes
- Secrets
<cluster>-kubeconfig,<cluster>-talosconfigand, on request,<cluster>-talosconfig-reader. The cluster status. - Talks to
- The Talos API of the control planes, and the Kubernetes API of the cluster.
- Requeue
- 10 seconds until the cluster is Available, then 2 minutes.
- Credential TTL
spec.credentials.ttl, default 24 hours. New credentials when a third of the life is left.
Watches
Section titled “Watches”| Kind | Relation | Why a change starts a pass |
|---|---|---|
| TalosCluster | For, with a generation or annotation predicate |
You changed the spec or asked for something with an annotation. Its own status writes do not start a pass. |
| Secret | Owns, and Watches the secrets bundle |
A credential Secret or the bundle changed. |
| TalosNode | Watches |
A member became ready, joined or left. |
| TalosRollout | Watches |
A rollout of the cluster moved. |
| Host | Watches, the cluster of the node in spec.os |
A machine got or lost a node. The counts change. |
Reconcile loop
Section titled “Reconcile loop”- Read the cluster.
- Count the members. A member is a node that a Host runs and that is not being removed. Other nodes count as unassigned.
- Guard the secrets bundle. After the bootstrap, a changed bundle is held and the copy that the machines run stays in use.
- Load the bundle. If it is missing, the conditions are Unknown with
SecretsUnavailable. - Publish the admin credentials. Make new ones only when the CA, the endpoints or the TTL changed, or when the expiry is near.
- Ask the Kubernetes API for its version.
- Bootstrap etcd through the first control plane that answers. Do this once only.
- Set
Available.
Guards and decisions
Section titled “Guards and decisions”- Bootstrap once
- The controller records
status.bootstrappedAtthe first time it sees the cluster bootstrapped. Later, if all members lose etcd, it reads this as a loss and never bootstraps again. Recovery is an approved EtcdRecover operation. - Restore pending
- The annotation
os.platform-kit.org/restore-pendingalso stops a bootstrap. See Etcd backup controllers. - Secrets bundle hold
- A new bundle on a running cluster would make every control plane look down. The controller keeps the applied copy, and
SecretsBundleHeldis True until a person puts the bundle back or deletes the copy. - Short credentials
- A certificate that the cluster CA signed cannot be revoked. The short TTL limits a leaked copy. If you shorten the TTL, the controller makes new credentials at once.
Writes
Section titled “Writes”| Object or field | When | Field manager |
|---|---|---|
| Credential Secrets, owned by the cluster | New or near expiry | manager (create or update) |
| Applied bundle copy | First time after bootstrap | manager |
Cluster status: counts, versions, bootstrappedAt, credentialsExpireAt, conditions |
When it changed | manager (status update) |
Conditions
Section titled “Conditions”| Condition | Reasons |
|---|---|
Bootstrapped |
True when etcd runs. Unknown: BootstrapRequested, SecretsUnavailable. False: the reason of the bootstrap check. |
Available |
True: ClusterAvailable. False: NotBootstrapped, KubernetesUnreachable, NodesNotReady. |
SecretsBundleHeld |
True while a changed bundle is held. |
Failure modes
Section titled “Failure modes”| You see | Cause | Do this |
|---|---|---|
Available=False, NodesNotReady |
A member is not Ready. | Use Node not ready. |
Bootstrapped=False after it was True |
Etcd lost its data. | Use etcd unhealthy or quorum lost. |
SecretsBundleHeld=True |
The bundle changed after bootstrap. | Put the bundle back. |
Permissions
Section titled “Permissions”| API group | Resources | Verbs | Scope |
|---|---|---|---|
os.platform-kit.org | talosclusters | getlistwatch | cluster |
os.platform-kit.org | talosclusters/status | update | cluster |
os.platform-kit.org | talosclusters/finalizers | update | cluster |
os.platform-kit.org | talosnodes | getlistwatch | cluster |
metal.platform-kit.org | hosts | getlistwatch | cluster |
core | secrets | getlistwatchcreateupdate | namespace pk-metal |