provider icon indicating copy to clipboard operation
provider copied to clipboard

WIP feat: allow cert-manager annotations on ingress based on environment variables PT.2

Open cloud-j-luna opened this issue 1 year ago • 3 comments

This PR allows cert-manager annotations on ingress based on environment variables.

cloud-j-luna avatar Apr 18 '23 19:04 cloud-j-luna

Previously closed issue #86

cloud-j-luna avatar Apr 18 '23 19:04 cloud-j-luna

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 have AKASH_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

troian avatar Apr 18 '23 23:04 troian

i marked it as WIP until all issues are resolved. feel free to remove when done

troian avatar Apr 20 '23 13:04 troian