-
Notifications
You must be signed in to change notification settings - Fork 112
Description
How to categorize this issue?
/area control-plane-migration control-plane
/area ops-productivity
/kind enhancement
What would you like to be added:
Expose HTTP REST endpoints in the etcd-backup-restore server for etcd maintenance operations defragmentation and compaction. The endpoints should support both synchronous and asynchronous execution modes.
Let's expose REST API endpoints for maintenance operations:
- Defragmentation:
/maintenance/defrag - Compaction:
/maintenance/compact
Why Sync and Async?
Defragmentation and compaction can take a long time to complete, and it is not always feasible to wait for the operation to finish before returning a response to the client. In such cases, it is better to return a response to the client as soon as the operation is started, and then allow the client to poll the server for the status of the operation.
This will be useful for Kubernetes controllers like etcdopstask to reconcile defragmentation and compaction operations by triggering and polling the status of the operation.
Why is this needed:
This is needed to support out-of-band maintenance operations beyond scheduled maintenance.
Specifically, this will be useful when the etcd database reaches the 8GB limit, allowing operators to disable alarms and trigger out-of-band compaction and defragmentation. Live Control Plane Migration (CPM) needs to be able to trigger defragmentation and compaction before migrating the etcd cluster.