gardener / etcd-druid

An etcd operator to configure, provision, reconcile and monitor etcd clusters.
https://gardener.github.io/etcd-druid/
Apache License 2.0
77 stars 50 forks source link

[Feature] The latest snapshot info in etcd status #17

Open georgekuruvillak opened 4 years ago

georgekuruvillak commented 4 years ago

Feature (What you would like to be added): The status in etcd resource does not reflect the current snapshot [full/delta]. Update the etcd resource status to reflect the latest snapshot information.

Motivation (Why is this needed?): It would help in control plane migration to fetch the latest snapshot for update. Approach/Hint to the implement solution (optional):

georgekuruvillak commented 4 years ago

@shreyas-s-rao @swapnilgm

swapnilgm commented 4 years ago

The etcd-backup-restore, restores from latest snapshot and there is no PITR supported. So such requirements should not be there.

But it makes sense, as ab individual project - irrespective of gardener, where case of dynamic snapshot demand, i.e. when snapshot is triggered via API call on etcd-backup-restore server is valid. It makes sense to me, to druid to introduce snapshot resource, on creation of which druid will call API on etcd-backup-restore to take dynamic snapshot. Currently that call is synchronous and only returns error in case anything goes wrong. We should modify this to return the snapshot metadata. This could be preserved in snapshot resource.

shreyas-s-rao commented 4 years ago

In that case, don't we want a separate API to simply expose latest snapshot details? Or is the case that druid will have to take a snapshot in order to get the latest snapshot info?

shreyas-s-rao commented 1 year ago

Will be solved by #206 , which allows the leading backup sidecar to update its snapshot info (LastSnapshot, SnapshotType, LastRevision, Timestamp, SnapshotStatus) as part of the EtcdMember status or the EtcdMemberState spec, discussion for which is currently ongoing.