Deprecate defaultRuleSyntax and ruleSyntax options
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
50b0d772e5
commit
bb7ef7b48a
48 changed files with 333 additions and 194 deletions
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"service": "api@internal",
|
||||
"rule": "PathPrefix(`/api`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775806
|
||||
},
|
||||
"dashboard": {
|
||||
|
@ -20,7 +20,7 @@
|
|||
],
|
||||
"service": "dashboard@internal",
|
||||
"rule": "PathPrefix(`/`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775805
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"service": "api@internal",
|
||||
"rule": "PathPrefix(`/api`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775806
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"service": "api@internal",
|
||||
"rule": "PathPrefix(`/api`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775806
|
||||
},
|
||||
"dashboard": {
|
||||
|
@ -20,7 +20,7 @@
|
|||
],
|
||||
"service": "dashboard@internal",
|
||||
"rule": "PathPrefix(`/`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775805
|
||||
},
|
||||
"debug": {
|
||||
|
@ -29,7 +29,7 @@
|
|||
],
|
||||
"service": "api@internal",
|
||||
"rule": "PathPrefix(`/debug`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775806
|
||||
},
|
||||
"ping": {
|
||||
|
@ -38,7 +38,7 @@
|
|||
],
|
||||
"service": "ping@internal",
|
||||
"rule": "PathPrefix(`/ping`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775807
|
||||
},
|
||||
"prometheus": {
|
||||
|
@ -47,7 +47,7 @@
|
|||
],
|
||||
"service": "prometheus@internal",
|
||||
"rule": "PathPrefix(`/metrics`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775807
|
||||
},
|
||||
"rest": {
|
||||
|
@ -56,7 +56,7 @@
|
|||
],
|
||||
"service": "rest@internal",
|
||||
"rule": "PathPrefix(`/api/providers`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775807
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"service": "ping@internal",
|
||||
"rule": "PathPrefix(`/ping`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775807
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"service": "prometheus@internal",
|
||||
"rule": "PathPrefix(`/metrics`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775807
|
||||
}
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"service": "noop@internal",
|
||||
"rule": "HostRegexp(`^.+$`)",
|
||||
"ruleSyntax": "v3"
|
||||
"ruleSyntax": "default"
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"service": "noop@internal",
|
||||
"rule": "HostRegexp(`^.+$`)",
|
||||
"ruleSyntax": "v3"
|
||||
"ruleSyntax": "default"
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"service": "noop@internal",
|
||||
"rule": "HostRegexp(`^.+$`)",
|
||||
"ruleSyntax": "v3"
|
||||
"ruleSyntax": "default"
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"service": "rest@internal",
|
||||
"rule": "PathPrefix(`/api/providers`)",
|
||||
"ruleSyntax": "v3",
|
||||
"ruleSyntax": "default",
|
||||
"priority": 9223372036854775807
|
||||
}
|
||||
},
|
||||
|
|
|
@ -117,8 +117,9 @@ func (i *Provider) acme(cfg *dynamic.Configuration) {
|
|||
|
||||
if len(eps) > 0 {
|
||||
rt := &dynamic.Router{
|
||||
Rule: "PathPrefix(`/.well-known/acme-challenge/`)",
|
||||
RuleSyntax: "v3",
|
||||
Rule: "PathPrefix(`/.well-known/acme-challenge/`)",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
EntryPoints: eps,
|
||||
Service: "acme-http@internal",
|
||||
Priority: math.MaxInt,
|
||||
|
@ -164,8 +165,9 @@ func (i *Provider) redirection(ctx context.Context, cfg *dynamic.Configuration)
|
|||
mdName := "redirect-" + rtName
|
||||
|
||||
rt := &dynamic.Router{
|
||||
Rule: "HostRegexp(`^.+$`)",
|
||||
RuleSyntax: "v3",
|
||||
Rule: "HostRegexp(`^.+$`)",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
EntryPoints: []string{name},
|
||||
Middlewares: []string{mdName},
|
||||
Service: "noop@internal",
|
||||
|
@ -269,7 +271,8 @@ func (i *Provider) apiConfiguration(cfg *dynamic.Configuration) {
|
|||
Service: "api@internal",
|
||||
Priority: math.MaxInt - 1,
|
||||
Rule: "PathPrefix(`/api`)",
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
}
|
||||
|
||||
if i.staticCfg.API.Dashboard {
|
||||
|
@ -278,7 +281,8 @@ func (i *Provider) apiConfiguration(cfg *dynamic.Configuration) {
|
|||
Service: "dashboard@internal",
|
||||
Priority: math.MaxInt - 2,
|
||||
Rule: "PathPrefix(`/`)",
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{"dashboard_redirect@internal", "dashboard_stripprefix@internal"},
|
||||
}
|
||||
|
||||
|
@ -300,7 +304,8 @@ func (i *Provider) apiConfiguration(cfg *dynamic.Configuration) {
|
|||
Service: "api@internal",
|
||||
Priority: math.MaxInt - 1,
|
||||
Rule: "PathPrefix(`/debug`)",
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -323,7 +328,8 @@ func (i *Provider) pingConfiguration(cfg *dynamic.Configuration) {
|
|||
Service: "ping@internal",
|
||||
Priority: math.MaxInt,
|
||||
Rule: "PathPrefix(`/ping`)",
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,7 +347,8 @@ func (i *Provider) restConfiguration(cfg *dynamic.Configuration) {
|
|||
Service: "rest@internal",
|
||||
Priority: math.MaxInt,
|
||||
Rule: "PathPrefix(`/api/providers`)",
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -359,7 +366,8 @@ func (i *Provider) prometheusConfiguration(cfg *dynamic.Configuration) {
|
|||
Service: "prometheus@internal",
|
||||
Priority: math.MaxInt,
|
||||
Rule: "PathPrefix(`/metrics`)",
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue