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.
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.