hashicorp / vault-secrets-operator

The Vault Secrets Operator (VSO) allows Pods to consume Vault secrets natively from Kubernetes Secrets.
https://hashicorp.com
Other
430 stars 89 forks source link

Core: ensure unneeded Vault clients are pruned from the cache #806

Open benashz opened 3 weeks ago

benashz commented 3 weeks ago

Previously, the CachingClientFactory would keep all cached Vault Clients alive even if no longer had any referring objects.

With this change the CachingClientFactory will track the number of objects that reference a specific Vault client. Any client that no longer has any references will be evicted from the cache.