Auto-delete backup and secret CRDs upon cluster deletion


We are settimg up XtraDB Clusters in a GitOps way through ArgoCD. Upon deletion of the YAML file that creates de Percona Cluster DB, I have been able to use the finalizers to make sure SSL secrets and PVCs are automatically delete in case the original file is deleted. In that way, the state of the cluster reflects the state of the git tree. However, upon deletion the CRDs of associated backups as well as the main cluster secret object remain in place and become orphan resources in ArgoCD. Is there a way to configure cluster deletion such that these resources are also deleted upon cluster deletion?

Hi @gmautner,

About the secret: We have the following bug, which we will fix in the next PXC release. As a workaround, you can specify the custom name for the secret, and secrets will be deleted.

I agree with you that we do not have a finalizer for backups, and if you want to delete the backups, you need to filter all needed backups and then remove or use kubectl delete pxc-backup --all command.
Could you please create the task about adding a finalizer in K8SPXC project? We will include it in one of the next releases.