uswitch / vault-creds

Sidecar container for requesting dynamic Vault database secrets
Apache License 2.0
84 stars 14 forks source link

Refactor #20

Closed Joseph-Irving closed 5 years ago

Joseph-Irving commented 5 years ago

I've rewritten a lot of the code to clean it up a lot, I've moved all of the vault and kube logic out to packages instead of being in main, we've got things like the renewal loop and pod status checker running in their own go routines instead of a giant go func in main. Broke up the giant vault.go to make it easier to understand.

Also added a few very basic tests, I realised a lot of the functions are quite hard to test due to them being reliant on the vault api, but I've tested some of the more basic functions to start with.