feat: Added labels to easily find secrets what created for cluster
What this PR does:
Right now cass-operator create 3 secret per cluster
- ${nameCluster}-superuser
- ${Datacenter.Name}-keystore
- ${Datacenter.Name}-ca-keystore
and only one ${nameCluster}-superuser has base labels and so, I can't find all the secrets created for a cluster with a command like kubectl get secret -l 'k8ssandra.io/cluster-name=my-cluster'. My cases - I want to delete all secrets after deleting a cluster (right now I generate a name but using a label would be easy)
Which issue(s) this PR fixes:
Fixes #
Checklist
- [ ] Changes manually tested
- [ ] Automated Tests added/updated
- [ ] Documentation added/updated
- [x] CHANGELOG.md updated (not required for documentation PRs)
- [x] CLA Signed: DataStax CLA
Hi, thanks for the PR. Some other things that could be nice would be adding a test in secrets_test.go to verify the labels are there. And of course, we could autodelete them by setting a controller reference to all generated secrets so that deletion of CassandraDatacenter deletes the secrets also without manual process.
Hi @Tom910,
do you still plan to work on this PR?
Thanks
Closing this in favor of https://github.com/k8ssandra/cass-operator/pull/608