You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although I am not a big fan of configuration via environment variables, I don't necessary say it's a bad idea. IMHO the above is proposing a bit custom syntax with env:VAR_NAME which requires custom maintenance. I have seen (but don't recall names) in other projects to use the following pattern. First try if --rbac.config is set as a flag then lookup if SOME_PREFIX_RBAC_CONFIG is given, if both not given then it is not set. I am not sure if our current go flagset library supports this, but I believe this would work for both modes.
I seem to remember seeing something like this on the library viper. OTEL uses koanf instead. Seems they faced some issues in the past using viper. It would be a nice to have, but my intention was not to move larger blocks.
What I had in mind was something simple like this snippet.
Currently only file paths to the configs can be specified:
While there is nothing wrong with it, i think ability to provide these configurations via environment variables would simplify the usage.
Like this:
wdyt?
The text was updated successfully, but these errors were encountered: