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
|
@ -179,6 +179,7 @@ func findTypedField(rType reflect.Type, node *parser.Node) (reflect.StructField,
|
|||
|
||||
// configuration holds the static configuration removed/deprecated options.
|
||||
type configuration struct {
|
||||
Core *core `json:"core,omitempty" toml:"core,omitempty" yaml:"core,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
||||
Experimental *experimental `json:"experimental,omitempty" toml:"experimental,omitempty" yaml:"experimental,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
||||
Pilot map[string]any `json:"pilot,omitempty" toml:"pilot,omitempty" yaml:"pilot,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
||||
Providers *providers `json:"providers,omitempty" toml:"providers,omitempty" yaml:"providers,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
||||
|
@ -194,13 +195,28 @@ func (c *configuration) deprecationNotice(logger zerolog.Logger) bool {
|
|||
if c.Pilot != nil {
|
||||
incompatible = true
|
||||
logger.Error().Msg("Pilot configuration has been removed in v3, please remove all Pilot-related static configuration for Traefik to start." +
|
||||
"For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v2-to-v3/#pilot")
|
||||
" For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v2-to-v3/#pilot")
|
||||
}
|
||||
|
||||
incompatibleCore := c.Core.deprecationNotice(logger)
|
||||
incompatibleExperimental := c.Experimental.deprecationNotice(logger)
|
||||
incompatibleProviders := c.Providers.deprecationNotice(logger)
|
||||
incompatibleTracing := c.Tracing.deprecationNotice(logger)
|
||||
return incompatible || incompatibleExperimental || incompatibleProviders || incompatibleTracing
|
||||
return incompatible || incompatibleCore || incompatibleExperimental || incompatibleProviders || incompatibleTracing
|
||||
}
|
||||
|
||||
type core struct {
|
||||
DefaultRuleSyntax string `json:"defaultRuleSyntax,omitempty" toml:"defaultRuleSyntax,omitempty" yaml:"defaultRuleSyntax,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
||||
}
|
||||
|
||||
func (c *core) deprecationNotice(logger zerolog.Logger) bool {
|
||||
if c != nil && c.DefaultRuleSyntax != "" {
|
||||
logger.Error().Msg("`Core.DefaultRuleSyntax` option has been deprecated in v3.4, and will be removed in the next major version." +
|
||||
" Please consider migrating all router rules to v3 syntax." +
|
||||
" For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v3/#rule-syntax")
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
type providers struct {
|
||||
|
@ -227,13 +243,13 @@ func (p *providers) deprecationNotice(logger zerolog.Logger) bool {
|
|||
if p.Marathon != nil {
|
||||
incompatible = true
|
||||
logger.Error().Msg("Marathon provider has been removed in v3, please remove all Marathon-related static configuration for Traefik to start." +
|
||||
"For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v2-to-v3/#marathon-provider")
|
||||
" For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v2-to-v3/#marathon-provider")
|
||||
}
|
||||
|
||||
if p.Rancher != nil {
|
||||
incompatible = true
|
||||
logger.Error().Msg("Rancher provider has been removed in v3, please remove all Rancher-related static configuration for Traefik to start." +
|
||||
"For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v2-to-v3/#rancher-v1-provider")
|
||||
" For more information please read the migration guide: https://doc.traefik.io/traefik/v3.3/migration/v2-to-v3/#rancher-v1-provider")
|
||||
}
|
||||
|
||||
dockerIncompatible := p.Docker.deprecationNotice(logger)
|
||||
|
|
|
@ -274,6 +274,15 @@ func TestDeprecationNotice(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Core DefaultRuleSyntax configuration is compatible",
|
||||
config: configuration{
|
||||
Core: &core{
|
||||
DefaultRuleSyntax: "foobar",
|
||||
},
|
||||
},
|
||||
wantCompatible: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
|
@ -63,10 +63,11 @@ type Service struct {
|
|||
|
||||
// Router holds the router configuration.
|
||||
type Router struct {
|
||||
EntryPoints []string `json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty" export:"true"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty" export:"true"`
|
||||
Rule string `json:"rule,omitempty" toml:"rule,omitempty" yaml:"rule,omitempty"`
|
||||
EntryPoints []string `json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty" export:"true"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty" export:"true"`
|
||||
Rule string `json:"rule,omitempty" toml:"rule,omitempty" yaml:"rule,omitempty"`
|
||||
// Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax.
|
||||
RuleSyntax string `json:"ruleSyntax,omitempty" toml:"ruleSyntax,omitempty" yaml:"ruleSyntax,omitempty" export:"true"`
|
||||
Priority int `json:"priority,omitempty" toml:"priority,omitempty,omitzero" yaml:"priority,omitempty" export:"true"`
|
||||
TLS *RouterTLSConfig `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty" kv:"allowEmpty" export:"true"`
|
||||
|
|
|
@ -60,13 +60,14 @@ func (w *TCPWRRService) SetDefaults() {
|
|||
|
||||
// TCPRouter holds the router configuration.
|
||||
type TCPRouter struct {
|
||||
EntryPoints []string `json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty" export:"true"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty" export:"true"`
|
||||
Rule string `json:"rule,omitempty" toml:"rule,omitempty" yaml:"rule,omitempty"`
|
||||
RuleSyntax string `json:"ruleSyntax,omitempty" toml:"ruleSyntax,omitempty" yaml:"ruleSyntax,omitempty" export:"true"`
|
||||
Priority int `json:"priority,omitempty" toml:"priority,omitempty,omitzero" yaml:"priority,omitempty" export:"true"`
|
||||
TLS *RouterTCPTLSConfig `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty" kv:"allowEmpty" export:"true"`
|
||||
EntryPoints []string `json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty" export:"true"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty" export:"true"`
|
||||
Rule string `json:"rule,omitempty" toml:"rule,omitempty" yaml:"rule,omitempty"`
|
||||
// Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax.
|
||||
RuleSyntax string `json:"ruleSyntax,omitempty" toml:"ruleSyntax,omitempty" yaml:"ruleSyntax,omitempty" export:"true"`
|
||||
Priority int `json:"priority,omitempty" toml:"priority,omitempty,omitzero" yaml:"priority,omitempty" export:"true"`
|
||||
TLS *RouterTCPTLSConfig `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty" kv:"allowEmpty" export:"true"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
|
|
@ -76,6 +76,7 @@ type Configuration struct {
|
|||
|
||||
Experimental *Experimental `description:"Experimental features." json:"experimental,omitempty" toml:"experimental,omitempty" yaml:"experimental,omitempty" export:"true"`
|
||||
|
||||
// Deprecated: Please do not use this field.
|
||||
Core *Core `description:"Core controls." json:"core,omitempty" toml:"core,omitempty" yaml:"core,omitempty" export:"true"`
|
||||
|
||||
Spiffe *SpiffeClientConfig `description:"SPIFFE integration configuration." json:"spiffe,omitempty" toml:"spiffe,omitempty" yaml:"spiffe,omitempty" export:"true"`
|
||||
|
@ -83,6 +84,7 @@ type Configuration struct {
|
|||
|
||||
// Core configures Traefik core behavior.
|
||||
type Core struct {
|
||||
// Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax.
|
||||
DefaultRuleSyntax string `description:"Defines the rule parser default syntax (v2 or v3)" json:"defaultRuleSyntax,omitempty" toml:"defaultRuleSyntax,omitempty" yaml:"defaultRuleSyntax,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ type Route struct {
|
|||
Priority int `json:"priority,omitempty"`
|
||||
// Syntax defines the router's rule syntax.
|
||||
// More info: https://doc.traefik.io/traefik/v3.3/routing/routers/#rulesyntax
|
||||
// Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax.
|
||||
Syntax string `json:"syntax,omitempty"`
|
||||
// Services defines the list of Service.
|
||||
// It can contain any combination of TraefikService and/or reference to a Kubernetes Service.
|
||||
|
|
|
@ -33,6 +33,7 @@ type RouteTCP struct {
|
|||
// Syntax defines the router's rule syntax.
|
||||
// More info: https://doc.traefik.io/traefik/v3.3/routing/routers/#rulesyntax_1
|
||||
// +kubebuilder:validation:Enum=v3;v2
|
||||
// Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax.
|
||||
Syntax string `json:"syntax,omitempty"`
|
||||
// Services defines the list of TCP services.
|
||||
Services []ServiceTCP `json:"services,omitempty"`
|
||||
|
|
|
@ -131,7 +131,8 @@ func (p *Provider) loadGRPCRoute(ctx context.Context, listener gatewayListener,
|
|||
rule, priority := buildGRPCMatchRule(hostnames, match)
|
||||
|
||||
router := dynamic.Router{
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
Rule: rule,
|
||||
Priority: priority,
|
||||
EntryPoints: []string{listener.EPName},
|
||||
|
|
|
@ -128,7 +128,8 @@ func (p *Provider) loadHTTPRoute(ctx context.Context, listener gatewayListener,
|
|||
for _, match := range routeRule.Matches {
|
||||
rule, priority := buildMatchRule(hostnames, match)
|
||||
router := dynamic.Router{
|
||||
RuleSyntax: "v3",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
Rule: rule,
|
||||
Priority: priority + len(route.Spec.Rules) - ri,
|
||||
EntryPoints: []string{listener.EPName},
|
||||
|
|
|
@ -251,7 +251,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -620,7 +620,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -682,7 +682,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "api@internal",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -716,7 +716,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-websecure-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -788,7 +788,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-66e726cd8903b49727ae-wrr",
|
||||
Rule: "(Host(`foo.com`) || Host(`bar.com`)) && PathPrefix(`/`)",
|
||||
Priority: 9,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -850,7 +850,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-baa117c0219e3878749f-wrr",
|
||||
Rule: "(Host(`foo.com`) || HostRegexp(`^[a-z0-9-\\.]+\\.bar\\.com$`)) && PathPrefix(`/`)",
|
||||
Priority: 11,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -912,7 +912,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-45eba2eaf40ac792e036-wrr",
|
||||
Rule: "(Host(`foo.com`) || HostRegexp(`^[a-z0-9-\\.]+\\.foo\\.com$`)) && PathPrefix(`/`)",
|
||||
Priority: 11,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -973,14 +973,14 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100009,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
},
|
||||
"httproute-default-http-app-1-gw-default-my-gateway-ep-web-1-d737b4933fa88e68ab8a": {
|
||||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && Path(`/bir`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-1-d737b4933fa88e68ab8a-wrr",
|
||||
},
|
||||
},
|
||||
|
@ -1069,7 +1069,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
},
|
||||
},
|
||||
|
@ -1158,14 +1158,14 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-http-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-default-http-app-1-gw-default-my-gateway-https-ep-websecure-0-1c0cf64bde37d9d0df06": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-https-ep-websecure-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -1252,14 +1252,14 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-default-http-app-1-gw-default-my-gateway-ep-websecure-0-1c0cf64bde37d9d0df06": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-websecure-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -1340,21 +1340,21 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && (Path(`/bar`) || PathPrefix(`/bar/`)) && Header(`my-header`,`foo`) && Header(`my-header2`,`bar`)",
|
||||
Priority: 10610,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-6cf37fa71907768d925c-wrr",
|
||||
},
|
||||
"httproute-default-http-app-1-gw-default-my-gateway-ep-web-2-d23f7039bc8036fb918c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && PathRegexp(`^/buzz/[0-9]+$`)",
|
||||
Priority: 11408,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-2-d23f7039bc8036fb918c-wrr",
|
||||
},
|
||||
"httproute-default-http-app-1-gw-default-my-gateway-ep-web-1-aaba0f24fd26e1ca2276": {
|
||||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`) && Header(`my-header`,`bar`)",
|
||||
Priority: 100109,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-1-aaba0f24fd26e1ca2276-wrr",
|
||||
},
|
||||
},
|
||||
|
@ -1436,7 +1436,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && (Path(`/foo`) || PathPrefix(`/foo/`)) && Method(`GET`)",
|
||||
Priority: 11408,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-74ad70a7cf090becdd3c-wrr",
|
||||
},
|
||||
},
|
||||
|
@ -1498,7 +1498,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Rule: "Host(`foo.com`) && (Path(`/foo`) || PathPrefix(`/foo/`)) && Query(`foo`,`bar`) && QueryRegexp(`baz`,`buz`)",
|
||||
Priority: 10428,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-bb7b03c9610e982fd627-wrr",
|
||||
},
|
||||
},
|
||||
|
@ -1561,7 +1561,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-web-0-efde1997778109a1f6eb-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/foo`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -1623,14 +1623,14 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-web-0-efde1997778109a1f6eb-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/foo`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-bar-http-app-bar-gw-default-my-gateway-ep-web-0-66f5c78d03d948e36597": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "httproute-bar-http-app-bar-gw-default-my-gateway-ep-web-0-66f5c78d03d948e36597-wrr",
|
||||
Rule: "Host(`bar.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -1719,7 +1719,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-bar-http-app-bar-gw-default-my-gateway-ep-web-0-66f5c78d03d948e36597-wrr",
|
||||
Rule: "Host(`bar.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -1781,7 +1781,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-wrr",
|
||||
Rule: "Host(`example.org`) && PathPrefix(`/`)",
|
||||
Priority: 13,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-requestheadermodifier-0"},
|
||||
},
|
||||
},
|
||||
|
@ -1852,7 +1852,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-wrr",
|
||||
Rule: "Host(`example.org`) && PathPrefix(`/`)",
|
||||
Priority: 13,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-responseheadermodifier-0"},
|
||||
},
|
||||
},
|
||||
|
@ -1923,7 +1923,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-wrr",
|
||||
Rule: "Host(`example.org`) && PathPrefix(`/`)",
|
||||
Priority: 13,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-requestredirect-0"},
|
||||
},
|
||||
},
|
||||
|
@ -1970,7 +1970,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-wrr",
|
||||
Rule: "Host(`example.org`) && PathPrefix(`/`)",
|
||||
Priority: 13,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-364ce6ec04c3d49b19c4-requestredirect-0"},
|
||||
},
|
||||
},
|
||||
|
@ -2016,7 +2016,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-7f90cf546b15efadf2f8-wrr",
|
||||
Rule: "Host(`example.com`) && (Path(`/foo`) || PathPrefix(`/foo/`))",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Priority: 10412,
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-7f90cf546b15efadf2f8-urlrewrite-0"},
|
||||
},
|
||||
|
@ -2085,7 +2085,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-7f90cf546b15efadf2f8-wrr",
|
||||
Rule: "Host(`example.com`) && (Path(`/foo`) || PathPrefix(`/foo/`))",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Priority: 10412,
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-7f90cf546b15efadf2f8-urlrewrite-0"},
|
||||
},
|
||||
|
@ -2154,7 +2154,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"web"},
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-7f90cf546b15efadf2f8-wrr",
|
||||
Rule: "Host(`example.com`) && (Path(`/foo`) || PathPrefix(`/foo/`))",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Priority: 10412,
|
||||
Middlewares: []string{"httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-7f90cf546b15efadf2f8-urlrewrite-0"},
|
||||
},
|
||||
|
@ -2226,7 +2226,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2289,7 +2289,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2361,7 +2361,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2429,7 +2429,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2488,7 +2488,7 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2599,7 +2599,7 @@ func TestLoadHTTPRoutes_backendExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2649,7 +2649,7 @@ func TestLoadHTTPRoutes_backendExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2702,7 +2702,7 @@ func TestLoadHTTPRoutes_backendExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2753,7 +2753,7 @@ func TestLoadHTTPRoutes_backendExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2805,7 +2805,7 @@ func TestLoadHTTPRoutes_backendExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -2877,7 +2877,7 @@ func TestLoadHTTPRoutes_backendExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-multi-protocols-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -3024,7 +3024,7 @@ func TestLoadHTTPRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{
|
||||
"default-my-first-middleware",
|
||||
"default-my-second-middleware",
|
||||
|
@ -3094,7 +3094,7 @@ func TestLoadHTTPRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{
|
||||
"default-my-first-middleware",
|
||||
"default-my-second-middleware",
|
||||
|
@ -3162,7 +3162,7 @@ func TestLoadHTTPRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-err-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -3212,7 +3212,7 @@ func TestLoadHTTPRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-1c0cf64bde37d9d0df06-err-wrr",
|
||||
Rule: "Host(`foo.com`) && Path(`/bar`)",
|
||||
Priority: 100008,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -3310,7 +3310,7 @@ func TestLoadGRPCRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "grpcroute-default-grpc-app-1-gw-default-my-gateway-ep-web-0-74471866db6e94e08d00-wrr",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/`)",
|
||||
Priority: 22,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{
|
||||
"default-my-first-middleware",
|
||||
"default-my-second-middleware",
|
||||
|
@ -3380,7 +3380,7 @@ func TestLoadGRPCRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "grpcroute-default-grpc-app-1-gw-default-my-gateway-ep-web-0-74471866db6e94e08d00-wrr",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/`)",
|
||||
Priority: 22,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Middlewares: []string{
|
||||
"default-my-first-middleware",
|
||||
"default-my-second-middleware",
|
||||
|
@ -3448,7 +3448,7 @@ func TestLoadGRPCRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "grpcroute-default-grpc-app-1-gw-default-my-gateway-ep-web-0-74471866db6e94e08d00-err-wrr",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/`)",
|
||||
Priority: 22,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -3501,7 +3501,7 @@ func TestLoadGRPCRoutes_filterExtensionRef(t *testing.T) {
|
|||
Service: "grpcroute-default-grpc-app-1-gw-default-my-gateway-ep-web-0-74471866db6e94e08d00-err-wrr",
|
||||
Rule: "Host(`foo.com`) && PathPrefix(`/`)",
|
||||
Priority: 22,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
|
@ -3744,7 +3744,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
"tcproute-default-TCP-app-1-gw-default-my-gateway-ep-TCP-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"TCP"},
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "tcproute-default-TCP-app-1-gw-default-my-gateway-ep-TCP-0-e3b0c44298fc1c149afb-wrr",
|
||||
},
|
||||
},
|
||||
|
@ -3792,7 +3792,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -3850,13 +3850,13 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp-1"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tcp-gateway-ep-tcp-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-default-tcp-app-2-gw-default-my-tcp-gateway-ep-tcp-2-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tcp-2"},
|
||||
Service: "tcproute-default-tcp-app-2-gw-default-my-tcp-gateway-ep-tcp-2-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -3936,13 +3936,13 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp-1"},
|
||||
Service: "tcproute-default-tcp-app-gw-default-my-tcp-gateway-ep-tcp-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-default-tcp-app-gw-default-my-tcp-gateway-ep-tcp-1-1-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tcp-1"},
|
||||
Service: "tcproute-default-tcp-app-gw-default-my-tcp-gateway-ep-tcp-1-1-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4020,7 +4020,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4080,7 +4080,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tls"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -4144,7 +4144,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4200,13 +4200,13 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-bar-tcp-app-bar-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-bar-tcp-app-bar-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4284,7 +4284,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-bar-tcp-app-bar-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4341,7 +4341,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4394,7 +4394,7 @@ func TestLoadTCPRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tcp-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.TCPMiddleware{},
|
||||
|
@ -4621,7 +4621,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"TCP"},
|
||||
Priority: 0,
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "tlsroute-default-tls-app-1-gw-default-my-gateway-ep-TCP-0-e3b0c44298fc1c149afb-wrr",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
|
@ -4713,7 +4713,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -4779,7 +4779,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -4839,7 +4839,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -4899,7 +4899,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tls"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-tls-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
"tlsroute-default-tls-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb": {
|
||||
|
@ -4907,7 +4907,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 0,
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -4997,7 +4997,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tls"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -5068,7 +5068,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5128,7 +5128,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5188,7 +5188,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5248,7 +5248,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`) || HostSNI(`bar.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5308,7 +5308,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-default-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 11,
|
||||
Rule: "HostSNI(`foo.default`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5368,7 +5368,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-default-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 11,
|
||||
Rule: "HostSNI(`foo.default`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5378,7 +5378,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-bar-tls-app-bar-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 7,
|
||||
Rule: "HostSNI(`foo.bar`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5460,7 +5460,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-bar-tls-app-bar-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 7,
|
||||
Rule: "HostSNI(`foo.bar`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5520,7 +5520,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-gw-default-my-gateway-ep-tcp-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 0,
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5530,7 +5530,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-gw-default-my-gateway-ep-tcp-1-1-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 0,
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5613,7 +5613,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5670,7 +5670,7 @@ func TestLoadTLSRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-tls-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 15,
|
||||
Rule: "HostSNI(`foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5879,13 +5879,13 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tls-1"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
"tlsroute-default-tls-app-1-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb": {
|
||||
|
@ -5893,7 +5893,7 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-1-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 24,
|
||||
Rule: "HostSNI(`pass.tls.foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -5953,14 +5953,14 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-default-http-app-1-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6068,13 +6068,13 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tls-1"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
"tlsroute-default-tls-app-default-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb": {
|
||||
|
@ -6082,7 +6082,7 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-default-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 24,
|
||||
Rule: "HostSNI(`pass.tls.foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -6142,14 +6142,14 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-default-http-app-default-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6229,13 +6229,13 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tls-1"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
"tlsroute-default-tls-app-default-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb": {
|
||||
|
@ -6243,7 +6243,7 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "tlsroute-default-tls-app-default-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 24,
|
||||
Rule: "HostSNI(`pass.tls.foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -6252,13 +6252,13 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-bar-tcp-app-bar-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-bar-tcp-app-bar-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tls-1"},
|
||||
Service: "tcproute-bar-tcp-app-bar-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6348,14 +6348,14 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-default-http-app-default-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
"httproute-bar-http-app-bar-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd": {
|
||||
|
@ -6363,14 +6363,14 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "httproute-bar-http-app-bar-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-bar-http-app-bar-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-bar-http-app-bar-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6487,13 +6487,13 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-bar-tcp-app-bar-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-bar-tcp-app-bar-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tls-1"},
|
||||
Service: "tcproute-bar-tcp-app-bar-gw-default-my-gateway-ep-tls-1-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
"tlsroute-bar-tls-app-bar-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb": {
|
||||
|
@ -6501,7 +6501,7 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "tlsroute-bar-tls-app-bar-gw-default-my-gateway-ep-tls-2-0-e3b0c44298fc1c149afb-wrr",
|
||||
Priority: 24,
|
||||
Rule: "HostSNI(`pass.tls.foo.example.com`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: true,
|
||||
},
|
||||
|
@ -6561,14 +6561,14 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "httproute-bar-http-app-bar-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-bar-http-app-bar-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-bar-http-app-bar-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6647,13 +6647,13 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
EntryPoints: []string{"tcp"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tcp-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb": {
|
||||
EntryPoints: []string{"tls"},
|
||||
Service: "tcproute-default-tcp-app-default-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6701,14 +6701,14 @@ func TestLoadMixedRoutes(t *testing.T) {
|
|||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-web-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
},
|
||||
"httproute-default-http-app-default-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd": {
|
||||
EntryPoints: []string{"websecure"},
|
||||
Service: "httproute-default-http-app-default-gw-default-my-gateway-ep-websecure-0-a431b128267aabc954fd-wrr",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
Priority: 2,
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -6931,7 +6931,7 @@ func TestLoadRoutesWithReferenceGrants(t *testing.T) {
|
|||
EntryPoints: []string{"tls"},
|
||||
Service: "tcproute-default-tcp-app-1-gw-default-my-gateway-ep-tls-0-e3b0c44298fc1c149afb-wrr",
|
||||
Rule: "HostSNI(`*`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{},
|
||||
},
|
||||
},
|
||||
|
@ -7079,7 +7079,7 @@ func TestLoadRoutesWithReferenceGrants(t *testing.T) {
|
|||
EntryPoints: []string{"http"},
|
||||
Rule: "Host(`foo.example.com`) && PathPrefix(`/`)",
|
||||
Service: "httproute-default-http-app-1-gw-default-my-gateway-ep-http-0-d40286ed9f4652ca2108-wrr",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Priority: 17,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -120,7 +120,7 @@ func (p *Provider) loadTCPRoute(listener gatewayListener, route *gatev1alpha2.TC
|
|||
router := dynamic.TCPRouter{
|
||||
Rule: "HostSNI(`*`)",
|
||||
EntryPoints: []string{listener.EPName},
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
}
|
||||
|
||||
if listener.Protocol == gatev1.TLSProtocolType && listener.TLS != nil {
|
||||
|
|
|
@ -124,7 +124,7 @@ func (p *Provider) loadTLSRoute(listener gatewayListener, route *gatev1alpha2.TL
|
|||
|
||||
rule, priority := hostSNIRule(hostnames)
|
||||
router := dynamic.TCPRouter{
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Rule: rule,
|
||||
Priority: priority,
|
||||
EntryPoints: []string{listener.EPName},
|
||||
|
|
|
@ -287,8 +287,9 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
|
|||
}
|
||||
|
||||
rt := &dynamic.Router{
|
||||
Rule: "PathPrefix(`/`)",
|
||||
RuleSyntax: "v3",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
// "default" stands for the default rule syntax in Traefik v3, i.e. the v3 syntax.
|
||||
RuleSyntax: "default",
|
||||
Priority: math.MinInt32,
|
||||
Service: "default-backend",
|
||||
}
|
||||
|
|
|
@ -540,7 +540,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
|||
Routers: map[string]*dynamic.Router{
|
||||
"default-router": {
|
||||
Rule: "PathPrefix(`/`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "default-backend",
|
||||
Priority: math.MinInt32,
|
||||
},
|
||||
|
@ -1006,7 +1006,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
|||
Routers: map[string]*dynamic.Router{
|
||||
"default-router": {
|
||||
Rule: "PathPrefix(`/`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Service: "default-backend",
|
||||
Priority: math.MinInt32,
|
||||
},
|
||||
|
@ -1556,7 +1556,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
|||
Routers: map[string]*dynamic.Router{
|
||||
"default-router": {
|
||||
Rule: "PathPrefix(`/`)",
|
||||
RuleSyntax: "v3",
|
||||
RuleSyntax: "default",
|
||||
Priority: math.MinInt32,
|
||||
Service: "default-backend",
|
||||
},
|
||||
|
|
|
@ -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",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,15 @@ func mergeConfiguration(configurations dynamic.Configurations, defaultEntryPoint
|
|||
router.EntryPoints = defaultEntryPoints
|
||||
}
|
||||
|
||||
// The `ruleSyntax` option is deprecated.
|
||||
// We exclude the "default" value to avoid logging it,
|
||||
// as it is the value used for internal models and computed rules.
|
||||
if router.RuleSyntax != "" && router.RuleSyntax != "default" {
|
||||
log.Warn().
|
||||
Str(logs.RouterName, routerName).
|
||||
Msg("Router's `ruleSyntax` option is deprecated, please remove any usage of this option.")
|
||||
}
|
||||
|
||||
conf.HTTP.Routers[provider.MakeQualifiedName(pvd, routerName)] = router
|
||||
}
|
||||
for middlewareName, middleware := range configuration.HTTP.Middlewares {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue