[Feature] Support some combination of Environment variables and config file
Is your feature request related to a problem? Please describe. I use Kubernetes and it'd be really nice to commit the config file and have it save as a configmap, I can't because of the scopedToken, which I don't want to commit.
Describe the solution you'd like I'd like to be able to create the scopeToken as a generic secret in Kubernetes and inject it into my deployment as an environment variable and then further consider the config file which is a mounted configmap.
So I'd like the ability to pass some (or all) values as environment variables and then fallback to config.
Describe alternatives you've considered Right now my entire config is just a secret which makes updating the config difficult
Right now my entire config is just a secret which makes updating the config difficult
As far as I know, there isn't really any different on updating secret or config. You can use stringData in secret.
I suppose using stringData would work but it would require some pre-deploy step to pull out the token from some place. It would also prevent the ability to use Kustomize (I think). Edit: using stringData also prevents simple kubectl apply -f|k . deployments.
My ideal scenario is to use a Kustomize configMapGenerator and commit the entire raw yaml config to my repo (sans token) and have Kustomize generate the config map for me and use an environment variable for the token.
@polds Ok, it sounds valid. I will try to implement it.
Issues are closed after 30 days of inactivity. It’s been at least 20 days since the last update here.
I'm not sure if this is the same issue, but I am also interested in some way to dynamically adding domains instead of using the config file.
i.e., I host a couple of services on my NAS and I just add a line like this to have traefik pick up this new service:
- "traefik.http.routers.api.rule=Host(sub.mydomain.tld)"
Which only works after I go and add the new sub.mydomain.tld to the config file of your image.
I'm not sure if this is the same issue, but I am also interested in some way to dynamically adding domains instead of using the config file.
i.e., I host a couple of services on my NAS and I just add a line like this to have traefik pick up this new service:
- "traefik.http.routers.api.rule=Host(sub.mydomain.tld)"Which only works after I go and add the new sub.mydomain.tld to the config file of your image.
Traefik can work like that because you need to give access of your Docker host to it.
If you want to update multiple DNS entries, you can use CNAME instead of A record. Use this image to update 1 A record and make the others CNAME records instead.
Cloudflare has CNAME flattening which gives the same result of multiple A records.
Traefik can work like that because you need to give access of your Docker host to it.
If you want to update multiple DNS entries, you can use CNAME instead of A record. Use this image to update 1 A record and make the others CNAME records instead.
Cloudflare has CNAME flattening which gives the same result of multiple A records.
Thanks for your reply, but I am not sure if that is an improvement. Instead of having to add each new subdomain to this image's config file I now have to visit Cloudflare and set up a CNAME record for the new subdomain. Looks like the same amount of manual steps involved if I did not misunderstand your reply.
Thanks for your reply, but I am not sure if that is an improvement. Instead of having to add each new subdomain to this image's config file I now have to visit Cloudflare and set up a CNAME record for the new subdomain. Looks like the same amount of manual steps involved if I did not misunderstand your reply.
You can combine with it with wildcard DNS entries if they are under the same domain.
Issues are closed after 30 days of inactivity. It’s been at least 20 days since the last update here.