Open
Description
Describe the bug
When the kubernetes secret associated with a VaultDynamicSecret is deleted, the VSO requests a new lease and recreates the secret with the newly leased credentials. But the VSO does not revoke the previous lease before doing so, resulting in orphaned leases. Since the kubernetes secret is the only place that these credentials are used, it is effectively a proxy for the lease - and deleting it should revoke the lease. Or at a minimum, there should be an option to revoke the lease on secret deletion.
To Reproduce
Steps to reproduce the behavior:
- Deploy a VaultDynamicSecret
- Delete the associated kubernetes secret
- A new lease will be obtained and a new kubernetes secret will be created
- The previous lease will remain in place