Merge current v3.1 into master
This commit is contained in:
commit
8dc9607db7
50 changed files with 159 additions and 128 deletions
|
@ -77,7 +77,7 @@ type ServiceTCP struct {
|
|||
// hence fully terminating the connection.
|
||||
// It is a duration in milliseconds, defaulting to 100.
|
||||
// A negative value means an infinite deadline (i.e. the reading capability is never closed).
|
||||
// Deprecated: TerminationDelay is not supported APIVersion traefik.io/v1, please use ServersTransport to configure the TerminationDelay instead.
|
||||
// Deprecated: TerminationDelay will not be supported in future APIVersions, please use ServersTransport to configure the TerminationDelay instead.
|
||||
TerminationDelay *int `json:"terminationDelay,omitempty"`
|
||||
// ProxyProtocol defines the PROXY protocol configuration.
|
||||
// More info: https://doc.traefik.io/traefik/v3.1/routing/services/#proxy-protocol
|
||||
|
|
|
@ -26,6 +26,7 @@ type RouterIng struct {
|
|||
EntryPoints []string `json:"entryPoints,omitempty"`
|
||||
Middlewares []string `json:"middlewares,omitempty"`
|
||||
Priority int `json:"priority,omitempty"`
|
||||
RuleSyntax string `json:"ruleSyntax,omitempty"`
|
||||
TLS *dynamic.RouterTLSConfig `json:"tls,omitempty" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ func Test_parseRouterConfig(t *testing.T) {
|
|||
"traefik.ingress.kubernetes.io/router.entrypoints": "foobar,foobar",
|
||||
"traefik.ingress.kubernetes.io/router.middlewares": "foobar,foobar",
|
||||
"traefik.ingress.kubernetes.io/router.priority": "42",
|
||||
"traefik.ingress.kubernetes.io/router.rulesyntax": "foobar",
|
||||
"traefik.ingress.kubernetes.io/router.tls": "true",
|
||||
"traefik.ingress.kubernetes.io/router.tls.certresolver": "foobar",
|
||||
"traefik.ingress.kubernetes.io/router.tls.domains.0.main": "foobar",
|
||||
|
@ -38,6 +39,7 @@ func Test_parseRouterConfig(t *testing.T) {
|
|||
EntryPoints: []string{"foobar", "foobar"},
|
||||
Middlewares: []string{"foobar", "foobar"},
|
||||
Priority: 42,
|
||||
RuleSyntax: "foobar",
|
||||
TLS: &dynamic.RouterTLSConfig{
|
||||
CertResolver: "foobar",
|
||||
Domains: []types.Domain{
|
||||
|
@ -180,6 +182,7 @@ func Test_convertAnnotations(t *testing.T) {
|
|||
"traefik.ingress.kubernetes.io/router.entrypoints": "foobar,foobar",
|
||||
"traefik.ingress.kubernetes.io/router.middlewares": "foobar,foobar",
|
||||
"traefik.ingress.kubernetes.io/router.priority": "42",
|
||||
"traefik.ingress.kubernetes.io/router.rulesyntax": "foobar",
|
||||
"traefik.ingress.kubernetes.io/router.tls": "true",
|
||||
"traefik.ingress.kubernetes.io/router.tls.certresolver": "foobar",
|
||||
"traefik.ingress.kubernetes.io/router.tls.domains.0.main": "foobar",
|
||||
|
@ -194,6 +197,7 @@ func Test_convertAnnotations(t *testing.T) {
|
|||
"traefik.router.entrypoints": "foobar,foobar",
|
||||
"traefik.router.middlewares": "foobar,foobar",
|
||||
"traefik.router.priority": "42",
|
||||
"traefik.router.rulesyntax": "foobar",
|
||||
"traefik.router.tls": "true",
|
||||
"traefik.router.tls.certresolver": "foobar",
|
||||
"traefik.router.tls.domains[0].main": "foobar",
|
||||
|
|
|
@ -10,6 +10,7 @@ metadata:
|
|||
traefik.ingress.kubernetes.io/router.entrypoints: ep1,ep2
|
||||
traefik.ingress.kubernetes.io/router.middlewares: md1,md2
|
||||
traefik.ingress.kubernetes.io/router.priority: "42"
|
||||
traefik.ingress.kubernetes.io/router.rulesyntax: "v2"
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
traefik.ingress.kubernetes.io/router.tls.certresolver: foobar
|
||||
traefik.ingress.kubernetes.io/router.tls.domains.0.main: domain.com
|
||||
|
|
|
@ -760,6 +760,7 @@ func loadRouter(rule netv1.IngressRule, pa netv1.HTTPIngressPath, rtConfig *Rout
|
|||
}
|
||||
|
||||
if rtConfig != nil && rtConfig.Router != nil {
|
||||
rt.RuleSyntax = rtConfig.Router.RuleSyntax
|
||||
rt.Priority = rtConfig.Router.Priority
|
||||
rt.EntryPoints = rtConfig.Router.EntryPoints
|
||||
rt.Middlewares = rtConfig.Router.Middlewares
|
||||
|
|
|
@ -96,6 +96,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
|
|||
Service: "testing-service1-80",
|
||||
Middlewares: []string{"md1", "md2"},
|
||||
Priority: 42,
|
||||
RuleSyntax: "v2",
|
||||
TLS: &dynamic.RouterTLSConfig{
|
||||
CertResolver: "foobar",
|
||||
Domains: []types.Domain{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue