xanderdunn / kube-state-rs

A stateless Kubernetes service in Rust to preserve node state between removing and adding nodes in a cluster
0 stars 0 forks source link

Make Label Restore Idempotent #11

Closed xanderdunn closed 11 months ago

xanderdunn commented 11 months ago

Currently some label modifications are applied as partial updates. It would be safer to apply the entire state on any change, including the label version number, thus making label restoration idempotent.

Even with a single service node that applies the updates, there is no guarantee that at most one instance of this service is running at any given time due to network partitioning. And if the node updates are idempotent, you can just run two or more copies of the update service concurrently to achieve zero downtime.

xanderdunn commented 11 months ago

All operations performed by both the Watcher and Processor are now idempotent. ConfigMaps are fully replaced when we have updated labels to store. A Node's labels are fully replaced when we have labels to restore.