gardener / etcd-backup-restore

Collection of components to backup and restore the etcd of a Kubernetes cluster.
Apache License 2.0
289 stars 100 forks source link

[Feature] Safe-guard Multi-node etcd cluster members against wrongly mounted volumes #566

Open ishan16696 opened 1 year ago

ishan16696 commented 1 year ago

Feature (What you would like to be added): Right now, I have observed that backup-restore is only writing POD Namespace in safe_guard file as shoot identifier to avoid the issue of wrong volume mount which I feel is not enough in case of multi-node etcd cluster(size>1) as if volume of one etcd cluster member can wrongly mounted to other etcd member of same etcd cluster. Right now, backup-restore won't able to recognise this case as POD_NAMESPACE of both etcd cluster member is same, so the content of safe_guard file will also be same.

Expected behavior: etcd backup-restore should not start etcd cluster member if volume of any other etcd cluster member get wrongly mounted.

Approach/Hint to the implement solution (optional): Along with POD_NAMESPACE, we can also write POD_NAME in safe_guard file.

ishan16696 commented 1 year ago

/assign