gomods / athens-charts

Helm charts for athens
https://gomods.github.io/athens-charts/
MIT License
10 stars 16 forks source link

Helm chart bring your own config.toml #23

Open drewwells opened 3 years ago

drewwells commented 3 years ago

Is your feature request related to a problem? Please describe. The config.yaml is hardcoded into the docker container. This is fine, but the helm chart needs a way to override this config file.

Describe the solution you'd like Option to mount an externally provided config file. I think most options are available as environment variable overrides, but the athens process does not log its config. It's unclear what the current settings are from the combination of config file and env variable overrides.

Describe alternatives you've considered A long list of helm values to override all settings inside the container. nginx does this https://github.com/helm/charts/tree/master/stable/nginx-ingress#configuration

Additional context

mxk commented 5 months ago

I came here to ask for the same feature. The problem with using environment variables in values.yaml is that you can't use templates with them. This is forcing me to use fixed resource names and YAML anchors. Being able to generate a custom config file with a template and have it mounted into the container would solve this problem.

DrPsychick commented 5 months ago

I gave it a shot, but would love to get your feedback before publishing. Can you give it a try?

I figured that if you want to provide a full config.toml it should be a secret, as it contains passwords. If you want to provide a basic configuration in plain text (ConfigMap), you can still provide individual passwords through ENV from a secret.

DrPsychick commented 4 months ago

@mxk or @drewwells : does my approach suit your needs? Have you had a chance to give it a try?

mxk commented 4 months ago

Thanks for looking into this! I think that would work, but in my case, I found it easier to define my own Athens deployment rather than using the chart. It simplified the config, allowed me to provide other files, and generally gave me more control over how Athens is deployed. In my use case, Athens is an internal implementation detail, so I'm probably not representative of most of the users.