provider
provider copied to clipboard
WIP feat: allow cert-manager annotations on ingress based on environment variables PT.2
This PR allows cert-manager annotations on ingress based on environment variables.
Previously closed issue #86
i'll summarize requests here so it would be easier to follow
- we use viper as interface to parse and prevalidate configuration parameter that can be defined using:
- default values
- config file
- env variables
- flags
- don't define env variables, but flags instead, each flag will have env variable automatically by Viper (refer to it's documentation if you are eager to know how it works). for example
--home
flag will haveAKASH_HOME
env variable bound to it. - the configuration must be evaluated and validated within command handler and all subsequent instantiation must use go types corresponding to its values. think it this way: type safety is a top priority
- if value can take only two states then
bool
would be the correct type. for example instead
// sslEnable is a string type
if sslEnable != "" && sslEnable == "1" {
do
// sslEnable is a bool type
if sslEnable {
provider run would be a good place to start
i marked it as WIP until all issues are resolved. feel free to remove when done