The etcd backup lane has two controllers . etcdbackuppolicy schedules and prunes the snapshots of one EtcdBackupPolicy .
etcdsnapshot takes each new EtcdSnapshot once, encrypts it to your age keys and stores it in the sink .
Reconciles EtcdBackupPolicy (etcdbackuppolicy) and EtcdSnapshot (etcdsnapshot). Both with a generation predicate.Approval None. A snapshot is a read. It changes no machine. Talks to The Talos API of a healthy control plane , and the sink : an S3 bucket or the backup volume of the manager . Keys The operator holds only the public age recipients. It can write a backup, but it can never read one. Requeue At the next schedule time, or 30 seconds while the sink is not ready or a snapshot runs. Metric pk_metal_etcd_backup_last_success_timestamp_seconds for each cluster.
Controller
Kind
Relation
Why a change starts a pass
etcdbackuppolicy
EtcdBackupPolicy
For, generation or annotation
You changed the policy, or asked for a snapshot now.
etcdbackuppolicy
EtcdSnapshot
Watches, label os.platform-kit.org/etcd-backup-policy
A snapshot ended.
etcdsnapshot
EtcdSnapshot
For, generation
A new snapshot record.
The policy loop: check the sink, prune by retention, summarize, set BackedUp, schedule the next snapshot. Read the policy and the cluster 1 Ready = False ClusterNotFound Build the sink, parse recipients 2 Ready = False SinkUnavailable, SinkRefused, RecipientsInvalid Prune by retention object first, then the record 3 Summarize, set BackedUp 4 Schedule a snapshot if due one at a time 5 next pass: the next schedule time
Read the policy and its TalosCluster .
Build the sink and parse the age recipients. Set Ready.
Delete snapshots that the retention no longer keeps. Delete the stored object first. Delete the record after it. The newest verified snapshot always stays.
Write the summary, newest first. Set BackedUp. It turns False when the newest verified snapshot is older than twice the interval.
If the interval passed, the policy is not suspended and no snapshot runs, create a new EtcdSnapshot.
Read the snapshot . Act only while it is in progress.
If status.takenAt is set but the end was never recorded, the stream stopped halfway. Delete the partial object and fail the snapshot. The next schedule tries again.
Pick a healthy etcd member . Prefer a follower, so that the leader is not slowed. Wait up to 10 minutes.
Record the start. Stream the snapshot through age encryption into the sink . The limit is 30 minutes.
Read the object back and check it. Set Complete and Verified.
No backup on its own disk A pvc sink is refused for the cluster that the operator runs on. That volume lives on the etcd that it backs up. Use an S3 sink for that cluster. One stream for each policy A slow sink does not pile up streams from the same etcd. Failures stay The lane keeps the last 3 failed snapshots for a person to read.
Object or field
When
Field manager
EtcdSnapshot objects (create, delete)
Schedule and retention
manager
Stored snapshot objects in the sink
Each snapshot
the manager process
Policy status : Ready, BackedUp, summary, lastScheduleTime
When it changed
manager (status update)
Snapshot status: Complete, Verified, takenAt, location
When it changed
manager (status update)
Object
Condition
Reasons
Policy
Ready
SinkReady, SinkUnavailable, SinkRefused, RecipientsInvalid, ClusterNotFound
Policy
BackedUp
SnapshotRecent, NoSnapshot, BackupTooOld
Snapshot
Complete
Taking, Stored, SnapshotFailed
Snapshot
Verified
Intact, Damaged, ReadBackFailed
API group Resources Verbs Scope os.platform-kit.orgetcdbackuppoliciesget list watch cluster os.platform-kit.orgetcdbackuppolicies/statusupdate cluster os.platform-kit.orgetcdsnapshotsget list watch create delete cluster os.platform-kit.orgetcdsnapshots/statusupdate cluster os.platform-kit.orgtalosclusterstalosnodesget list watch cluster coresecretsget list watch namespace pk-metal