tuenti / secrets-manager

A daemon to sync Vault secrets to Kubernetes secrets
Apache License 2.0
171 stars 26 forks source link

Move last sync status success metric #57

Closed avenging closed 3 years ago

avenging commented 4 years ago

I believe within the code of the secretdefinition_controller reconcile function that the updates the the last sync status metric is in the wrong place. When secrets-manager starts and secrets have already been reconciled the last sync success for these already existing secrets never gets set. They will only ever be set if you change the secret in the backend from that point forward. All secretdefinitions are checked every few seconds to see if the secret need to be changed so even if it doesn't the metric should updated to say the last sync was successful.

fcgravalos commented 4 years ago

Hi @avenging ! Thanks for using secrets-manager and taking the time to look into this. I already approved the relevant PR.

cc @dannyk81