kubernetes-sigs / secrets-store-sync-controller

This is a Kubernetes controller that watches for changes to a custom resource and syncs the secrets from external secrets-store as Kubernetes secret.
Apache License 2.0
11 stars 5 forks source link

Incorrectly updating the status condition for VAP denials #54

Open AlexanderStocks opened 3 weeks ago

AlexanderStocks commented 3 weeks ago

What steps did you take and what happened: VSCode detected an unused write to field Message in secretsync_controller.go on line 277 failedCondition.Message = err.Error(). We are incorrectly updating the status condition, the error is lost.

What did you expect to happen: I would expect the error to be passed to the updateStatusConditions and set the condition.Reason there accordingly.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Which provider are you using: [e.g. Azure Key Vault, HashiCorp Vault, etc. Have you checked out the provider's repo for more help?]

Environment:

AlexanderStocks commented 3 weeks ago

I am happy to pick this up, let me know.

nilekhc commented 3 weeks ago

Thanks for reporting it @AlexanderStocks. I think it would be a good idea to check the Status Condition logic as a whole to make sure there are not any gaps. I have opened uber level issue for it.

nilekhc commented 2 weeks ago

/assign