hetznercloud / csi-driver

Kubernetes Container Storage Interface driver for Hetzner Cloud Volumes
MIT License
646 stars 103 forks source link

Feature Request: enable protection #417

Open ContainerCat opened 1 year ago

ContainerCat commented 1 year ago

I am working with backup volumes in an automated environment. These volumes should never be deleted and I do not really want to "enable protection" manually every time. Is it possible to implement this?

github-actions[bot] commented 1 year ago

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

erikschul commented 1 year ago

Not stale

lukasmetzner commented 2 weeks ago

Hi,

sorry for the long pause in communication. I wanted to ask, at which level do you expect the protection to happen? Should it prevent deletion in the Hetzner Cloud Console or in Kubernetes?

In case you want to protect your volumes against deletion in Kubernetes you can opt for:

To safeguard your volumes from deletion via the Cloud Console or Hetzner API, we could introduce a new parameter to the storage class. This parameter would ensure that the volume is created and directly afterwards protected. When a deletion is initiated in Kubernetes, we would simply disable the protection and proceed with deleting the volume. In future releases we could opt for VolumeAttributeClasses. They were introduced in Kubernetes v.1.31 as a beta feature.

Best Regards Lukas