pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.24k stars 499 forks source link

Add a protection mechanism to prevent accidental deletion of TC #4801

Open wxiaoke opened 1 year ago

wxiaoke commented 1 year ago

Feature Request

Is your feature request related to a problem? Please describe:

Due to human operation, TC was deleted by mistake

Describe the feature you'd like:

If there are some tips or a second confirmation, it will be better.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

csuzhangxc commented 1 year ago

use deletion validation webhook? like https://github.com/maniSbindra/k8s-delete-validation-webhook

wxiaoke commented 1 year ago

could we integrate the function to tidb operator? I think the reference not fully meet this requirement:When delete CRD,if there are some tips or a second confirmation, it will be better.

csuzhangxc commented 1 year ago

we need to enhance our webhook, https://docs.pingcap.com/tidb-in-kubernetes/stable/enable-admission-webhook