Giter Club home page Giter Club logo

Comments (31)

RX14 avatar RX14 commented on May 12, 2024 7

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.

stealthybox avatar stealthybox commented on May 12, 2024 4

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.

emilevauge avatar emilevauge commented on May 12, 2024 3

Hi
It's in my roadmap to integrate https://github.com/spf13/viper.

from traefik.

RX14 avatar RX14 commented on May 12, 2024 3

I find the deeply-nested TOML files to be really unreadable, so YAML or HCL support with viper would be brilliant.

from traefik.

cocap10 avatar cocap10 commented on May 12, 2024 3

So far, environment variables are not handled by https://github.com/containous/staert. But it could be a nice improvement ... WDYT @emilevauge ?

from traefik.

yajo avatar yajo commented on May 12, 2024 3

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.

ashtonian avatar ashtonian commented on May 12, 2024 3

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.

mrmachine avatar mrmachine commented on May 12, 2024 1

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.

vdemeester avatar vdemeester commented on May 12, 2024

@andyshinn cool idea yeah, it's kinda in our head to add a possibility to configure the docker image in some way 😉

from traefik.

andyshinn avatar andyshinn commented on May 12, 2024

Oh yea, Viper looks like a cool solution. Would definitely help!

from traefik.

flrngel avatar flrngel commented on May 12, 2024

👍

from traefik.

BrianAdams avatar BrianAdams commented on May 12, 2024

+1

from traefik.

stongo avatar stongo commented on May 12, 2024

+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.

emilevauge avatar emilevauge commented on May 12, 2024

Could you use flags instead?

from traefik.

stongo avatar stongo commented on May 12, 2024

Sure I can add flags for all config items instead of using ENV vars.
Would be glad to submit PR

from traefik.

emilevauge avatar emilevauge commented on May 12, 2024

Flags are already here in fact :)

from traefik.

stongo avatar stongo commented on May 12, 2024

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.

stongo avatar stongo commented on May 12, 2024

Flags still don't give the same advantage as environment variables in a container runtime for passing secrets and dynamic configuration

from traefik.

emilevauge avatar emilevauge commented on May 12, 2024

Right, what do you mean by dynamic configuration?

from traefik.

stongo avatar stongo commented on May 12, 2024

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.

emilevauge avatar emilevauge commented on May 12, 2024

@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.

stongo avatar stongo commented on May 12, 2024

Great to hear it's on the roadmap! Thanks for the advice

from traefik.

gjonespf avatar gjonespf commented on May 12, 2024

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.

errm avatar errm commented on May 12, 2024

As I understand we have switched to https://github.com/containous/staert, I think this issue could now be closed? right @emilevauge?

from traefik.

stealthybox avatar stealthybox commented on May 12, 2024

^
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.

InAnimaTe avatar InAnimaTe commented on May 12, 2024

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.

errm avatar errm commented on May 12, 2024

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.

InAnimaTe avatar InAnimaTe commented on May 12, 2024

@errm done. #1188

from traefik.

DanielJoyce avatar DanielJoyce commented on May 12, 2024

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.

dantebarba avatar dantebarba commented on May 12, 2024

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.

traefiker avatar traefiker commented on May 12, 2024

Closed by #4935.

from traefik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.