Comments (31)
The only reason i'm not using traefik is because the examples in https://docs.traefik.io/toml/ - especially as you go further down the page - hurt my eyes to read.
TOML doesn't strike me as a format which handles nesting very well. I'm sure it looks beautiful for non-nested files but I have to say if I have to configure 10 sites using that i'm going to want to gouge my eyes out.
from traefik.
would staert
be able to support YAML inputs?
I agree with @RX14's comment on YAML or HCL being more readable than TOML in many cases.
YAML / JSON config file options would definitely make the file backend more approachable.
from traefik.
Hi
It's in my roadmap to integrate https://github.com/spf13/viper.
from traefik.
I find the deeply-nested TOML files to be really unreadable, so YAML or HCL support with viper would be brilliant.
from traefik.
So far, environment variables are not handled by https://github.com/containous/staert. But it could be a nice improvement ... WDYT @emilevauge ?
from traefik.
I felt the same, but then I discovered that every option you can set in the toml file, you can set it by a CLI option. It's not so beautiful, but after all it lets you basically the same benefits as those you wanted from the env variables.
from traefik.
An example found digging in the docs, using flags in case anyone has trouble finding it. https://docs.traefik.io/v1.7/user-guide/cluster-docker-consul/
version: "3"
services:
traefik:
image: traefik:1.7
command:
- "--api"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entrypoints=Name:https Address::443 TLS"
- "--defaultentrypoints=http,https"
- "--acme"
- "--acme.storage=/etc/traefik/acme/acme.json"
- "--acme.entryPoint=https"
- "--acme.httpChallenge.entryPoint=http"
- "--acme.onHostRule=true"
- "--acme.onDemand=false"
- "[email protected]"
- "--docker"
- "--docker.swarmMode"
- "--docker.domain=mydomain.ca"
- "--docker.watch"
from traefik.
I was excited to find traefik as a potential replacement for the now deprecated dockercloud-haproxy, until I saw that I need to provide a config file and even worse, it's TOML. My eyes are bleeding.
from traefik.
@andyshinn cool idea yeah, it's kinda in our head to add a possibility to configure the docker image in some way 😉
from traefik.
Oh yea, Viper looks like a cool solution. Would definitely help!
from traefik.
👍
from traefik.
+1
from traefik.
+1
Does the configuration file currently inject environment variables?
Also let me know if you want help on this issue. It's something I would rather see sooner than later so willing to contribute.
from traefik.
Could you use flags instead?
from traefik.
Sure I can add flags for all config items instead of using ENV vars.
Would be glad to submit PR
from traefik.
Flags are already here in fact :)
from traefik.
For all settings found in config file? Is there a flag to disable the
config file requirement?
On Apr 2, 2016 11:56 AM, "Emile Vauge" [email protected] wrote:
Flags are already here in fact :)
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#7 (comment)
from traefik.
Flags still don't give the same advantage as environment variables in a container runtime for passing secrets and dynamic configuration
from traefik.
Right, what do you mean by dynamic configuration?
from traefik.
Anything environment specific where traefik should find itself scheduled.
Are all config items currently flags and can a config file requirement be
disabled?
On Apr 2, 2016 12:37 PM, "Emile Vauge" [email protected] wrote:
Right, what do you mean by dynamic configuration?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#7 (comment)
from traefik.
@stongo: almost everything can be set using flags.
You can just give traefik an empty traefik.toml
file and configure it using flags.
FYI, we are in the process of refactoring flags in order to simplify their maintenance.
from traefik.
Great to hear it's on the roadmap! Thanks for the advice
from traefik.
Key use cases for viper et al for me I think would be doing things like:
- Turning on and off acme per frontend
- Specifying auth redirects per frontend
- Specifying SSL key/cert files per frontend
looking at trying to do this atm, and it looks quite difficult as is. Not sure if consul/etcd stores support key/cert changes, and ACME looks like config only from what I can see - or perhaps I've just not seen the right example yet.
So keen to see this in the roadmap. Where is the roadmap, btw? 😉
from traefik.
As I understand we have switched to https://github.com/containous/staert, I think this issue could now be closed? right @emilevauge?
from traefik.
^
Environment variables are a very good way of persisting simple configuration information across a cluster.
Swarm Mode allows you to update the environment variables of existing services.
This would be a really great addition to staert
.
from traefik.
I completely and utterly agree with @RX14
In terms of usability and inviting stature to new users, I think it would be much cleaner to adopt something like which could handle yaml or easier formats (similar to the Caddyfile).
I think ideally, a lot of us in k8s land would want to use a configset which when updated, sees Traefik automatically reload configuration.
from traefik.
Agreed, having traefik loading confine directly from a k8s config map would be nice, could you open a new issue for that @InAnimaTe ?
from traefik.
from traefik.
The config file format is seriously chatty and bad, with remplating. Our plan is to use remarshaller to munge stuff together then spit out toml. :/
from traefik.
An example found digging in the docs, using flags in case anyone has trouble finding it. https://docs.traefik.io/v1.7/user-guide/cluster-docker-consul/
version: "3" services: traefik: image: traefik:1.7 command: - "--api" - "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https" - "--entrypoints=Name:https Address::443 TLS" - "--defaultentrypoints=http,https" - "--acme" - "--acme.storage=/etc/traefik/acme/acme.json" - "--acme.entryPoint=https" - "--acme.httpChallenge.entryPoint=http" - "--acme.onHostRule=true" - "--acme.onDemand=false" - "[email protected]" - "--docker" - "--docker.swarmMode" - "--docker.domain=mydomain.ca" - "--docker.watch"
What happens if I just want to replace acme.email for example and keep using the rest of the toml file?. Can I just set --acme.email and it will override the toml?
from traefik.
Closed by #4935.
from traefik.
Related Issues (20)
- customRequestHeaders always overwrite exist header value HOT 1
- traefik 3.0 does not find services on swarm with new syntax HOT 5
- AutoUpdate to V3.0.0, docker won't start, swarmModeRefreshSeconds field not found HOT 3
- Traefik v3 breaks Kubernetes Ingress Prefix Path Regex HOT 6
- v3 breaks TCP route HostSNI having multiple entries HOT 3
- Warning when ExternalName service loading is enabled HOT 2
- Prefer IPv6 option for Service Loadbalancer URL HOT 1
- Issue warning when configuration incompatible with sticky session option is provided HOT 1
- TLS is not working after v3 upgrade HOT 3
- Traefik v3.0.0 breaks video streams HOT 5
- Traefik v3.0 Let's encrypt TLS Challenge failing when behind a traefik TCP Router HOT 2
- HTTP/3 not working HOT 1
- maxResponseBodyBytes exceed doesn't change response code to 500 HOT 2
- Entrypoint redirections not working with defaultRuleSyntax=v2 in v3.0.0
- RedirectRegex broken since update to v3.0 HOT 2
- Official standalone Grafana dashboard configuration drift as of Traefik v3.0
- ContentType middleware working not as expected HOT 1
- Traefik 3.0 Failed HTTP-01 challenge for own subdomain with let's encrypt HOT 1
- Add support for edgedb protocol HOT 1
- Traefik v3 silently dropped support for multiple arguments in "Host" rule HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik.