Restrict traefik.toml to static configuration.
This commit is contained in:
parent
f49800e56a
commit
093658836e
78 changed files with 274 additions and 440 deletions
|
@ -52,7 +52,6 @@
|
|||
watch = true
|
||||
filename = "foobar"
|
||||
debugLogGeneratedTemplate = true
|
||||
traefikFile = "foobar"
|
||||
[providers.marathon]
|
||||
constraints = "foobar"
|
||||
trace = true
|
||||
|
|
|
@ -192,7 +192,6 @@ func Test_decodeFileToNode_Toml(t *testing.T) {
|
|||
{Name: "debugLogGeneratedTemplate", Value: "true"},
|
||||
{Name: "directory", Value: "foobar"},
|
||||
{Name: "filename", Value: "foobar"},
|
||||
{Name: "traefikFile", Value: "foobar"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "kubernetesCRD",
|
||||
Children: []*parser.Node{
|
||||
|
@ -435,7 +434,6 @@ func Test_decodeFileToNode_Yaml(t *testing.T) {
|
|||
{Name: "debugLogGeneratedTemplate", Value: "true"},
|
||||
{Name: "directory", Value: "foobar"},
|
||||
{Name: "filename", Value: "foobar"},
|
||||
{Name: "traefikFile", Value: "foobar"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "kubernetesCRD",
|
||||
Children: []*parser.Node{
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
watch = true
|
||||
filename = "foobar"
|
||||
debugLogGeneratedTemplate = true
|
||||
traefikFile = "foobar"
|
||||
[providers.marathon]
|
||||
constraints = "foobar"
|
||||
trace = true
|
||||
|
|
|
@ -55,7 +55,6 @@ providers:
|
|||
watch: true
|
||||
filename: foobar
|
||||
debugLogGeneratedTemplate: true
|
||||
traefikFile: foobar
|
||||
marathon:
|
||||
constraints: foobar
|
||||
trace: true
|
||||
|
|
|
@ -149,7 +149,7 @@ func (t *Tracing) SetDefaults() {
|
|||
type Providers struct {
|
||||
ProvidersThrottleDuration types.Duration `description:"Backends throttle duration: minimum duration between 2 events from providers before applying a new configuration. It avoids unnecessary reloads if multiples events are sent in a short amount of time." json:"providersThrottleDuration,omitempty" toml:"providersThrottleDuration,omitempty" yaml:"providersThrottleDuration,omitempty" export:"true"`
|
||||
Docker *docker.Provider `description:"Enable Docker backend with default settings." json:"docker,omitempty" toml:"docker,omitempty" yaml:"docker,omitempty" export:"true" label:"allowEmpty"`
|
||||
File *file.Provider `description:"Enable File backend with default settings." json:"file,omitempty" toml:"file,omitempty" yaml:"file,omitempty" export:"true" label:"allowEmpty"`
|
||||
File *file.Provider `description:"Enable File backend with default settings." json:"file,omitempty" toml:"file,omitempty" yaml:"file,omitempty" export:"true"`
|
||||
Marathon *marathon.Provider `description:"Enable Marathon backend with default settings." json:"marathon,omitempty" toml:"marathon,omitempty" yaml:"marathon,omitempty" export:"true" label:"allowEmpty"`
|
||||
KubernetesIngress *ingress.Provider `description:"Enable Kubernetes backend with default settings." json:"kubernetesIngress,omitempty" toml:"kubernetesIngress,omitempty" yaml:"kubernetesIngress,omitempty" export:"true" label:"allowEmpty"`
|
||||
KubernetesCRD *crd.Provider `description:"Enable Kubernetes backend with default settings." json:"kubernetesCRD,omitempty" toml:"kubernetesCRD,omitempty" yaml:"kubernetesCRD,omitempty" export:"true" label:"allowEmpty"`
|
||||
|
@ -159,7 +159,7 @@ type Providers struct {
|
|||
|
||||
// SetEffectiveConfiguration adds missing configuration parameters derived from existing ones.
|
||||
// It also takes care of maintaining backwards compatibility.
|
||||
func (c *Configuration) SetEffectiveConfiguration(configFile string) {
|
||||
func (c *Configuration) SetEffectiveConfiguration() {
|
||||
if len(c.EntryPoints) == 0 {
|
||||
ep := &EntryPoint{Address: ":80"}
|
||||
ep.SetDefaults()
|
||||
|
@ -185,10 +185,6 @@ func (c *Configuration) SetEffectiveConfiguration(configFile string) {
|
|||
}
|
||||
}
|
||||
|
||||
if c.Providers.File != nil {
|
||||
c.Providers.File.TraefikFile = configFile
|
||||
}
|
||||
|
||||
if c.Providers.Rancher != nil {
|
||||
if c.Providers.Rancher.RefreshSeconds <= 0 {
|
||||
c.Providers.Rancher.RefreshSeconds = 15
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue