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

VDS: properly handle the clone cache key variant during client callback execution #835

Open benashz opened 6 days ago

benashz commented 6 days ago

In the case where a VaultDynamicSecret instance specifies a Vault namespace that is different from its VaultAuth the ClientCacheKey will be of the clone variant. The cache key format is different from its parent cache key and therefore a parent and a clone cannot be compared. Since the VDS controller stores the clone variant in its state, all instances of this type were ignored during a client callback reconciliation. This would leave unreconciled VDS instances upon client token expiration or other LifetimeWatcher errors.