From 27353d07404baf4d12bf5dea105d31739c827612 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 7 Jun 2023 09:30:05 +0200 Subject: [PATCH 01/17] Update go-acme/lego to v4.12.1 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 06a0f01f1..1b0b9e117 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/fatih/structs v1.1.0 github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 - github.com/go-acme/lego/v4 v4.12.0 + github.com/go-acme/lego/v4 v4.12.1 github.com/go-check/check v0.0.0-00010101000000-000000000000 github.com/go-kit/kit v0.10.1-0.20200915143503-439c4d2ed3ea github.com/golang/protobuf v1.5.2 diff --git a/go.sum b/go.sum index e0b106419..f24f2569e 100644 --- a/go.sum +++ b/go.sum @@ -657,8 +657,8 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-acme/lego/v4 v4.12.0 h1:jox3II6YRjt1EXvrymSQuSNgEUOcbUkF2je0kyuv6YM= -github.com/go-acme/lego/v4 v4.12.0/go.mod h1:UZoOlhVmUYP/N0z4tEbfUjoCNHRZNObzqWZtT76DIsc= +github.com/go-acme/lego/v4 v4.12.1 h1:Cy3FS7wADLNBqCLpz2wdfdNrThW9rZy8RCAfnUrL2uE= +github.com/go-acme/lego/v4 v4.12.1/go.mod h1:UZoOlhVmUYP/N0z4tEbfUjoCNHRZNObzqWZtT76DIsc= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= From 878e7de56a875ccb09d05d61d4ffc3e2e22eda87 Mon Sep 17 00:00:00 2001 From: Dylan Rodgers <94392934+tomatokoolaid@users.noreply.github.com> Date: Fri, 9 Jun 2023 01:18:05 -0600 Subject: [PATCH 02/17] Add business callouts --- .../getting-started/quick-start-with-kubernetes.md | 2 ++ .../includes/traefik-api-management-kubernetes.md | 11 +++++++++++ docs/content/providers/kubernetes-crd.md | 2 +- docs/content/providers/kubernetes-gateway.md | 2 ++ docs/content/providers/kubernetes-ingress.md | 2 +- .../reference/dynamic-configuration/kubernetes-crd.md | 2 ++ .../dynamic-configuration/kubernetes-gateway.md | 2 ++ docs/content/routing/providers/kubernetes-crd.md | 2 +- docs/content/routing/providers/kubernetes-gateway.md | 2 ++ docs/content/routing/providers/kubernetes-ingress.md | 2 +- 10 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 docs/content/includes/traefik-api-management-kubernetes.md diff --git a/docs/content/getting-started/quick-start-with-kubernetes.md b/docs/content/getting-started/quick-start-with-kubernetes.md index 8962e7e05..4d0d3b604 100644 --- a/docs/content/getting-started/quick-start-with-kubernetes.md +++ b/docs/content/getting-started/quick-start-with-kubernetes.md @@ -316,3 +316,5 @@ curl -v http://localhost/ - [Filter the ingresses](../providers/kubernetes-ingress.md#ingressclass) to use with [IngressClass](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) - Use [IngressRoute CRD](../providers/kubernetes-crd.md) - Protect [ingresses with TLS](../routing/providers/kubernetes-ingress.md#enabling-tls-via-annotations) + +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/includes/traefik-api-management-kubernetes.md b/docs/content/includes/traefik-api-management-kubernetes.md new file mode 100644 index 000000000..f89712319 --- /dev/null +++ b/docs/content/includes/traefik-api-management-kubernetes.md @@ -0,0 +1,11 @@ +--- + +!!! question "Managing APIs in Kubernetes?" + + If your organization is publishing, securing, and managing APIs, consider [Traefik Hub](https://traefik.io/traefik-hub/) for your API management solution. + + - K8s services auto-discovery, 100% CRDs configuration, & full GitOps compliance + - Centralized control plane for all APIs, users, & infrastructure components + - Self-serve API portal with API discovery, documentation, testing, & access control + + Traefik Hub makes managing APIs easier than ever before. See for yourself in this [short video walkthrough](https://info.traefik.io/watch-traefik-hub-demo). diff --git a/docs/content/providers/kubernetes-crd.md b/docs/content/providers/kubernetes-crd.md index f0c2635bc..5b9d19735 100644 --- a/docs/content/providers/kubernetes-crd.md +++ b/docs/content/providers/kubernetes-crd.md @@ -345,4 +345,4 @@ providers: For additional information, refer to the [full example](../user-guides/crd-acme/index.md) with Let's Encrypt. -{!traefik-for-business-applications.md!} +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/providers/kubernetes-gateway.md b/docs/content/providers/kubernetes-gateway.md index 759ca989e..809e5630a 100644 --- a/docs/content/providers/kubernetes-gateway.md +++ b/docs/content/providers/kubernetes-gateway.md @@ -268,3 +268,5 @@ providers: ```bash tab="CLI" --providers.kubernetesgateway.throttleDuration=10s ``` + +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/providers/kubernetes-ingress.md b/docs/content/providers/kubernetes-ingress.md index c9e9d8289..0414ca9ce 100644 --- a/docs/content/providers/kubernetes-ingress.md +++ b/docs/content/providers/kubernetes-ingress.md @@ -504,4 +504,4 @@ providers: To learn more about the various aspects of the Ingress specification that Traefik supports, many examples of Ingresses definitions are located in the test [examples](https://github.com/traefik/traefik/tree/v2.10/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository. -{!traefik-for-business-applications.md!} +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd.md b/docs/content/reference/dynamic-configuration/kubernetes-crd.md index 29228f252..5519ad0f5 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd.md +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd.md @@ -35,3 +35,5 @@ Dynamic configuration with Kubernetes Custom Resource ```yaml --8<-- "content/reference/dynamic-configuration/kubernetes-crd-rbac.yml" ``` + +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/reference/dynamic-configuration/kubernetes-gateway.md b/docs/content/reference/dynamic-configuration/kubernetes-gateway.md index 1c0d4ce04..6700a218d 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-gateway.md +++ b/docs/content/reference/dynamic-configuration/kubernetes-gateway.md @@ -29,3 +29,5 @@ Dynamic configuration with Kubernetes Gateway provider. ```yaml --8<-- "content/reference/dynamic-configuration/kubernetes-gateway-rbac.yml" ``` + +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/routing/providers/kubernetes-crd.md b/docs/content/routing/providers/kubernetes-crd.md index 17f8bf8e5..30e44377d 100644 --- a/docs/content/routing/providers/kubernetes-crd.md +++ b/docs/content/routing/providers/kubernetes-crd.md @@ -1904,4 +1904,4 @@ If the ServersTransport CRD is defined in another provider the cross-provider fo Also see the [full example](../../user-guides/crd-acme/index.md) with Let's Encrypt. -{!traefik-for-business-applications.md!} +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/routing/providers/kubernetes-gateway.md b/docs/content/routing/providers/kubernetes-gateway.md index e82e0ae59..430b66316 100644 --- a/docs/content/routing/providers/kubernetes-gateway.md +++ b/docs/content/routing/providers/kubernetes-gateway.md @@ -354,3 +354,5 @@ Kubernetes cluster before creating `TLSRoute` objects. | [10] | `port` | The port of the referent service. | | [11] | `group` | Group is the group of the referent. Only `traefik.io`, `traefik.containo.us` and `gateway.networking.k8s.io` values are supported. | | [12] | `kind` | Kind is kind of the referent. Only `TraefikService` and `Service` values are supported. | + +{!traefik-api-management-kubernetes.md!} diff --git a/docs/content/routing/providers/kubernetes-ingress.md b/docs/content/routing/providers/kubernetes-ingress.md index 9156cc67e..fc9c31d4c 100644 --- a/docs/content/routing/providers/kubernetes-ingress.md +++ b/docs/content/routing/providers/kubernetes-ingress.md @@ -969,4 +969,4 @@ This will allow users to create a "default router" that will match all unmatched To do this, use the `traefik.ingress.kubernetes.io/router.priority` annotation (as seen in [Annotations on Ingress](#on-ingress)) on your ingresses accordingly. -{!traefik-for-business-applications.md!} +{!traefik-api-management-kubernetes.md!} From d1bdeb3a92ba539021dbc5c33939587239e53639 Mon Sep 17 00:00:00 2001 From: Romain Date: Wed, 14 Jun 2023 14:48:05 +0200 Subject: [PATCH 03/17] Fix missing trailer with custom errors middleware Co-authored-by: LandryBe --- pkg/middlewares/customerrors/custom_errors.go | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/pkg/middlewares/customerrors/custom_errors.go b/pkg/middlewares/customerrors/custom_errors.go index b24a6b04c..c764b2cf8 100644 --- a/pkg/middlewares/customerrors/custom_errors.go +++ b/pkg/middlewares/customerrors/custom_errors.go @@ -32,7 +32,7 @@ type serviceBuilder interface { BuildHTTP(ctx context.Context, serviceName string) (http.Handler, error) } -// customErrors is a middleware that provides the custom error pages.. +// customErrors is a middleware that provides the custom error pages. type customErrors struct { name string next http.Handler @@ -131,10 +131,10 @@ type responseInterceptor interface { isFilteredCode() bool } -// codeCatcher is a response writer that detects as soon as possible whether the -// response is a code within the ranges of codes it watches for. If it is, it -// simply drops the data from the response. Otherwise, it forwards it directly to -// the original client (its responseWriter) without any buffering. +// codeCatcher is a response writer that detects as soon as possible +// whether the response is a code within the ranges of codes it watches for. +// If it is, it simply drops the data from the response. +// Otherwise, it forwards it directly to the original client (its responseWriter) without any buffering. type codeCatcher struct { headerMap http.Header code int @@ -144,16 +144,6 @@ type codeCatcher struct { headersSent bool } -type codeCatcherWithCloseNotify struct { - *codeCatcher -} - -// CloseNotify returns a channel that receives at most a -// single value (true) when the client connection has gone away. -func (cc *codeCatcherWithCloseNotify) CloseNotify() <-chan bool { - return cc.responseWriter.(http.CloseNotifier).CloseNotify() -} - func newCodeCatcher(rw http.ResponseWriter, httpCodeRanges types.HTTPCodeRanges) responseInterceptor { catcher := &codeCatcher{ headerMap: make(http.Header), @@ -168,6 +158,10 @@ func newCodeCatcher(rw http.ResponseWriter, httpCodeRanges types.HTTPCodeRanges) } func (cc *codeCatcher) Header() http.Header { + if cc.headersSent { + return cc.responseWriter.Header() + } + if cc.headerMap == nil { cc.headerMap = make(http.Header) } @@ -247,6 +241,16 @@ func (cc *codeCatcher) Flush() { } } +type codeCatcherWithCloseNotify struct { + *codeCatcher +} + +// CloseNotify returns a channel that receives at most a single value (true) +// when the client connection has gone away. +func (cc *codeCatcherWithCloseNotify) CloseNotify() <-chan bool { + return cc.responseWriter.(http.CloseNotifier).CloseNotify() +} + // codeModifier forwards a response back to the client, // while enforcing a given response code. type codeModifier interface { @@ -277,18 +281,12 @@ type codeModifierWithoutCloseNotify struct { responseWriter http.ResponseWriter } -type codeModifierWithCloseNotify struct { - *codeModifierWithoutCloseNotify -} - -// CloseNotify returns a channel that receives at most a -// single value (true) when the client connection has gone away. -func (r *codeModifierWithCloseNotify) CloseNotify() <-chan bool { - return r.responseWriter.(http.CloseNotifier).CloseNotify() -} - // Header returns the response headers. func (r *codeModifierWithoutCloseNotify) Header() http.Header { + if r.headerSent { + return r.responseWriter.Header() + } + if r.headerMap == nil { r.headerMap = make(http.Header) } @@ -303,8 +301,8 @@ func (r *codeModifierWithoutCloseNotify) Write(buf []byte) (int, error) { return r.responseWriter.Write(buf) } -// WriteHeader sends the headers, with the enforced code (the code in argument -// is always ignored), if it hasn't already been done. +// WriteHeader sends the headers, with the enforced code (the code in argument is always ignored), +// if it hasn't already been done. func (r *codeModifierWithoutCloseNotify) WriteHeader(_ int) { if r.headerSent { return @@ -332,3 +330,13 @@ func (r *codeModifierWithoutCloseNotify) Flush() { flusher.Flush() } } + +type codeModifierWithCloseNotify struct { + *codeModifierWithoutCloseNotify +} + +// CloseNotify returns a channel that receives at most a single value (true) +// when the client connection has gone away. +func (r *codeModifierWithCloseNotify) CloseNotify() <-chan bool { + return r.responseWriter.(http.CloseNotifier).CloseNotify() +} From 68ed875966ee8b57f636db1368fb6f620a86ce43 Mon Sep 17 00:00:00 2001 From: Philipp Trulson Date: Wed, 14 Jun 2023 17:00:06 +0200 Subject: [PATCH 04/17] Update DataDog tracing dependency to v1.50.1 --- go.mod | 22 +++++++++++++--------- go.sum | 56 ++++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 1b0b9e117..d4e045bb3 100644 --- a/go.mod +++ b/go.mod @@ -57,7 +57,7 @@ require ( github.com/quic-go/quic-go v0.33.0 github.com/rancher/go-rancher-metadata v0.0.0-20200311180630-7f4c936a06ac github.com/sirupsen/logrus v1.9.0 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 github.com/traefik/paerser v0.2.0 github.com/traefik/yaegi v0.15.1 @@ -76,7 +76,7 @@ require ( golang.org/x/time v0.3.0 golang.org/x/tools v0.6.0 google.golang.org/grpc v1.53.0 - gopkg.in/DataDog/dd-trace-go.v1 v1.43.1 + gopkg.in/DataDog/dd-trace-go.v1 v1.51.0 gopkg.in/fsnotify.v1 v1.4.7 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.3 @@ -104,9 +104,13 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583 // indirect + github.com/DataDog/appsec-internal-go v1.0.0 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.1 // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.45.0-rc.1 // indirect github.com/DataDog/datadog-go v4.8.2+incompatible // indirect - github.com/DataDog/datadog-go/v5 v5.0.2 // indirect + github.com/DataDog/datadog-go/v5 v5.1.1 // indirect + github.com/DataDog/go-libddwaf v1.2.0 // indirect + github.com/DataDog/go-tuf v0.3.0--fix-localmeta-fork // indirect github.com/DataDog/sketches-go v1.2.1 // indirect github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -140,7 +144,6 @@ require ( github.com/coreos/go-systemd/v22 v22.3.2 // indirect github.com/cpu/goacmedns v0.1.1 // indirect github.com/deepmap/oapi-codegen v1.9.1 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e // indirect @@ -178,7 +181,6 @@ require ( github.com/gogo/googleapis v1.4.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.2.0 // indirect - github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/btree v1.0.1 // indirect @@ -274,6 +276,7 @@ require ( github.com/opencontainers/runc v1.1.4 // indirect github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect github.com/oracle/oci-go-sdk v24.3.0+incompatible // indirect + github.com/outcaste-io/ristretto v0.2.1 // indirect github.com/ovh/go-ovh v1.1.0 // indirect github.com/philhofer/fwd v1.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -291,6 +294,7 @@ require ( github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/secure-systems-lab/go-securesystemslib v0.5.0 // indirect github.com/segmentio/fasthash v1.0.3 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04 // indirect @@ -304,7 +308,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 // indirect github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490 // indirect github.com/theupdateframework/notary v0.6.1 // indirect - github.com/tinylib/msgp v1.1.2 // indirect + github.com/tinylib/msgp v1.1.6 // indirect github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 // indirect github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect github.com/transip/gotransip/v6 v6.17.0 // indirect @@ -323,7 +327,7 @@ require ( go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect go.etcd.io/etcd/client/v3 v3.5.5 // indirect go.opencensus.io v0.24.0 // indirect - go.uber.org/atomic v1.7.0 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect go.uber.org/zap v1.19.0 // indirect @@ -346,7 +350,7 @@ require ( gopkg.in/ns1/ns1-go.v2 v2.6.5 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect - inet.af/netaddr v0.0.0-20220617031823-097006376321 // indirect + inet.af/netaddr v0.0.0-20220811202034-502d2d690317 // indirect k8s.io/klog/v2 v2.80.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect diff --git a/go.sum b/go.sum index f24f2569e..1de390a94 100644 --- a/go.sum +++ b/go.sum @@ -112,14 +112,23 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583 h1:3nVO1nQyh64IUY6BPZUpMYMZ738Pu+LsMt3E0eqqIYw= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583/go.mod h1:EP9f4GqaDJyP1F5jTNMtzdIpw3JpNs3rMSJOnYywCiw= +github.com/DataDog/appsec-internal-go v1.0.0 h1:2u5IkF4DBj3KVeQn5Vg2vjPUtt513zxEYglcqnd500U= +github.com/DataDog/appsec-internal-go v1.0.0/go.mod h1:+Y+4klVWKPOnZx6XESG7QHydOaUGEXyH2j/vSg9JiNM= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.1 h1:XyYvstMFpSyZtfJHWJm1Sf1meNyCdfhKJrjB6+rUNOk= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.1/go.mod h1:e933RWa4kAWuHi5jpzEuOiULlv21HcCFEVIYegmaB5c= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.45.0-rc.1 h1:0OK84DbAucLUwoDYoBFve1cuhDWtoquruVVDjgucYlI= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.45.0-rc.1/go.mod h1:VVMDDibJxYEkwcLdZBT2g8EHKpbMT4JdOhRbQ9GdjbM= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v4.8.2+incompatible h1:qbcKSx29aBLD+5QLvlQZlGmRMF/FfGqFLFev/1TDzRo= github.com/DataDog/datadog-go v4.8.2+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go/v5 v5.0.2 h1:UFtEe7662/Qojxkw1d6SboAeA0CPI3naKhVASwFn+04= -github.com/DataDog/datadog-go/v5 v5.0.2/go.mod h1:ZI9JFB4ewXbw1sBnF4sxsR2k1H3xjV+PUAOUsHvKpcU= +github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= +github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= +github.com/DataDog/go-libddwaf v1.2.0 h1:fKHP5U29E597eV2hU501fcW40bL8zcQ081jEGuRw2kM= +github.com/DataDog/go-libddwaf v1.2.0/go.mod h1:DI5y8obPajk+Tvy2o+nZc2g/5Ria/Rfq5/624k7pHpE= +github.com/DataDog/go-tuf v0.3.0--fix-localmeta-fork h1:yBq5PrAtrM4yVeSzQ+bn050+Ysp++RKF1QmtkL4VqvU= +github.com/DataDog/go-tuf v0.3.0--fix-localmeta-fork/go.mod h1:yA5JwkZsHTLuqq3zaRgUQf35DfDkpOZqgtBqHKpwrBs= +github.com/DataDog/gostackparse v0.5.0 h1:jb72P6GFHPHz2W0onsN51cS3FkaMDcjb0QzgxxA4gDk= github.com/DataDog/sketches-go v1.2.1 h1:qTBzWLnZ3kM2kw39ymh6rMcnN+5VULwFs++lEYUUsro= github.com/DataDog/sketches-go v1.2.1/go.mod h1:1xYmPLY1So10AwxV6MJV0J53XVH+WL9Ad1KetxVivVI= github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798 h1:2T/jmrHeTezcCM58lvEQXs0UpQJCo5SoGAcg+mbSTIg= @@ -325,6 +334,7 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4= github.com/compose-spec/compose-go v1.0.2/go.mod h1:gCIA3No0j5nNszz2X0yd/mkigTIWcOgHiPa9guWvoec= github.com/compose-spec/compose-go v1.0.3 h1:yvut1x9H4TUMptNA4mZ63VGVtDNX1OKy2TZCi6yFw8Q= github.com/compose-spec/compose-go v1.0.3/go.mod h1:gCIA3No0j5nNszz2X0yd/mkigTIWcOgHiPa9guWvoec= @@ -497,8 +507,6 @@ github.com/denisenkom/go-mssqldb v0.0.0-20190315220205-a8ed825ac853/go.mod h1:xN github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= github.com/denverdino/aliyungo v0.0.0-20170926055100-d3308649c661/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= @@ -630,6 +638,7 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e/go.mod h1:HyVoz1Mz5Co8TFO8EupIdlcpwShBmY98dkT2xeHkvEI= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -771,8 +780,6 @@ github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8 github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -813,6 +820,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -1482,6 +1490,8 @@ github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v24.3.0+incompatible h1:x4mcfb4agelf1O4/1/auGlZ1lr97jXRSSN5MxTgG/zU= github.com/oracle/oci-go-sdk v24.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= +github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= +github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= github.com/ovh/go-ovh v1.1.0 h1:bHXZmw8nTgZin4Nv7JuaLs0KG5x54EQR7migYTd1zrk= github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA= github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c/go.mod h1:otzZQXgoO96RTzDB/Hycg0qZcXZsWJGJRSXbmEIJ+4M= @@ -1599,6 +1609,7 @@ github.com/rboyer/safeio v0.2.1/go.mod h1:Cq/cEPK+YXFn622lsQ0K4KsPZSPtaptHHEldsy github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/renier/xmlrpc v0.0.0-20170708154548-ce4a1a486c03/go.mod h1:gRAiPF5C5Nd0eyyRdqIu9qTiFSoZzpTq727b5B8fkkU= +github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052 h1:Qp27Idfgi6ACvFQat5+VJvlYToylpM/hcyLBI3WaKPA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= @@ -1637,6 +1648,9 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/secure-systems-lab/go-securesystemslib v0.3.1/go.mod h1:o8hhjkbNl2gOamKUA/eNW3xUrntHT9L4W89W1nfj43U= +github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= +github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -1675,6 +1689,7 @@ github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e/go.mod h1:fKZCUVd github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -1732,8 +1747,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 h1:XGopsea1Dw7ecQ8JscCNQXDGYAKDiWjDeXnpN/+BY9g= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= @@ -1741,6 +1757,7 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 h1:mmz27tVi2r70JYnm5y0Zk8w0Qzsx+vfUw3oqSyrEfP8= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= @@ -1749,8 +1766,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490/go.mod github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9/go.mod h1:RHkNRtSLfOK7qBTHaeSX1D6BNpI3qw7NTxsmNr4RvN8= github.com/theupdateframework/notary v0.6.1 h1:7wshjstgS9x9F5LuB1L5mBI2xNMObWqjz+cjWoom6l0= github.com/theupdateframework/notary v0.6.1/go.mod h1:MOfgIfmox8s7/7fduvB2xyPPMJCrjRLRizA8OFwpnKY= -github.com/tinylib/msgp v1.1.2 h1:gWmO7n0Ys2RBEb7GPYB9Ujq8Mk5p2U08lRnmMcGy6BQ= -github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw= +github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 h1:014iQD8i8EabPWK2XgUuOTxg5s2nhfDmq6GupskfUO8= @@ -1892,8 +1909,10 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -1955,6 +1974,7 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= @@ -2050,6 +2070,7 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -2184,6 +2205,7 @@ golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2234,6 +2256,7 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2334,6 +2357,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2499,8 +2523,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/DataDog/dd-trace-go.v1 v1.43.1 h1:Dez4VzRQWAI5YXJRBx58BiC0gONGuW/oY4l8fWKzOXY= -gopkg.in/DataDog/dd-trace-go.v1 v1.43.1/go.mod h1:YL9g+nlUY7ByCffD5pDytAqy99GNbytRV0EBpKuldM4= +gopkg.in/DataDog/dd-trace-go.v1 v1.51.0 h1:nFsTjolqdh8slG6F1B7AGdFHX7/kp26Jkb8UvGSIIFY= +gopkg.in/DataDog/dd-trace-go.v1 v1.51.0/go.mod h1:+m1wWLyQfqd6fX0uy6YFbP1soWgmjQ+5TveksDt/fHc= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2582,8 +2606,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -inet.af/netaddr v0.0.0-20220617031823-097006376321 h1:B4dC8ySKTQXasnjDTMsoCMf1sQG4WsMej0WXaHxunmU= -inet.af/netaddr v0.0.0-20220617031823-097006376321/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k= +inet.af/netaddr v0.0.0-20220811202034-502d2d690317 h1:U2fwK6P2EqmopP/hFLTOAjWTki0qgd4GMJn5X8wOleU= +inet.af/netaddr v0.0.0-20220811202034-502d2d690317/go.mod h1:OIezDfdzOgFhuw4HuWapWq2e9l0H9tK4F1j+ETRtF3k= k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= k8s.io/api v0.16.9/go.mod h1:Y7dZNHs1Xy0mSwSlzL9QShi6qkljnN41yR8oWCRTDe8= From 6885e410f0f4ff4c39a2f4340f27ff24e6cb9cd0 Mon Sep 17 00:00:00 2001 From: Romain Date: Wed, 14 Jun 2023 17:42:44 +0200 Subject: [PATCH 05/17] Support informational headers in middlewares redefining the response writer. Co-authored-by: LandryBe --- go.mod | 2 +- go.sum | 4 +- pkg/middlewares/compress/compress_test.go | 82 +++++++++++++++++ pkg/middlewares/customerrors/custom_errors.go | 40 ++++++++- .../customerrors/custom_errors_test.go | 85 ++++++++++++++++++ pkg/middlewares/headers/headers_test.go | 87 +++++++++++++++++++ pkg/middlewares/headers/responsewriter.go | 9 ++ pkg/middlewares/pipelining/pipelining_test.go | 80 +++++++++++++++++ pkg/middlewares/retry/retry.go | 9 +- pkg/middlewares/retry/retry_test.go | 80 +++++++++++++++++ 10 files changed, 471 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index d4e045bb3..27de095eb 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/influxdata/influxdb-client-go/v2 v2.7.0 github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d github.com/instana/go-sensor v1.38.3 - github.com/klauspost/compress v1.15.0 + github.com/klauspost/compress v1.16.6 github.com/kvtools/consul v1.0.2 github.com/kvtools/etcdv3 v1.0.2 github.com/kvtools/redis v1.0.2 diff --git a/go.sum b/go.sum index 1de390a94..c444150a2 100644 --- a/go.sum +++ b/go.sum @@ -1158,8 +1158,8 @@ github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49/go.mod h1:yyMNCy github.com/kisom/goutils v1.1.0/go.mod h1:+UBTfd78habUYWFbNWTJNG+jNG/i/lGURakr4A/yNRw= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.16.6 h1:91SKEy4K37vkp255cJ8QesJhjyRO0hn9i9G0GoUwLsk= +github.com/klauspost/compress v1.16.6/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b h1:DzHy0GlWeF0KAglaTMY7Q+khIFoG8toHP+wLFBVBQJc= github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= diff --git a/pkg/middlewares/compress/compress_test.go b/pkg/middlewares/compress/compress_test.go index 8f7e85ae0..4a1fd2196 100644 --- a/pkg/middlewares/compress/compress_test.go +++ b/pkg/middlewares/compress/compress_test.go @@ -5,6 +5,8 @@ import ( "io" "net/http" "net/http/httptest" + "net/http/httptrace" + "net/textproto" "testing" "github.com/klauspost/compress/gzhttp" @@ -356,6 +358,86 @@ func TestMinResponseBodyBytes(t *testing.T) { } } +// This test is an adapted version of net/http/httputil.Test1xxResponses test. +func Test1xxResponses(t *testing.T) { + fakeBody := generateBytes(100000) + + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h := w.Header() + h.Add("Link", "; rel=preload; as=style") + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusEarlyHints) + + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusProcessing) + + if _, err := w.Write(fakeBody); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } + }) + + compress, err := New(context.Background(), next, dynamic.Compress{MinResponseBodyBytes: 1024}, "testing") + require.NoError(t, err) + + server := httptest.NewServer(compress) + t.Cleanup(server.Close) + frontendClient := server.Client() + + checkLinkHeaders := func(t *testing.T, expected, got []string) { + t.Helper() + + if len(expected) != len(got) { + t.Errorf("Expected %d link headers; got %d", len(expected), len(got)) + } + + for i := range expected { + if i >= len(got) { + t.Errorf("Expected %q link header; got nothing", expected[i]) + + continue + } + + if expected[i] != got[i] { + t.Errorf("Expected %q link header; got %q", expected[i], got[i]) + } + } + } + + var respCounter uint8 + trace := &httptrace.ClientTrace{ + Got1xxResponse: func(code int, header textproto.MIMEHeader) error { + switch code { + case http.StatusEarlyHints: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script"}, header["Link"]) + case http.StatusProcessing: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, header["Link"]) + default: + t.Error("Unexpected 1xx response") + } + + respCounter++ + + return nil + }, + } + req, _ := http.NewRequestWithContext(httptrace.WithClientTrace(context.Background(), trace), http.MethodGet, server.URL, nil) + req.Header.Add(acceptEncodingHeader, gzipValue) + + res, err := frontendClient.Do(req) + assert.Nil(t, err) + + defer res.Body.Close() + + if respCounter != 2 { + t.Errorf("Expected 2 1xx responses; got %d", respCounter) + } + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, res.Header["Link"]) + + assert.Equal(t, gzipValue, res.Header.Get(contentEncodingHeader)) + body, _ := io.ReadAll(res.Body) + assert.NotEqualValues(t, body, fakeBody) +} + func BenchmarkCompress(b *testing.B) { testCases := []struct { name string diff --git a/pkg/middlewares/customerrors/custom_errors.go b/pkg/middlewares/customerrors/custom_errors.go index c764b2cf8..39d411622 100644 --- a/pkg/middlewares/customerrors/custom_errors.go +++ b/pkg/middlewares/customerrors/custom_errors.go @@ -193,11 +193,25 @@ func (cc *codeCatcher) Write(buf []byte) (int, error) { return cc.responseWriter.Write(buf) } +// WriteHeader is, in the specific case of 1xx status codes, a direct call to the wrapped ResponseWriter, without marking headers as sent, +// allowing so further calls. func (cc *codeCatcher) WriteHeader(code int) { if cc.headersSent || cc.caughtFilteredCode { return } + // Handling informational headers. + if code >= 100 && code <= 199 { + // Multiple informational status codes can be used, + // so here the copy is not appending the values to not repeat them. + for k, v := range cc.Header() { + cc.responseWriter.Header()[k] = v + } + + cc.responseWriter.WriteHeader(code) + return + } + cc.code = code for _, block := range cc.httpCodeRanges { if cc.code >= block[0] && cc.code <= block[1] { @@ -208,7 +222,11 @@ func (cc *codeCatcher) WriteHeader(code int) { } } - utils.CopyHeaders(cc.responseWriter.Header(), cc.Header()) + // The copy is not appending the values, + // to not repeat them in case any informational status code has been written. + for k, v := range cc.Header() { + cc.responseWriter.Header()[k] = v + } cc.responseWriter.WriteHeader(cc.code) cc.headersSent = true } @@ -303,12 +321,28 @@ func (r *codeModifierWithoutCloseNotify) Write(buf []byte) (int, error) { // WriteHeader sends the headers, with the enforced code (the code in argument is always ignored), // if it hasn't already been done. -func (r *codeModifierWithoutCloseNotify) WriteHeader(_ int) { +// WriteHeader is, in the specific case of 1xx status codes, a direct call to the wrapped ResponseWriter, without marking headers as sent, +// allowing so further calls. +func (r *codeModifierWithoutCloseNotify) WriteHeader(code int) { if r.headerSent { return } - utils.CopyHeaders(r.responseWriter.Header(), r.Header()) + // Handling informational headers. + if code >= 100 && code <= 199 { + // Multiple informational status codes can be used, + // so here the copy is not appending the values to not repeat them. + for k, v := range r.headerMap { + r.responseWriter.Header()[k] = v + } + + r.responseWriter.WriteHeader(code) + return + } + + for k, v := range r.headerMap { + r.responseWriter.Header()[k] = v + } r.responseWriter.WriteHeader(r.code) r.headerSent = true } diff --git a/pkg/middlewares/customerrors/custom_errors_test.go b/pkg/middlewares/customerrors/custom_errors_test.go index c291b15d5..84e3579b7 100644 --- a/pkg/middlewares/customerrors/custom_errors_test.go +++ b/pkg/middlewares/customerrors/custom_errors_test.go @@ -3,8 +3,11 @@ package customerrors import ( "context" "fmt" + "io" "net/http" "net/http/httptest" + "net/http/httptrace" + "net/textproto" "testing" "github.com/stretchr/testify/assert" @@ -181,6 +184,88 @@ func TestHandler(t *testing.T) { } } +// This test is an adapted version of net/http/httputil.Test1xxResponses test. +func Test1xxResponses(t *testing.T) { + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h := w.Header() + h.Add("Link", "; rel=preload; as=style") + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusEarlyHints) + + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusProcessing) + + h.Add("User-Agent", "foobar") + _, _ = w.Write([]byte("Hello")) + w.WriteHeader(http.StatusBadGateway) + }) + + serviceBuilderMock := &mockServiceBuilder{handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, _ = fmt.Fprintln(w, "My error page.") + })} + + config := dynamic.ErrorPage{Service: "error", Query: "/", Status: []string{"200"}} + + errorPageHandler, err := New(context.Background(), next, config, serviceBuilderMock, "test") + require.NoError(t, err) + + server := httptest.NewServer(errorPageHandler) + t.Cleanup(server.Close) + frontendClient := server.Client() + + checkLinkHeaders := func(t *testing.T, expected, got []string) { + t.Helper() + + if len(expected) != len(got) { + t.Errorf("Expected %d link headers; got %d", len(expected), len(got)) + } + + for i := range expected { + if i >= len(got) { + t.Errorf("Expected %q link header; got nothing", expected[i]) + + continue + } + + if expected[i] != got[i] { + t.Errorf("Expected %q link header; got %q", expected[i], got[i]) + } + } + } + + var respCounter uint8 + trace := &httptrace.ClientTrace{ + Got1xxResponse: func(code int, header textproto.MIMEHeader) error { + switch code { + case http.StatusEarlyHints: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script"}, header["Link"]) + case http.StatusProcessing: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, header["Link"]) + default: + t.Error("Unexpected 1xx response") + } + + respCounter++ + + return nil + }, + } + req, _ := http.NewRequestWithContext(httptrace.WithClientTrace(context.Background(), trace), http.MethodGet, server.URL, nil) + + res, err := frontendClient.Do(req) + assert.Nil(t, err) + + defer res.Body.Close() + + if respCounter != 2 { + t.Errorf("Expected 2 1xx responses; got %d", respCounter) + } + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, res.Header["Link"]) + + body, _ := io.ReadAll(res.Body) + assert.Equal(t, "My error page.\n", string(body)) +} + type mockServiceBuilder struct { handler http.Handler } diff --git a/pkg/middlewares/headers/headers_test.go b/pkg/middlewares/headers/headers_test.go index efbcdb0b2..c345efd60 100644 --- a/pkg/middlewares/headers/headers_test.go +++ b/pkg/middlewares/headers/headers_test.go @@ -4,8 +4,11 @@ package headers import ( "context" + "io" "net/http" "net/http/httptest" + "net/http/httptrace" + "net/textproto" "testing" "github.com/stretchr/testify/assert" @@ -111,3 +114,87 @@ func Test_headers_getTracingInformation(t *testing.T) { assert.Equal(t, "testing", name) assert.Equal(t, tracing.SpanKindNoneEnum, trace) } + +// This test is an adapted version of net/http/httputil.Test1xxResponses test. +func Test1xxResponses(t *testing.T) { + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h := w.Header() + h.Add("Link", "; rel=preload; as=style") + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusEarlyHints) + + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusProcessing) + + _, _ = w.Write([]byte("Hello")) + }) + + cfg := dynamic.Headers{ + CustomResponseHeaders: map[string]string{ + "X-Custom-Response-Header": "test_response", + }, + } + + mid, err := New(context.Background(), next, cfg, "testing") + require.NoError(t, err) + + server := httptest.NewServer(mid) + t.Cleanup(server.Close) + frontendClient := server.Client() + + checkLinkHeaders := func(t *testing.T, expected, got []string) { + t.Helper() + + if len(expected) != len(got) { + t.Errorf("Expected %d link headers; got %d", len(expected), len(got)) + } + + for i := range expected { + if i >= len(got) { + t.Errorf("Expected %q link header; got nothing", expected[i]) + + continue + } + + if expected[i] != got[i] { + t.Errorf("Expected %q link header; got %q", expected[i], got[i]) + } + } + } + + var respCounter uint8 + trace := &httptrace.ClientTrace{ + Got1xxResponse: func(code int, header textproto.MIMEHeader) error { + switch code { + case http.StatusEarlyHints: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script"}, header["Link"]) + case http.StatusProcessing: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, header["Link"]) + default: + t.Error("Unexpected 1xx response") + } + + respCounter++ + + return nil + }, + } + req, _ := http.NewRequestWithContext(httptrace.WithClientTrace(context.Background(), trace), http.MethodGet, server.URL, nil) + + res, err := frontendClient.Do(req) + assert.Nil(t, err) + + defer res.Body.Close() + + if respCounter != 2 { + t.Errorf("Expected 2 1xx responses; got %d", respCounter) + } + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, res.Header["Link"]) + + body, _ := io.ReadAll(res.Body) + if string(body) != "Hello" { + t.Errorf("Read body %q; want Hello", body) + } + + assert.Equal(t, "test_response", res.Header.Get("X-Custom-Response-Header")) +} diff --git a/pkg/middlewares/headers/responsewriter.go b/pkg/middlewares/headers/responsewriter.go index 15201b1fd..c36674a05 100644 --- a/pkg/middlewares/headers/responsewriter.go +++ b/pkg/middlewares/headers/responsewriter.go @@ -36,10 +36,19 @@ func newResponseModifier(w http.ResponseWriter, r *http.Request, modifier func(* return rm } +// WriteHeader is, in the specific case of 1xx status codes, a direct call to the wrapped ResponseWriter, without marking headers as sent, +// allowing so further calls. func (r *responseModifier) WriteHeader(code int) { if r.headersSent { return } + + // Handling informational headers. + if code >= 100 && code <= 199 { + r.rw.WriteHeader(code) + return + } + defer func() { r.code = code r.headersSent = true diff --git a/pkg/middlewares/pipelining/pipelining_test.go b/pkg/middlewares/pipelining/pipelining_test.go index b26e5fc6b..181fcb328 100644 --- a/pkg/middlewares/pipelining/pipelining_test.go +++ b/pkg/middlewares/pipelining/pipelining_test.go @@ -2,8 +2,11 @@ package pipelining import ( "context" + "io" "net/http" "net/http/httptest" + "net/http/httptrace" + "net/textproto" "testing" "github.com/stretchr/testify/assert" @@ -68,3 +71,80 @@ func TestNew(t *testing.T) { }) } } + +// This test is an adapted version of net/http/httputil.Test1xxResponses test. +// This test is only here to guarantee that there would not be any regression in the future, +// because the pipelining middleware is already supporting informational headers. +func Test1xxResponses(t *testing.T) { + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h := w.Header() + h.Add("Link", "; rel=preload; as=style") + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusEarlyHints) + + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusProcessing) + + _, _ = w.Write([]byte("Hello")) + }) + + pipe := New(context.Background(), next, "pipe") + + server := httptest.NewServer(pipe) + t.Cleanup(server.Close) + frontendClient := server.Client() + + checkLinkHeaders := func(t *testing.T, expected, got []string) { + t.Helper() + + if len(expected) != len(got) { + t.Errorf("Expected %d link headers; got %d", len(expected), len(got)) + } + + for i := range expected { + if i >= len(got) { + t.Errorf("Expected %q link header; got nothing", expected[i]) + + continue + } + + if expected[i] != got[i] { + t.Errorf("Expected %q link header; got %q", expected[i], got[i]) + } + } + } + + var respCounter uint8 + trace := &httptrace.ClientTrace{ + Got1xxResponse: func(code int, header textproto.MIMEHeader) error { + switch code { + case http.StatusEarlyHints: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script"}, header["Link"]) + case http.StatusProcessing: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, header["Link"]) + default: + t.Error("Unexpected 1xx response") + } + + respCounter++ + + return nil + }, + } + req, _ := http.NewRequestWithContext(httptrace.WithClientTrace(context.Background(), trace), http.MethodGet, server.URL, nil) + + res, err := frontendClient.Do(req) + assert.Nil(t, err) + + defer res.Body.Close() + + if respCounter != 2 { + t.Errorf("Expected 2 1xx responses; got %d", respCounter) + } + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, res.Header["Link"]) + + body, _ := io.ReadAll(res.Body) + if string(body) != "Hello" { + t.Errorf("Read body %q; want Hello", body) + } +} diff --git a/pkg/middlewares/retry/retry.go b/pkg/middlewares/retry/retry.go index 37dd4abef..75367ebc7 100644 --- a/pkg/middlewares/retry/retry.go +++ b/pkg/middlewares/retry/retry.go @@ -209,7 +209,7 @@ func (r *responseWriterWithoutCloseNotify) WriteHeader(code int) { r.DisableRetries() } - if r.ShouldRetry() { + if r.ShouldRetry() || r.written { return } @@ -223,6 +223,13 @@ func (r *responseWriterWithoutCloseNotify) WriteHeader(code int) { } r.responseWriter.WriteHeader(code) + + // Handling informational headers. + // This allows to keep writing to r.headers map until a final status code is written. + if code >= 100 && code <= 199 { + return + } + r.written = true } diff --git a/pkg/middlewares/retry/retry_test.go b/pkg/middlewares/retry/retry_test.go index 4622093af..75ef5831b 100644 --- a/pkg/middlewares/retry/retry_test.go +++ b/pkg/middlewares/retry/retry_test.go @@ -7,6 +7,7 @@ import ( "net/http" "net/http/httptest" "net/http/httptrace" + "net/textproto" "strings" "testing" "time" @@ -309,3 +310,82 @@ func TestRetryWebsocket(t *testing.T) { }) } } + +// This test is an adapted version of net/http/httputil.Test1xxResponses test. +func Test1xxResponses(t *testing.T) { + next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + h := w.Header() + h.Add("Link", "; rel=preload; as=style") + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusEarlyHints) + + h.Add("Link", "; rel=preload; as=script") + w.WriteHeader(http.StatusProcessing) + + _, _ = w.Write([]byte("Hello")) + }) + + retryListener := &countingRetryListener{} + retry, err := New(context.Background(), next, dynamic.Retry{Attempts: 1}, retryListener, "traefikTest") + require.NoError(t, err) + + server := httptest.NewServer(retry) + t.Cleanup(server.Close) + frontendClient := server.Client() + + checkLinkHeaders := func(t *testing.T, expected, got []string) { + t.Helper() + + if len(expected) != len(got) { + t.Errorf("Expected %d link headers; got %d", len(expected), len(got)) + } + + for i := range expected { + if i >= len(got) { + t.Errorf("Expected %q link header; got nothing", expected[i]) + + continue + } + + if expected[i] != got[i] { + t.Errorf("Expected %q link header; got %q", expected[i], got[i]) + } + } + } + + var respCounter uint8 + trace := &httptrace.ClientTrace{ + Got1xxResponse: func(code int, header textproto.MIMEHeader) error { + switch code { + case http.StatusEarlyHints: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script"}, header["Link"]) + case http.StatusProcessing: + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, header["Link"]) + default: + t.Error("Unexpected 1xx response") + } + + respCounter++ + + return nil + }, + } + req, _ := http.NewRequestWithContext(httptrace.WithClientTrace(context.Background(), trace), http.MethodGet, server.URL, nil) + + res, err := frontendClient.Do(req) + assert.Nil(t, err) + + defer res.Body.Close() + + if respCounter != 2 { + t.Errorf("Expected 2 1xx responses; got %d", respCounter) + } + checkLinkHeaders(t, []string{"; rel=preload; as=style", "; rel=preload; as=script", "; rel=preload; as=script"}, res.Header["Link"]) + + body, _ := io.ReadAll(res.Body) + if string(body) != "Hello" { + t.Errorf("Read body %q; want Hello", body) + } + + assert.Equal(t, 0, retryListener.timesCalled) +} From e62fe64ec931e06942f85f384b0d475cf44fe18c Mon Sep 17 00:00:00 2001 From: LandryBe Date: Thu, 15 Jun 2023 18:20:06 +0200 Subject: [PATCH 06/17] Encode query semicolons Co-authored-by: Romain --- .../reference/static-configuration/cli-ref.md | 3 + .../reference/static-configuration/env-ref.md | 3 + .../reference/static-configuration/file.toml | 1 + .../reference/static-configuration/file.yaml | 1 + docs/content/routing/entrypoints.md | 38 +++++++++++ .../fixtures/simple_encode_semicolons.toml | 32 +++++++++ integration/simple_test.go | 68 +++++++++++++++++++ pkg/config/static/entrypoints.go | 7 +- pkg/server/server_entrypoint_tcp.go | 26 ++++++- pkg/server/service/proxy.go | 1 + 10 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 integration/fixtures/simple_encode_semicolons.toml diff --git a/docs/content/reference/static-configuration/cli-ref.md b/docs/content/reference/static-configuration/cli-ref.md index 6b8537a7d..e9385b08b 100644 --- a/docs/content/reference/static-configuration/cli-ref.md +++ b/docs/content/reference/static-configuration/cli-ref.md @@ -114,6 +114,9 @@ Trust only forwarded headers from selected IPs. `--entrypoints..http`: HTTP configuration. +`--entrypoints..http.encodequerysemicolons`: +Defines whether request query semicolons should be URLEncoded. (Default: ```false```) + `--entrypoints..http.middlewares`: Default middlewares for the routers linked to the entry point. diff --git a/docs/content/reference/static-configuration/env-ref.md b/docs/content/reference/static-configuration/env-ref.md index f4b2b6def..184c4202b 100644 --- a/docs/content/reference/static-configuration/env-ref.md +++ b/docs/content/reference/static-configuration/env-ref.md @@ -123,6 +123,9 @@ HTTP/3 configuration. (Default: ```false```) `TRAEFIK_ENTRYPOINTS__HTTP3_ADVERTISEDPORT`: UDP port to advertise, on which HTTP/3 is available. (Default: ```0```) +`TRAEFIK_ENTRYPOINTS__HTTP_ENCODEQUERYSEMICOLONS`: +Defines whether request query semicolons should be URLEncoded. (Default: ```false```) + `TRAEFIK_ENTRYPOINTS__HTTP_MIDDLEWARES`: Default middlewares for the routers linked to the entry point. diff --git a/docs/content/reference/static-configuration/file.toml b/docs/content/reference/static-configuration/file.toml index 7d96d87f4..ca95739c9 100644 --- a/docs/content/reference/static-configuration/file.toml +++ b/docs/content/reference/static-configuration/file.toml @@ -30,6 +30,7 @@ trustedIPs = ["foobar", "foobar"] [entryPoints.EntryPoint0.http] middlewares = ["foobar", "foobar"] + encodeQuerySemicolons = true [entryPoints.EntryPoint0.http.redirections] [entryPoints.EntryPoint0.http.redirections.entryPoint] to = "foobar" diff --git a/docs/content/reference/static-configuration/file.yaml b/docs/content/reference/static-configuration/file.yaml index 435efb1ce..c3b6e830c 100644 --- a/docs/content/reference/static-configuration/file.yaml +++ b/docs/content/reference/static-configuration/file.yaml @@ -33,6 +33,7 @@ entryPoints: - foobar - foobar http: + encodeQuerySemicolons: true redirections: entryPoint: to: foobar diff --git a/docs/content/routing/entrypoints.md b/docs/content/routing/entrypoints.md index f20c0b456..305e69cd1 100644 --- a/docs/content/routing/entrypoints.md +++ b/docs/content/routing/entrypoints.md @@ -833,6 +833,44 @@ This section is a convenience to enable (permanent) redirecting of all incoming --entrypoints.foo.http.redirections.entrypoint.priority=10 ``` +### EncodeQuerySemicolons + +_Optional, Default=false_ + +The `encodeQuerySemicolons` option allows to enable query semicolons encoding. +One could use this option to avoid non-encoded semicolons to be interpreted as query parameter separators by Traefik. +When using this option, the non-encoded semicolons characters in query will be transmitted encoded to the backend. + +```yaml tab="File (YAML)" +entryPoints: + websecure: + address: ':443' + http: + encodeQuerySemicolons: true +``` + +```toml tab="File (TOML)" +[entryPoints.websecure] + address = ":443" + + [entryPoints.websecure.http] + encodeQuerySemicolons = true +``` + +```bash tab="CLI" +--entrypoints.websecure.address=:443 +--entrypoints.websecure.http.encodequerysemicolons=true +``` + +#### Examples + +| EncodeQuerySemicolons | Request Query | Resulting Request Query | +|-----------------------|---------------------|-------------------------| +| false | foo=bar;baz=bar | foo=bar&baz=bar | +| true | foo=bar;baz=bar | foo=bar%3Bbaz=bar | +| false | foo=bar&baz=bar;foo | foo=bar&baz=bar&foo | +| true | foo=bar&baz=bar;foo | foo=bar&baz=bar%3Bfoo | + ### Middlewares The list of middlewares that are prepended by default to the list of middlewares of each router associated to the named entry point. diff --git a/integration/fixtures/simple_encode_semicolons.toml b/integration/fixtures/simple_encode_semicolons.toml new file mode 100644 index 000000000..c460f361f --- /dev/null +++ b/integration/fixtures/simple_encode_semicolons.toml @@ -0,0 +1,32 @@ +[global] + checkNewVersion = false + sendAnonymousUsage = false + +[log] + level = "DEBUG" + +[entryPoints] + [entryPoints.web] + address = ":8000" + [entryPoints.encodeSemicolons] + address = ":8001" + [entryPoints.encodeSemicolons.http] + encodeQuerySemicolons = true + +[api] + insecure = true + +[providers.file] + filename = "{{ .SelfFilename }}" + +## dynamic configuration ## + +[http.routers] + [http.routers.router] + service = "service1" + rule = "Host(`other.localhost`)" + +[http.services] + [http.services.service1.loadBalancer] + [[http.services.service1.loadBalancer.servers]] + url = "{{ .Server1 }}" diff --git a/integration/simple_test.go b/integration/simple_test.go index e25f25cfb..baf7aa230 100644 --- a/integration/simple_test.go +++ b/integration/simple_test.go @@ -1412,3 +1412,71 @@ func (s *SimpleSuite) TestDebugLog(c *check.C) { c.Fail() } } + +func (s *SimpleSuite) TestEncodeSemicolons(c *check.C) { + s.createComposeProject(c, "base") + + s.composeUp(c) + defer s.composeDown(c) + + whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") + + file := s.adaptFile(c, "fixtures/simple_encode_semicolons.toml", struct { + Server1 string + }{whoami1URL}) + defer os.Remove(file) + + cmd, output := s.traefikCmd(withConfigFile(file)) + defer output(c) + + err := cmd.Start() + c.Assert(err, checker.IsNil) + defer s.killCmd(cmd) + + err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`other.localhost`)")) + c.Assert(err, checker.IsNil) + + testCases := []struct { + desc string + request string + target string + body string + expected int + }{ + { + desc: "Transforming semicolons", + request: "GET /?bar=toto;boo=titi HTTP/1.1\r\nHost: other.localhost\r\n\r\n", + target: "127.0.0.1:8000", + expected: http.StatusOK, + body: "bar=toto&boo=titi", + }, + { + desc: "Encoding semicolons", + request: "GET /?bar=toto&boo=titi;aaaa HTTP/1.1\r\nHost: other.localhost\r\n\r\n", + target: "127.0.0.1:8001", + expected: http.StatusOK, + body: "bar=toto&boo=titi%3Baaaa", + }, + } + + for _, test := range testCases { + conn, err := net.Dial("tcp", test.target) + c.Assert(err, checker.IsNil) + + _, err = conn.Write([]byte(test.request)) + c.Assert(err, checker.IsNil) + + resp, err := http.ReadResponse(bufio.NewReader(conn), nil) + c.Assert(err, checker.IsNil) + + if resp.StatusCode != test.expected { + c.Errorf("%s failed with %d instead of %d", test.desc, resp.StatusCode, test.expected) + } + + if test.body != "" { + body, err := io.ReadAll(resp.Body) + c.Assert(err, checker.IsNil) + c.Assert(string(body), checker.Contains, test.body) + } + } +} diff --git a/pkg/config/static/entrypoints.go b/pkg/config/static/entrypoints.go index f97d78e22..68ac9285e 100644 --- a/pkg/config/static/entrypoints.go +++ b/pkg/config/static/entrypoints.go @@ -57,9 +57,10 @@ func (ep *EntryPoint) SetDefaults() { // HTTPConfig is the HTTP configuration of an entry point. type HTTPConfig struct { - Redirections *Redirections `description:"Set of redirection" json:"redirections,omitempty" toml:"redirections,omitempty" yaml:"redirections,omitempty" export:"true"` - Middlewares []string `description:"Default middlewares for the routers linked to the entry point." json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"` - TLS *TLSConfig `description:"Default TLS configuration for the routers linked to the entry point." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"` + Redirections *Redirections `description:"Set of redirection" json:"redirections,omitempty" toml:"redirections,omitempty" yaml:"redirections,omitempty" export:"true"` + Middlewares []string `description:"Default middlewares for the routers linked to the entry point." json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"` + TLS *TLSConfig `description:"Default TLS configuration for the routers linked to the entry point." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"` + EncodeQuerySemicolons bool `description:"Defines whether request query semicolons should be URLEncoded." json:"encodeQuerySemicolons,omitempty" toml:"encodeQuerySemicolons,omitempty" yaml:"encodeQuerySemicolons,omitempty"` } // HTTP2Config is the HTTP2 configuration of an entry point. diff --git a/pkg/server/server_entrypoint_tcp.go b/pkg/server/server_entrypoint_tcp.go index 5d7095768..96cc29dc4 100644 --- a/pkg/server/server_entrypoint_tcp.go +++ b/pkg/server/server_entrypoint_tcp.go @@ -535,7 +535,11 @@ func createHTTPServer(ctx context.Context, ln net.Listener, configuration *stati return nil, err } - handler = http.AllowQuerySemicolons(handler) + if configuration.HTTP.EncodeQuerySemicolons { + handler = encodeQuerySemicolons(handler) + } else { + handler = http.AllowQuerySemicolons(handler) + } if withH2c { handler = h2c.NewHandler(handler, &http2.Server{ @@ -596,3 +600,23 @@ func (t *trackedConnection) Close() error { t.tracker.RemoveConnection(t.WriteCloser) return t.WriteCloser.Close() } + +// This function is inspired by http.AllowQuerySemicolons. +func encodeQuerySemicolons(h http.Handler) http.Handler { + return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + if strings.Contains(req.URL.RawQuery, ";") { + r2 := new(http.Request) + *r2 = *req + r2.URL = new(url.URL) + *r2.URL = *req.URL + + r2.URL.RawQuery = strings.ReplaceAll(req.URL.RawQuery, ";", "%3B") + // Because the reverse proxy director is building query params from requestURI it needs to be updated as well. + r2.RequestURI = r2.URL.RequestURI() + + h.ServeHTTP(rw, r2) + } else { + h.ServeHTTP(rw, req) + } + }) +} diff --git a/pkg/server/service/proxy.go b/pkg/server/service/proxy.go index 2669499bf..257c4ce0d 100644 --- a/pkg/server/service/proxy.go +++ b/pkg/server/service/proxy.go @@ -48,6 +48,7 @@ func buildProxy(passHostHeader *bool, responseForwarding *dynamic.ResponseForwar outReq.URL.Path = u.Path outReq.URL.RawPath = u.RawPath + // If a plugin/middleware adds semicolons in query params, they should be urlEncoded. outReq.URL.RawQuery = strings.ReplaceAll(u.RawQuery, ";", "&") outReq.RequestURI = "" // Outgoing request should not have RequestURI From 9cc9ed6a0c00403743fb70acd327f7251abd4bda Mon Sep 17 00:00:00 2001 From: green1052 Date: Sun, 18 Jun 2023 04:52:05 +0900 Subject: [PATCH 07/17] Fix typo --- docs/content/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/index.md b/docs/content/index.md index 11d996ea6..6bb820f50 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -24,7 +24,7 @@ Developing Traefik, our main goal is to make it simple to use, and we're sure yo !!! info - Join our user friendly and active [Community Forum]((https://community.traefik.io "Link to Traefik Community Forum") to discuss, learn, and connect with the traefik community. + Join our user friendly and active [Community Forum](https://community.traefik.io "Link to Traefik Community Forum") to discuss, learn, and connect with the traefik community. Using Traefik in your organization? Consider [Traefik Enterprise](https://traefik.io/traefik-enterprise/ "Lino to Traefik Enterprise"), our unified API Gateway and Ingress that simplifies the discovery, security, and deployment of APIs and microservices across any environment. From aae76408e22d173137cd5551bd0b955f21f40807 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 19 Jun 2023 12:00:06 +0200 Subject: [PATCH 08/17] Prepare release v2.10.2 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ script/gcg/traefik-bugfix.toml | 6 +++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1901b001..85ee95b67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## [v2.10.2](https://github.com/traefik/traefik/tree/v2.10.2) (2023-06-17) +[All Commits](https://github.com/traefik/traefik/compare/v2.10.1...v2.10.2) + +**Bug fixes:** +- **[acme]** Update go-acme/lego to v4.12.1 ([#9935](https://github.com/traefik/traefik/pull/9935) by [ldez](https://github.com/ldez)) +- **[acme]** Update go-acme/lego to v4.12.0 ([#9918](https://github.com/traefik/traefik/pull/9918) by [ldez](https://github.com/ldez)) +- **[acme]** Update go-acme/lego to v4.11.0 ([#9883](https://github.com/traefik/traefik/pull/9883) by [ldez](https://github.com/ldez)) +- **[acme]** Do not check for wildcard domains for non DNS challenge ([#9881](https://github.com/traefik/traefik/pull/9881) by [erkexzcx](https://github.com/erkexzcx)) +- **[k8s/crd]** Fix multiple subsets endpoint ([#9914](https://github.com/traefik/traefik/pull/9914) by [joaosilva15](https://github.com/joaosilva15)) +- **[k8s/ingress,k8s/crd,k8s,hub]** Clean code related to Hub ([#9894](https://github.com/traefik/traefik/pull/9894) by [ldez](https://github.com/ldez)) +- **[metrics]** Enable Prometheus provider cleanup when only the router's metrics level is activated ([#9887](https://github.com/traefik/traefik/pull/9887) by [rtribotte](https://github.com/rtribotte)) +- **[middleware]** Encode query semicolons ([#9943](https://github.com/traefik/traefik/pull/9943) by [LandryBe](https://github.com/LandryBe)) +- **[middleware]** Mssing trailer with custom errors middleware ([#9942](https://github.com/traefik/traefik/pull/9942) by [rtribotte](https://github.com/rtribotte)) +- **[middleware]** Support informational headers in middlewares redefining the response writer. ([#9938](https://github.com/traefik/traefik/pull/9938) by [rtribotte](https://github.com/rtribotte)) +- **[plugins]** Improve error messages related to plugins ([#9924](https://github.com/traefik/traefik/pull/9924) by [ldez](https://github.com/ldez)) +- **[tracing]** Update DataDog tracing dependency to v1.50.1 ([#9953](https://github.com/traefik/traefik/pull/9953) by [der-eismann](https://github.com/der-eismann)) + +**Documentation:** +- **[accesslogs]** Fix over-indented yaml configuration of access logs ([#9930](https://github.com/traefik/traefik/pull/9930) by [ufUNnxagpM](https://github.com/ufUNnxagpM)) +- **[tls]** Add FAQ documentation about TLS certificates ([#9868](https://github.com/traefik/traefik/pull/9868) by [rtribotte](https://github.com/rtribotte)) +- Fix typo ([#9966](https://github.com/traefik/traefik/pull/9966) by [green1052](https://github.com/green1052)) +- Add business callouts ([#9940](https://github.com/traefik/traefik/pull/9940) by [tomatokoolaid](https://github.com/tomatokoolaid)) +- Add logo for GitHub dark mode ([#9890](https://github.com/traefik/traefik/pull/9890) by [ldez](https://github.com/ldez)) + ## [v2.10.1](https://github.com/traefik/traefik/tree/v2.10.1) (2023-04-27) [All Commits](https://github.com/traefik/traefik/compare/v2.10.0...v2.10.1) diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index bc6c422ee..6a485662b 100644 --- a/script/gcg/traefik-bugfix.toml +++ b/script/gcg/traefik-bugfix.toml @@ -4,11 +4,11 @@ RepositoryName = "traefik" OutputType = "file" FileName = "traefik_changelog.md" -# example new bugfix v2.10.1 +# example new bugfix v2.10.2 CurrentRef = "v2.10" -PreviousRef = "v2.10.0" +PreviousRef = "v2.10.1" BaseBranch = "v2.10" -FutureCurrentRefName = "v2.10.1" +FutureCurrentRefName = "v2.10.2" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10 From 0e5898b2f8f3af433b100596ad75517dbac9af78 Mon Sep 17 00:00:00 2001 From: Jakob Miksch Date: Mon, 19 Jun 2023 14:36:05 +0200 Subject: [PATCH 09/17] Minor Typo --- docs/content/getting-started/concepts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/getting-started/concepts.md b/docs/content/getting-started/concepts.md index 2e99906a3..10e1787e4 100644 --- a/docs/content/getting-started/concepts.md +++ b/docs/content/getting-started/concepts.md @@ -11,7 +11,7 @@ This page explains the base concepts of Traefik. ## Introduction -Traefik is based on the concept of EntryPoints, Routers, Middelwares and Services. +Traefik is based on the concept of EntryPoints, Routers, Middlewares and Services. The main features include dynamic configuration, automatic service discovery, and support for multiple backends and protocols. From fa555d0d297991b0259edcc754fc50316eca3dad Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 19 Jun 2023 17:34:05 +0200 Subject: [PATCH 10/17] fix: Remove unnecessary data on release ci --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 349249162..746cf0d68 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -73,7 +73,7 @@ blocks: - curl -sSL -o /tmp/gh_${GH_VERSION}_linux_amd64.tar.gz https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz - tar -zxvf /tmp/gh_${GH_VERSION}_linux_amd64.tar.gz -C /tmp - sudo mv /tmp/gh_${GH_VERSION}_linux_amd64/bin/gh /usr/local/bin/gh - - sudo rm -rf ~/.phpbrew ~/.kerl ~/.sbt ~/.nvm ~/.npm ~/.kiex /usr/lib/jvm /opt/az /opt/firefox # Remove unnecessary data. + - sudo rm -rf ~/.phpbrew ~/.kerl ~/.sbt ~/.nvm ~/.npm ~/.kiex /usr/lib/jvm /opt/az /opt/firefox /usr/lib/google-cloud-sdk ~/.rbenv ~/.pip_download_cache # Remove unnecessary data. - sudo service docker stop && sudo umount /var/lib/docker && sudo service docker start # Unmounts the docker disk and the whole system disk is usable. jobs: - name: Release From 18077ff69a7195492743ec1b97e79d8306aa942a Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 19 Jun 2023 18:08:05 +0200 Subject: [PATCH 11/17] Update go-acme/lego to v4.12.2 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 27de095eb..bfcaf2529 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/fatih/structs v1.1.0 github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 - github.com/go-acme/lego/v4 v4.12.1 + github.com/go-acme/lego/v4 v4.12.2 github.com/go-check/check v0.0.0-00010101000000-000000000000 github.com/go-kit/kit v0.10.1-0.20200915143503-439c4d2ed3ea github.com/golang/protobuf v1.5.2 diff --git a/go.sum b/go.sum index c444150a2..cec22e6eb 100644 --- a/go.sum +++ b/go.sum @@ -666,8 +666,8 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-acme/lego/v4 v4.12.1 h1:Cy3FS7wADLNBqCLpz2wdfdNrThW9rZy8RCAfnUrL2uE= -github.com/go-acme/lego/v4 v4.12.1/go.mod h1:UZoOlhVmUYP/N0z4tEbfUjoCNHRZNObzqWZtT76DIsc= +github.com/go-acme/lego/v4 v4.12.2 h1:JyrneGpom0HdVAvPQdyo+6gEciOnFgSZwH42vaL/hxc= +github.com/go-acme/lego/v4 v4.12.2/go.mod h1:UZoOlhVmUYP/N0z4tEbfUjoCNHRZNObzqWZtT76DIsc= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= From 7741c68eaa719d114c6d7444c965b7ae373e46a6 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 19 Jun 2023 18:14:30 +0200 Subject: [PATCH 12/17] Prepare release v2.10.3 --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ee95b67..3596578bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [v2.10.3](https://github.com/traefik/traefik/tree/v2.10.3) (2023-06-17) +[All Commits](https://github.com/traefik/traefik/compare/v2.10.2...v2.10.3) + +**Bug fixes:** +- **[acme]** Update go-acme/lego to v4.12.2 ([#9935](https://github.com/traefik/traefik/pull/9971) by [ldez](https://github.com/ldez)) + ## [v2.10.2](https://github.com/traefik/traefik/tree/v2.10.2) (2023-06-17) [All Commits](https://github.com/traefik/traefik/compare/v2.10.1...v2.10.2) @@ -10,7 +16,7 @@ - **[k8s/ingress,k8s/crd,k8s,hub]** Clean code related to Hub ([#9894](https://github.com/traefik/traefik/pull/9894) by [ldez](https://github.com/ldez)) - **[metrics]** Enable Prometheus provider cleanup when only the router's metrics level is activated ([#9887](https://github.com/traefik/traefik/pull/9887) by [rtribotte](https://github.com/rtribotte)) - **[middleware]** Encode query semicolons ([#9943](https://github.com/traefik/traefik/pull/9943) by [LandryBe](https://github.com/LandryBe)) -- **[middleware]** Mssing trailer with custom errors middleware ([#9942](https://github.com/traefik/traefik/pull/9942) by [rtribotte](https://github.com/rtribotte)) +- **[middleware]** Missing trailer with custom errors middleware ([#9942](https://github.com/traefik/traefik/pull/9942) by [rtribotte](https://github.com/rtribotte)) - **[middleware]** Support informational headers in middlewares redefining the response writer. ([#9938](https://github.com/traefik/traefik/pull/9938) by [rtribotte](https://github.com/rtribotte)) - **[plugins]** Improve error messages related to plugins ([#9924](https://github.com/traefik/traefik/pull/9924) by [ldez](https://github.com/ldez)) - **[tracing]** Update DataDog tracing dependency to v1.50.1 ([#9953](https://github.com/traefik/traefik/pull/9953) by [der-eismann](https://github.com/der-eismann)) From 5fd6913ee587a779334e2e2d626b0ef2806a5ebf Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 20 Jun 2023 09:12:05 +0200 Subject: [PATCH 13/17] Fix OpenTelemetry metrics Co-authored-by: LandryBe <[lbenguigui@gmail.com](mailto:lbenguigui@gmail.com)> --- docs/content/observability/metrics/overview.md | 3 --- pkg/metrics/opentelemetry.go | 12 ++++++++++++ pkg/metrics/opentelemetry_test.go | 12 ++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/docs/content/observability/metrics/overview.md b/docs/content/observability/metrics/overview.md index 795d1a377..1d6f04b15 100644 --- a/docs/content/observability/metrics/overview.md +++ b/docs/content/observability/metrics/overview.md @@ -117,7 +117,6 @@ traefik.entrypoint.responses.bytes.total traefik_entrypoint_requests_total traefik_entrypoint_requests_tls_total traefik_entrypoint_request_duration_seconds -traefik_entrypoint_open_connections traefik_entrypoint_requests_bytes_total traefik_entrypoint_responses_bytes_total ``` @@ -169,7 +168,6 @@ traefik.router.responses.bytes.total traefik_router_requests_total traefik_router_requests_tls_total traefik_router_request_duration_seconds -traefik_router_open_connections traefik_router_requests_bytes_total traefik_router_responses_bytes_total ``` @@ -231,7 +229,6 @@ traefik.service.responses.bytes.total traefik_service_requests_total traefik_service_requests_tls_total traefik_service_request_duration_seconds -traefik_service_open_connections traefik_service_retries_total traefik_service_server_up traefik_service_requests_bytes_total diff --git a/pkg/metrics/opentelemetry.go b/pkg/metrics/opentelemetry.go index 5dda1d5d0..5e6ea3b68 100644 --- a/pkg/metrics/opentelemetry.go +++ b/pkg/metrics/opentelemetry.go @@ -70,6 +70,10 @@ func RegisterOpenTelemetry(ctx context.Context, config *types.OpenTelemetry) Reg reg.entryPointReqDurationHistogram, _ = NewHistogramWithScale(newOTLPHistogramFrom(meter, entryPointReqDurationName, "How long it took to process the request on an entrypoint, partitioned by status code, protocol, and method.", unit.Milliseconds), time.Second) + reg.entryPointReqsBytesCounter = newOTLPCounterFrom(meter, entryPointReqsBytesTotalName, + "The total size of requests in bytes handled by an entrypoint, partitioned by status code, protocol, and method.") + reg.entryPointRespsBytesCounter = newOTLPCounterFrom(meter, entryPointRespsBytesTotalName, + "The total size of responses in bytes handled by an entrypoint, partitioned by status code, protocol, and method.") } if config.AddRoutersLabels { @@ -80,6 +84,10 @@ func RegisterOpenTelemetry(ctx context.Context, config *types.OpenTelemetry) Reg reg.routerReqDurationHistogram, _ = NewHistogramWithScale(newOTLPHistogramFrom(meter, routerReqDurationName, "How long it took to process the request on a router, partitioned by service, status code, protocol, and method.", unit.Milliseconds), time.Second) + reg.routerReqsBytesCounter = newOTLPCounterFrom(meter, routerReqsBytesTotalName, + "The total size of requests in bytes handled by a router, partitioned by status code, protocol, and method.") + reg.routerRespsBytesCounter = newOTLPCounterFrom(meter, routerRespsBytesTotalName, + "The total size of responses in bytes handled by a router, partitioned by status code, protocol, and method.") } if config.AddServicesLabels { @@ -95,6 +103,10 @@ func RegisterOpenTelemetry(ctx context.Context, config *types.OpenTelemetry) Reg reg.serviceServerUpGauge = newOTLPGaugeFrom(meter, serviceServerUpName, "service server is up, described by gauge value of 0 or 1.", unit.Dimensionless) + reg.serviceReqsBytesCounter = newOTLPCounterFrom(meter, serviceReqsBytesTotalName, + "The total size of requests in bytes received by a service, partitioned by status code, protocol, and method.") + reg.serviceRespsBytesCounter = newOTLPCounterFrom(meter, serviceRespsBytesTotalName, + "The total size of responses in bytes returned by a service, partitioned by status code, protocol, and method.") } return reg diff --git a/pkg/metrics/opentelemetry_test.go b/pkg/metrics/opentelemetry_test.go index 4f174700c..4c6b49563 100644 --- a/pkg/metrics/opentelemetry_test.go +++ b/pkg/metrics/opentelemetry_test.go @@ -364,11 +364,15 @@ func TestOpenTelemetry(t *testing.T) { `({"name":"traefik_entrypoint_requests_total","description":"How many HTTP requests processed on an entrypoint, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"200"}},{"key":"entrypoint","value":{"stringValue":"test1"}},{"key":"method","value":{"stringValue":"GET"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, `({"name":"traefik_entrypoint_requests_tls_total","description":"How many HTTP requests with TLS processed on an entrypoint, partitioned by TLS Version and TLS cipher Used.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"entrypoint","value":{"stringValue":"test2"}},{"key":"tls_cipher","value":{"stringValue":"bar"}},{"key":"tls_version","value":{"stringValue":"foo"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, `({"name":"traefik_entrypoint_request_duration_seconds","description":"How long it took to process the request on an entrypoint, partitioned by status code, protocol, and method.","unit":"ms","histogram":{"dataPoints":\[{"attributes":\[{"key":"entrypoint","value":{"stringValue":"test3"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","count":"1","sum":10000,"bucketCounts":\["0","0","0","0","0","0","0","0","0","0","0","1"\],"explicitBounds":\[0.005,0.01,0.025,0.05,0.1,0.25,0.5,1,2.5,5,10\],"min":10000,"max":10000}\],"aggregationTemporality":2}})`, + `({"name":"traefik_entrypoint_requests_bytes_total","description":"The total size of requests in bytes handled by an entrypoint, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"200"}},{"key":"entrypoint","value":{"stringValue":"test1"}},{"key":"method","value":{"stringValue":"GET"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, + `({"name":"traefik_entrypoint_responses_bytes_total","description":"The total size of responses in bytes handled by an entrypoint, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"200"}},{"key":"entrypoint","value":{"stringValue":"test1"}},{"key":"method","value":{"stringValue":"GET"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, ) registry.EntryPointReqsCounter().With(nil, "entrypoint", "test1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) registry.EntryPointReqsTLSCounter().With("entrypoint", "test2", "tls_version", "foo", "tls_cipher", "bar").Add(1) registry.EntryPointReqDurationHistogram().With("entrypoint", "test3").Observe(10000) + registry.EntryPointReqsBytesCounter().With("entrypoint", "test1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + registry.EntryPointRespsBytesCounter().With("entrypoint", "test1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) msgEntrypoint := <-c assertMessage(t, *msgEntrypoint, expected) @@ -377,12 +381,16 @@ func TestOpenTelemetry(t *testing.T) { `({"name":"traefik_router_requests_total","description":"How many HTTP requests are processed on a router, partitioned by service, status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"(?:200|404)"}},{"key":"method","value":{"stringValue":"GET"}},{"key":"router","value":{"stringValue":"RouterReqsCounter"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1},{"attributes":\[{"key":"code","value":{"stringValue":"(?:200|404)"}},{"key":"method","value":{"stringValue":"GET"}},{"key":"router","value":{"stringValue":"RouterReqsCounter"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, `({"name":"traefik_router_requests_tls_total","description":"How many HTTP requests with TLS are processed on a router, partitioned by service, TLS Version, and TLS cipher Used.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"router","value":{"stringValue":"demo"}},{"key":"service","value":{"stringValue":"test"}},{"key":"tls_cipher","value":{"stringValue":"bar"}},{"key":"tls_version","value":{"stringValue":"foo"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, `({"name":"traefik_router_request_duration_seconds","description":"How long it took to process the request on a router, partitioned by service, status code, protocol, and method.","unit":"ms","histogram":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"200"}},{"key":"router","value":{"stringValue":"demo"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","count":"1","sum":10000,"bucketCounts":\["0","0","0","0","0","0","0","0","0","0","0","1"\],"explicitBounds":\[0.005,0.01,0.025,0.05,0.1,0.25,0.5,1,2.5,5,10\],"min":10000,"max":10000}\],"aggregationTemporality":2}})`, + `({"name":"traefik_router_requests_bytes_total","description":"The total size of requests in bytes handled by a router, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"404"}},{"key":"method","value":{"stringValue":"GET"}},{"key":"router","value":{"stringValue":"RouterReqsCounter"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, + `({"name":"traefik_router_responses_bytes_total","description":"The total size of responses in bytes handled by a router, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"404"}},{"key":"method","value":{"stringValue":"GET"}},{"key":"router","value":{"stringValue":"RouterReqsCounter"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, ) registry.RouterReqsCounter().With(nil, "router", "RouterReqsCounter", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) registry.RouterReqsCounter().With(nil, "router", "RouterReqsCounter", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) registry.RouterReqsTLSCounter().With("router", "demo", "service", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) registry.RouterReqDurationHistogram().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK)).Observe(10000) + registry.RouterReqsBytesCounter().With("router", "RouterReqsCounter", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + registry.RouterRespsBytesCounter().With("router", "RouterReqsCounter", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) msgRouter := <-c assertMessage(t, *msgRouter, expected) @@ -392,6 +400,8 @@ func TestOpenTelemetry(t *testing.T) { `({"name":"traefik_service_requests_tls_total","description":"How many HTTP requests with TLS processed on a service, partitioned by TLS version and TLS cipher.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"service","value":{"stringValue":"test"}},{"key":"tls_cipher","value":{"stringValue":"bar"}},{"key":"tls_version","value":{"stringValue":"foo"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, `({"name":"traefik_service_request_duration_seconds","description":"How long it took to process the request on a service, partitioned by status code, protocol, and method.","unit":"ms","histogram":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"200"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","count":"1","sum":10000,"bucketCounts":\["0","0","0","0","0","0","0","0","0","0","0","1"\],"explicitBounds":\[0.005,0.01,0.025,0.05,0.1,0.25,0.5,1,2.5,5,10\],"min":10000,"max":10000}\],"aggregationTemporality":2}})`, `({"name":"traefik_service_server_up","description":"service server is up, described by gauge value of 0 or 1.","unit":"1","gauge":{"dataPoints":\[{"attributes":\[{"key":"service","value":{"stringValue":"test"}},{"key":"url","value":{"stringValue":"http://127.0.0.1"}}\],"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, + `({"name":"traefik_service_requests_bytes_total","description":"The total size of requests in bytes received by a service, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"404"}},{"key":"method","value":{"stringValue":"GET"}},{"key":"service","value":{"stringValue":"ServiceReqsCounter"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, + `({"name":"traefik_service_responses_bytes_total","description":"The total size of responses in bytes returned by a service, partitioned by status code, protocol, and method.","unit":"1","sum":{"dataPoints":\[{"attributes":\[{"key":"code","value":{"stringValue":"404"}},{"key":"method","value":{"stringValue":"GET"}},{"key":"service","value":{"stringValue":"ServiceReqsCounter"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, ) registry.ServiceReqsCounter().With(nil, "service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) @@ -399,6 +409,8 @@ func TestOpenTelemetry(t *testing.T) { registry.ServiceReqsTLSCounter().With("service", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) registry.ServiceReqDurationHistogram().With("service", "test", "code", strconv.Itoa(http.StatusOK)).Observe(10000) registry.ServiceServerUpGauge().With("service", "test", "url", "http://127.0.0.1").Set(1) + registry.ServiceReqsBytesCounter().With("service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + registry.ServiceRespsBytesCounter().With("service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) msgService := <-c assertMessage(t, *msgService, expected) From 4fbe9b81ecb8d6d0ece62b74f19c484a9dc23221 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 20 Jun 2023 10:26:05 +0200 Subject: [PATCH 14/17] Remove support of the networking.k8s.io/v1beta1 APIVersion --- .golangci.yml | 8 +- docs/content/deprecation/features.md | 11 +- docs/content/migration/v2-to-v3.md | 9 +- docs/content/providers/kubernetes-ingress.md | 65 +-- .../routing/providers/kubernetes-ingress.md | 105 ---- integration/fixtures/k8s/03-ingress-https.yml | 9 +- integration/fixtures/k8s/03-ingress.yml | 9 +- integration/fixtures/k8s/08-ingressclass.yml | 33 +- integration/resources/compose/k8s.yml | 4 +- pkg/provider/kubernetes/ingress/client.go | 189 +------ .../kubernetes/ingress/client_mock_test.go | 65 +-- .../kubernetes/ingress/client_test.go | 70 --- pkg/provider/kubernetes/ingress/convert.go | 3 +- .../kubernetes/ingress/convert_test.go | 71 --- ...erent-namespace-with-same-service-name.yml | 102 ++++ ...espace-with-same-service-name_endpoint.yml | 29 -- ...mespace-with-same-service-name_ingress.yml | 37 -- ...mespace-with-same-service-name_service.yml | 24 - .../Double-Single-Service-Ingress.yml | 84 +++ ...Double-Single-Service-Ingress_endpoint.yml | 32 -- .../Double-Single-Service-Ingress_ingress.yml | 22 - .../Double-Single-Service-Ingress_service.yml | 22 - .../ingress/fixtures/Empty-ingresses.yml | 0 ...s-Two-rules-with-one-host-and-one-path.yml | 57 +++ ...es-with-one-host-and-one-path_endpoint.yml | 15 - ...les-with-one-host-and-one-path_ingress.yml | 22 - ...les-with-one-host-and-one-path_service.yml | 10 - ...ess.yml => Ingress-one-rule-host-only.yml} | 2 +- ...s-one-rule-with-one-host-and-two-paths.yml | 54 ++ ...e-with-one-host-and-two-paths_endpoint.yml | 15 - ...le-with-one-host-and-two-paths_ingress.yml | 19 - ...le-with-one-host-and-two-paths_service.yml | 10 - ...ss-one-rule-with-one-path-and-one-host.yml | 47 ++ ...le-with-one-path-and-one-host_endpoint.yml | 15 - ...ule-with-one-path-and-one-host_ingress.yml | 15 - ...ule-with-one-path-and-one-host_service.yml | 10 - .../Ingress-one-rule-with-two-paths.yml | 53 ++ ...gress-one-rule-with-two-paths_endpoint.yml | 15 - ...ngress-one-rule-with-two-paths_ingress.yml | 18 - ...ngress-one-rule-with-two-paths_service.yml | 10 - ...th-IPv6-endpoints-externalname-enabled.yml | 31 ++ ...endpoints-externalname-enabled_ingress.yml | 14 - ...endpoints-externalname-enabled_service.yml | 13 - .../fixtures/Ingress-with-IPv6-endpoints.yml | 66 +++ .../Ingress-with-IPv6-endpoints_endpoint.yml | 12 - .../Ingress-with-IPv6-endpoints_ingress.yml | 18 - .../Ingress-with-IPv6-endpoints_service.yml | 26 - ...ngress-with-a-bad-host-syntax_endpoint.yml | 15 - ...Ingress-with-a-bad-host-syntax_service.yml | 10 - ...ngress-with-a-bad-path-syntax_endpoint.yml | 15 - ...Ingress-with-a-bad-path-syntax_service.yml | 10 - ...e-on-one-path-with-https-(port-==-443).yml | 47 ++ ...path-with-https-(port-==-443)_endpoint.yml | 15 - ...-path-with-https-(port-==-443)_ingress.yml | 14 - ...-path-with-https-(port-==-443)_service.yml | 11 - ...ne-path-with-https-(portname-==-https).yml | 50 ++ ...ith-https-(portname-==-https)_endpoint.yml | 17 - ...with-https-(portname-==-https)_ingress.yml | 14 - ...with-https-(portname-==-https)_service.yml | 12 - ...ith-https-(portname-starts-with-https).yml | 50 ++ ...-(portname-starts-with-https)_endpoint.yml | 17 - ...s-(portname-starts-with-https)_ingress.yml | 14 - ...s-(portname-starts-with-https)_service.yml | 12 - .../Ingress-with-a-basic-rule-on-one-path.yml | 46 ++ ...with-a-basic-rule-on-one-path_endpoint.yml | 15 - ...-with-a-basic-rule-on-one-path_ingress.yml | 14 - ...-with-a-basic-rule-on-one-path_service.yml | 11 - ...d-port-matching-subset-of-service-pods.yml | 55 ++ ...tching-subset-of-service-pods_endpoint.yml | 20 - ...atching-subset-of-service-pods_ingress.yml | 15 - ...atching-subset-of-service-pods_service.yml | 14 - .../fixtures/Ingress-with-annotations.yml | 70 +++ .../Ingress-with-annotations_endpoint.yml | 15 - .../Ingress-with-annotations_ingress.yml | 28 - .../Ingress-with-annotations_service.yml | 21 - ...gress-with-conflicting-routers-on-host.yml | 58 +++ ...h-conflicting-routers-on-host_endpoint.yml | 15 - ...th-conflicting-routers-on-host_ingress.yml | 23 - ...th-conflicting-routers-on-host_service.yml | 10 - ...gress-with-conflicting-routers-on-path.yml | 54 ++ ...h-conflicting-routers-on-path_endpoint.yml | 15 - ...th-conflicting-routers-on-path_ingress.yml | 19 - ...th-conflicting-routers-on-path_service.yml | 10 - ...ress-with-default-traefik-ingressClass.yml | 44 ++ ...-default-traefik-ingressClass_endpoint.yml | 11 - ...h-default-traefik-ingressClass_ingress.yml | 16 - ...h-default-traefik-ingressClass_service.yml | 10 - .../fixtures/Ingress-with-defaultbackend.yml | 62 +++ ...ss.yml => Ingress-with-empty-pathType.yml} | 25 + .../fixtures/Ingress-with-exact-pathType.yml | 41 ++ ...-with-implementationSpecific-pathType.yml} | 27 +- .../Ingress-with-ingress-annotation.yml | 43 ++ ...s-with-ingressClass-without-annotation.yml | 44 ++ ...gressClass-without-annotation_endpoint.yml | 11 - ...ngressClass-without-annotation_ingress.yml | 16 - ...ngressClass-without-annotation_service.yml | 10 - .../fixtures/Ingress-with-ingressClass.yml | 51 ++ .../Ingress-with-ingressClasses-filter.yml | 77 +++ .../Ingress-with-missing-ingressClass.yml | 42 ++ .../Ingress-with-multiple-ingressClasses.yml | 77 +++ .../fixtures/Ingress-with-named-port.yml | 43 ++ .../Ingress-with-native-service-lb.yml | 34 ++ ...Ingress-with-native-service-lb_ingress.yml | 15 - ...Ingress-with-native-service-lb_service.yml | 15 - ...er-traefik-ingressClass-and-annotation.yml | 44 ++ ...k-ingressClass-and-annotation_endpoint.yml | 11 - ...ik-ingressClass-and-annotation_ingress.yml | 16 - ...ik-ingressClass-and-annotation_service.yml | 10 - .../Ingress-with-one-host-without-path.yml | 45 ++ ...ss-with-one-host-without-path_endpoint.yml | 12 - ...ess-with-one-host-without-path_ingress.yml | 14 - ...ess-with-one-host-without-path_service.yml | 12 - ...ress-with-one-service-without-endpoint.yml | 29 ++ ...h-one-service-without-endpoint_service.yml | 10 - ...-one-service-without-endpoints-subset.yml} | 25 +- ...vice-without-endpoints-subset_endpoint.yml | 5 - ...rvice-without-endpoints-subset_ingress.yml | 15 - ...rvice-without-endpoints-subset_service.yml | 10 - ...s-with-only-a-bad-host-syntax_endpoint.yml | 15 - ...ss-with-only-a-bad-host-syntax_service.yml | 10 - ...s-with-only-a-bad-path-syntax_endpoint.yml | 15 - ...ss-with-only-a-bad-path-syntax_service.yml | 10 - ...ress-with-port-invalid-for-one-service.yml | 63 +++ ...-port-invalid-for-one-service_endpoint.yml | 21 - ...h-port-invalid-for-one-service_ingress.yml | 15 - ...h-port-invalid-for-one-service_service.yml | 20 - ...port-name-in-backend-and-2-pod-replica.yml | 50 ++ ...-in-backend-and-2-pod-replica_endpoint.yml | 15 - ...e-in-backend-and-2-pod-replica_ingress.yml | 15 - ...e-in-backend-and-2-pod-replica_service.yml | 14 - ...ort-name-in-backend-and-no-pod-replica.yml | 56 ++ ...in-backend-and-no-pod-replica_endpoint.yml | 21 - ...-in-backend-and-no-pod-replica_ingress.yml | 15 - ...-in-backend-and-no-pod-replica_service.yml | 14 - ...rt-value-in-backend-and-no-pod-replica.yml | 56 ++ ...in-backend-and-no-pod-replica_endpoint.yml | 21 - ...-in-backend-and-no-pod-replica_ingress.yml | 15 - ...-in-backend-and-no-pod-replica_service.yml | 14 - .../fixtures/Ingress-with-prefix-pathType.yml | 41 ++ ...with-service-with-externalName-enabled.yml | 32 ++ ...vice-with-externalName-enabled_ingress.yml | 15 - ...vice-with-externalName-enabled_service.yml | 13 - ...Ingress-with-service-with-externalName.yml | 32 ++ ...with-service-with-externalName_ingress.yml | 15 - ...with-service-with-externalName_service.yml | 13 - ...with-two-different-rules-with-one-path.yml | 55 ++ ...different-rules-with-one-path_endpoint.yml | 15 - ...-different-rules-with-one-path_ingress.yml | 20 - ...-different-rules-with-one-path_service.yml | 10 - ...g-same-service-and-different-port-name.yml | 57 +++ ...rvice-and-different-port-name_endpoint.yml | 15 - ...ervice-and-different-port-name_ingress.yml | 19 - ...ervice-and-different-port-name_service.yml | 14 - .../fixtures/Ingress-with-two-services.yml | 86 ++++ .../Ingress-with-two-services_ingress.yml | 22 - .../Ingress-with-two-services_service.yml | 22 - ...Ingress-with-unknown-service-port-name.yml | 44 ++ ...ith-unknown-service-port-name_endpoint.yml | 12 - ...with-unknown-service-port-name_ingress.yml | 15 - ...with-unknown-service-port-name_service.yml | 10 - .../Ingress-with-unknown-service-port.yml | 44 ++ ...ess-with-unknown-service-port_endpoint.yml | 12 - ...ress-with-unknown-service-port_ingress.yml | 15 - ...ress-with-unknown-service-port_service.yml | 10 - .../fixtures/Ingress-with-wildcard-host.yml | 43 ++ .../Ingress-with-wildcard-host_endpoint.yml | 11 - .../Ingress-with-wildcard-host_ingress.yml | 15 - .../Ingress-with-wildcard-host_service.yml | 11 - ...ik-ingressClass-and-unknown-annotation.yml | 44 ++ ...sClass-and-unknown-annotation_endpoint.yml | 11 - ...ssClass-and-unknown-annotation_ingress.yml | 16 - ...ssClass-and-unknown-annotation_service.yml | 10 - ...e-Service-Ingress-(without-any-rules).yml} | 43 +- ...e-Ingress-(without-any-rules)_endpoint.yml | 15 - ...ce-Ingress-(without-any-rules)_ingress.yml | 10 - ...ce-Ingress-(without-any-rules)_service.yml | 10 - .../ingress/fixtures/TLS-support.yml | 97 ++++ .../ingress/fixtures/TLS-support_endpoint.yml | 12 - .../ingress/fixtures/TLS-support_ingress.yml | 38 -- .../ingress/fixtures/TLS-support_secret.yml | 9 - .../ingress/fixtures/TLS-support_service.yml | 26 - ...8-Ingress-with-empty-pathType_endpoint.yml | 11 - ...18-Ingress-with-empty-pathType_ingress.yml | 16 - ...18-Ingress-with-empty-pathType_service.yml | 10 - ...8-Ingress-with-exact-pathType_endpoint.yml | 11 - ...18-Ingress-with-exact-pathType_ingress.yml | 14 - ...18-Ingress-with-exact-pathType_service.yml | 10 - ...plementationSpecific-pathType_endpoint.yml | 11 - ...mplementationSpecific-pathType_ingress.yml | 16 - ...mplementationSpecific-pathType_service.yml | 10 - ...gress-with-ingress-annotation_endpoint.yml | 11 - ...ngress-with-ingress-annotation_ingress.yml | 15 - ...ngress-with-ingress-annotation_service.yml | 10 - ...v18-Ingress-with-ingressClass_endpoint.yml | 11 - .../v18-Ingress-with-ingressClass_ingress.yml | 14 - ...Ingress-with-ingressClass_ingressclass.yml | 6 - .../v18-Ingress-with-ingressClass_service.yml | 10 - ...ss-with-ingressClasses-filter_endpoint.yml | 11 - ...ess-with-ingressClasses-filter_ingress.yml | 30 -- ...ith-ingressClasses-filter_ingressclass.yml | 14 - ...ess-with-ingressClasses-filter_service.yml | 10 - ...ess-with-missing-ingressClass_endpoint.yml | 11 - ...ress-with-missing-ingressClass_ingress.yml | 14 - ...ress-with-missing-ingressClass_service.yml | 10 - ...-with-multiple-ingressClasses_endpoint.yml | 11 - ...s-with-multiple-ingressClasses_ingress.yml | 30 -- ...h-multiple-ingressClasses_ingressclass.yml | 14 - ...s-with-multiple-ingressClasses_service.yml | 10 - .../v18-Ingress-with-no-pathType_endpoint.yml | 11 - .../v18-Ingress-with-no-pathType_ingress.yml | 15 - .../v18-Ingress-with-no-pathType_service.yml | 10 - ...-Ingress-with-prefix-pathType_endpoint.yml | 11 - ...8-Ingress-with-prefix-pathType_ingress.yml | 14 - ...8-Ingress-with-prefix-pathType_service.yml | 10 - ...9-Ingress-with-defaultbackend_endpoint.yml | 24 - ...19-Ingress-with-defaultbackend_ingress.yml | 12 - ...19-Ingress-with-defaultbackend_service.yml | 22 - ...9-Ingress-with-empty-pathType_endpoint.yml | 11 - ...19-Ingress-with-empty-pathType_service.yml | 10 - ...9-Ingress-with-exact-pathType_endpoint.yml | 11 - ...19-Ingress-with-exact-pathType_ingress.yml | 16 - ...19-Ingress-with-exact-pathType_service.yml | 10 - ...plementationSpecific-pathType_endpoint.yml | 11 - ...mplementationSpecific-pathType_service.yml | 10 - ...gress-with-ingress-annotation_endpoint.yml | 11 - ...ngress-with-ingress-annotation_ingress.yml | 17 - ...ngress-with-ingress-annotation_service.yml | 10 - ...v19-Ingress-with-ingressClass_endpoint.yml | 11 - .../v19-Ingress-with-ingressClass_ingress.yml | 16 - ...Ingress-with-ingressClass_ingressclass.yml | 6 - .../v19-Ingress-with-ingressClass_service.yml | 10 - ...9-Ingress-with-ingressClassv1_endpoint.yml | 11 - ...19-Ingress-with-ingressClassv1_ingress.yml | 16 - ...gress-with-ingressClassv1_ingressclass.yml | 6 - ...19-Ingress-with-ingressClassv1_service.yml | 10 - ...ess-with-missing-ingressClass_endpoint.yml | 11 - ...ress-with-missing-ingressClass_ingress.yml | 16 - ...ress-with-missing-ingressClass_service.yml | 10 - .../v19-Ingress-with-named-port_endpoint.yml | 12 - .../v19-Ingress-with-named-port_ingress.yml | 16 - .../v19-Ingress-with-named-port_service.yml | 12 - .../v19-Ingress-with-no-pathType_endpoint.yml | 11 - .../v19-Ingress-with-no-pathType_ingress.yml | 17 - .../v19-Ingress-with-no-pathType_service.yml | 10 - ...-Ingress-with-prefix-pathType_endpoint.yml | 11 - ...9-Ingress-with-prefix-pathType_service.yml | 10 - pkg/provider/kubernetes/ingress/kubernetes.go | 4 +- .../kubernetes/ingress/kubernetes_test.go | 484 +----------------- 248 files changed, 2614 insertions(+), 3640 deletions(-) create mode 100644 pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Empty-ingresses.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_service.yml rename pkg/provider/kubernetes/ingress/fixtures/{Ingress-one-rule-host-only_ingress.yml => Ingress-one-rule-host-only.yml} (72%) create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443).yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https).yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https).yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-defaultbackend.yml rename pkg/provider/kubernetes/ingress/fixtures/{v19-Ingress-with-empty-pathType_ingress.yml => Ingress-with-empty-pathType.yml} (53%) create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-exact-pathType.yml rename pkg/provider/kubernetes/ingress/fixtures/{v19-Ingress-with-implementationSpecific-pathType_ingress.yml => Ingress-with-implementationSpecific-pathType.yml} (51%) create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingress-annotation.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClasses-filter.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-missing-ingressClass.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-multiple-ingressClasses.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-named-port.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint_service.yml rename pkg/provider/kubernetes/ingress/fixtures/{v19-Ingress-with-prefix-pathType_ingress.yml => Ingress-with-one-service-without-endpoints-subset.yml} (51%) delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-prefix-pathType.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_service.yml rename pkg/provider/kubernetes/ingress/fixtures/{Ingress-with-two-services_endpoint.yml => Single-Service-Ingress-(without-any-rules).yml} (50%) delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_service.yml create mode 100644 pkg/provider/kubernetes/ingress/fixtures/TLS-support.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/TLS-support_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/TLS-support_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/TLS-support_secret.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/TLS-support_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingressclass.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingressclass.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingressclass.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingressclass.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingressclass.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_ingress.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_service.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_endpoint.yml delete mode 100644 pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_service.yml diff --git a/.golangci.yml b/.golangci.yml index c28db5839..3b42c4aad 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,6 +33,10 @@ linters-settings: desc: not allowed - pkg: "github.com/pkg/errors" desc: Should be replaced by standard lib errors package + - pkg: "k8s.io/api/networking/v1beta1" + desc: This API is deprecated + - pkg: "k8s.io/api/extensions/v1beta1" + desc: This API is deprecated godox: keywords: - FIXME @@ -47,14 +51,10 @@ linters-settings: pkg: "k8s.io/api/core/v1" - alias: netv1 pkg: "k8s.io/api/networking/v1" - - alias: netv1beta1 - pkg: "k8s.io/api/networking/v1beta1" - alias: admv1 pkg: "k8s.io/api/admission/v1" - alias: admv1beta1 pkg: "k8s.io/api/admission/v1beta1" - - alias: extv1beta1 - pkg: "k8s.io/api/extensions/v1beta1" - alias: metav1 pkg: "k8s.io/apimachinery/pkg/apis/meta/v1" - alias: ktypes diff --git a/docs/content/deprecation/features.md b/docs/content/deprecation/features.md index fa41c56b0..f74a0bd2d 100644 --- a/docs/content/deprecation/features.md +++ b/docs/content/deprecation/features.md @@ -2,12 +2,17 @@ This page is maintained and updated periodically to reflect our roadmap and any decisions around feature deprecation. -| Feature | Deprecated | End of Support | Removal | -|-----------------------------------------------------------------------------------------------------|------------|----------------|---------| -| [Kubernetes CRDs API Version `traefik.io/v1alpha1`](#kubernetes-crds-api-version-traefikiov1alpha1) | N/A | N/A | 3.0 | +| Feature | Deprecated | End of Support | Removal | +|----------------------------------------------------------------------------------------------------------------------|------------|----------------|---------| +| [Kubernetes CRDs API Version `traefik.io/v1alpha1`](#kubernetes-crds-api-version-traefikiov1alpha1) | N/A | N/A | 3.0 | +| [Kubernetes Ingress API Version `networking.k8s.io/v1beta1`](#kubernetes-ingress-api-version-networkingk8siov1beta1) | N/A | N/A | 3.0 | ## Impact ### Kubernetes CRDs API Version `traefik.io/v1alpha1` The newly introduced Kubernetes CRD API Version `traefik.io/v1alpha1` will subsequently be removed in Traefik v3. The following version will be `traefik.io/v1`. + +### Kubernetes Ingress API Version `networking.k8s.io/v1beta1` + +The Kubernetes Ingress API Version `networking.k8s.io/v1beta1` is removed in v3. Please use the API Group `networking.k8s.io/v1` instead. diff --git a/docs/content/migration/v2-to-v3.md b/docs/content/migration/v2-to-v3.md index 6de93ca9c..1f5f0de46 100644 --- a/docs/content/migration/v2-to-v3.md +++ b/docs/content/migration/v2-to-v3.md @@ -85,7 +85,7 @@ In v3, the InfluxDB v1 metrics provider has been removed because InfluxDB v1.x m ### Kubernetes CRDs API Group `traefik.containo.us` -In v3 the Kubernetes CRDs API Group `traefik.containo.us` has been removed. +In v3, the Kubernetes CRDs API Group `traefik.containo.us` has been removed. Please use the API Group `traefik.io` instead. ## Docker & Docker Swarm @@ -94,3 +94,10 @@ In v3, the provider Docker has been split into 2 providers: - Docker provider (without Swarm support) - Swarm provider (Swarm support only) + +### Kubernetes Ingress API Group `networking.k8s.io/v1beta1` + +As v3 is targeting support for Kubernetes v1.23+, +the Kubernetes Ingress API Group `networking.k8s.io/v1beta1` ([removed since Kubernetes v1.22](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122)) support has been removed. + +Please use the API Group `networking.k8s.io/v1` instead. diff --git a/docs/content/providers/kubernetes-ingress.md b/docs/content/providers/kubernetes-ingress.md index d6eb1b4e9..b51d87d79 100644 --- a/docs/content/providers/kubernetes-ingress.md +++ b/docs/content/providers/kubernetes-ingress.md @@ -13,7 +13,7 @@ it manages access to cluster services by supporting the [Ingress](https://kubern ## Requirements -Traefik supports `1.14+` Kubernetes clusters. +Traefik supports `1.23+` Kubernetes clusters. ## Routing Configuration @@ -68,28 +68,6 @@ spec: number: 80 ``` -```yaml tab="Ingress v1beta1 (deprecated)" -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: foo - namespace: production - -spec: - rules: - - host: example.net - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - path: /foo - backend: - serviceName: service1 - servicePort: 80 -``` - ## LetsEncrypt Support with the Ingress Provider By design, Traefik is a stateless application, @@ -257,46 +235,7 @@ Value of `kubernetes.io/ingress.class` annotation that identifies Ingress object If the parameter is set, only Ingresses containing an annotation with the same value are processed. Otherwise, Ingresses missing the annotation, having an empty value, or the value `traefik` are processed. -??? info "Kubernetes 1.18+" - - If the Kubernetes cluster version is 1.18+, - the new `IngressClass` resource can be leveraged to identify Ingress objects that should be processed. - In that case, Traefik will look for an `IngressClass` in the cluster with the controller value equal to *traefik.io/ingress-controller*. - - In addition to the controller value matching mechanism, the property `ingressClass` (if set) will be used to select IngressClasses by applying a strict matching on their name. - - Please see [this article](https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/) for more information or the example below. - - ```yaml tab="IngressClass" - apiVersion: networking.k8s.io/v1beta1 - kind: IngressClass - metadata: - name: traefik-lb - spec: - controller: traefik.io/ingress-controller - ``` - - ```yaml tab="Ingress" - apiVersion: networking.k8s.io/v1beta1 - kind: Ingress - metadata: - name: example-ingress - spec: - ingressClassName: traefik-lb - rules: - - host: "*.example.com" - http: - paths: - - path: /example - backend: - serviceName: example-service - servicePort: 80 - ``` - -??? info "Kubernetes 1.19+" - - If the Kubernetes cluster version is 1.19+, - prefer using the `networking.k8s.io/v1` [apiVersion](https://v1-19.docs.kubernetes.io/docs/setup/release/notes/#api-change) of `Ingress` and `IngressClass`. +??? info "Example" ```yaml tab="IngressClass" apiVersion: networking.k8s.io/v1 diff --git a/docs/content/routing/providers/kubernetes-ingress.md b/docs/content/routing/providers/kubernetes-ingress.md index bb87501c4..5f9a32073 100644 --- a/docs/content/routing/providers/kubernetes-ingress.md +++ b/docs/content/routing/providers/kubernetes-ingress.md @@ -97,29 +97,6 @@ which in turn will create the resulting routers, services, handlers, etc. number: 80 ``` - ```yaml tab="Ingress v1beta1 (deprecated)" - apiVersion: networking.k8s.io/v1beta1 - kind: Ingress - metadata: - name: myingress - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: web - - spec: - rules: - - host: example.com - http: - paths: - - path: /bar - backend: - serviceName: whoami - servicePort: 80 - - path: /foo - backend: - serviceName: whoami - servicePort: 80 - ``` - ```yaml tab="Traefik" apiVersion: v1 kind: ServiceAccount @@ -500,29 +477,6 @@ This way, any Ingress attached to this Entrypoint will have TLS termination by d number: 80 ``` - ```yaml tab="Ingress v1beta1 (deprecated)" - apiVersion: networking.k8s.io/v1beta1 - kind: Ingress - metadata: - name: myingress - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: websecure - - spec: - rules: - - host: example.com - http: - paths: - - path: /bar - backend: - serviceName: whoami - servicePort: 80 - - path: /foo - backend: - serviceName: whoami - servicePort: 80 - ``` - ```yaml tab="Traefik" apiVersion: v1 kind: ServiceAccount @@ -709,30 +663,6 @@ For more options, please refer to the available [annotations](#on-ingress). number: 80 ``` - ```yaml tab="Ingress v1beta1 (deprecated)" - apiVersion: networking.k8s.io/v1beta1 - kind: Ingress - metadata: - name: myingress - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: websecure - traefik.ingress.kubernetes.io/router.tls: true - - spec: - rules: - - host: example.com - http: - paths: - - path: /bar - backend: - serviceName: whoami - servicePort: 80 - - path: /foo - backend: - serviceName: whoami - servicePort: 80 - ``` - ```yaml tab="Traefik" apiVersion: v1 kind: ServiceAccount @@ -856,29 +786,6 @@ For more options, please refer to the available [annotations](#on-ingress). - secretName: supersecret ``` - ```yaml tab="Ingress v1beta1 (deprecated)" - apiVersion: networking.k8s.io/v1beta1 - kind: Ingress - metadata: - name: foo - namespace: production - - spec: - rules: - - host: example.net - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - # Only selects which certificate(s) should be loaded from the secret, in order to terminate TLS. - # Doesn't enable TLS for that ingress (hence for the underlying router). - # Please see the TLS annotations on ingress made for that purpose. - tls: - - secretName: supersecret - ``` - ```yaml tab="Secret" apiVersion: v1 kind: Secret @@ -947,18 +854,6 @@ spec: number: 80 ``` -```yaml tab="Ingress v1beta1 (deprecated)" -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: cheese - -spec: - defaultBackend: - serviceName: stilton - serverPort: 80 -``` - This ingress follows the Global Default Backend property of ingresses. This will allow users to create a "default router" that will match all unmatched requests. diff --git a/integration/fixtures/k8s/03-ingress-https.yml b/integration/fixtures/k8s/03-ingress-https.yml index dc6ec813a..c466f7252 100644 --- a/integration/fixtures/k8s/03-ingress-https.yml +++ b/integration/fixtures/k8s/03-ingress-https.yml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: test.ingress.https @@ -11,7 +11,10 @@ spec: paths: - path: /whoami backend: - serviceName: whoami - servicePort: http + service: + name: whoami + port: + name: http + pathType: Prefix tls: - secretName: tls-cert diff --git a/integration/fixtures/k8s/03-ingress.yml b/integration/fixtures/k8s/03-ingress.yml index 22dde97cc..4985784b9 100644 --- a/integration/fixtures/k8s/03-ingress.yml +++ b/integration/fixtures/k8s/03-ingress.yml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: test.ingress @@ -13,5 +13,8 @@ spec: paths: - path: /whoami backend: - serviceName: whoami - servicePort: http + service: + name: whoami + port: + name: http + pathType: Prefix diff --git a/integration/fixtures/k8s/08-ingressclass.yml b/integration/fixtures/k8s/08-ingressclass.yml index 7ae47a208..c679cbbfb 100644 --- a/integration/fixtures/k8s/08-ingressclass.yml +++ b/integration/fixtures/k8s/08-ingressclass.yml @@ -1,4 +1,4 @@ -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: traefik-keep @@ -7,7 +7,7 @@ spec: --- kind: Ingress -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 metadata: name: "whoami-keep-route" spec: @@ -18,11 +18,14 @@ spec: paths: - path: "/keep" backend: - serviceName: "whoami" - servicePort: 80 + service: + name: whoami + port: + number: 80 + pathType: Prefix --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: traefik-drop @@ -31,7 +34,7 @@ spec: --- kind: Ingress -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 metadata: name: "whoami-drop-route" spec: @@ -42,11 +45,14 @@ spec: paths: - path: "/drop" backend: - serviceName: "whoami" - servicePort: 80 + service: + name: whoami + port: + number: 80 + pathType: Prefix --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: traefik-not-ingress-controller @@ -55,7 +61,7 @@ spec: --- kind: Ingress -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 metadata: name: "whoami-drop-ingress" spec: @@ -66,5 +72,8 @@ spec: paths: - path: "/ingress" backend: - serviceName: "whoami" - servicePort: 80 + service: + name: whoami + port: + number: 80 + pathType: Prefix diff --git a/integration/resources/compose/k8s.yml b/integration/resources/compose/k8s.yml index 7b15d5ed4..d718743c1 100644 --- a/integration/resources/compose/k8s.yml +++ b/integration/resources/compose/k8s.yml @@ -1,7 +1,7 @@ version: "3.8" services: server: - image: rancher/k3s:v1.20.15-k3s1 + image: rancher/k3s:v1.23.17-k3s1 command: server --disable-agent --no-deploy coredns --no-deploy servicelb --no-deploy traefik --no-deploy local-storage --no-deploy metrics-server --log /output/k3s.log --bind-address=server --tls-san=server environment: K3S_CLUSTER_SECRET: somethingtotallyrandom @@ -12,7 +12,7 @@ services: - ./fixtures/k8s:/var/lib/rancher/k3s/server/manifests node: - image: rancher/k3s:v1.20.15-k3s1 + image: rancher/k3s:v1.23.17-k3s1 privileged: true environment: K3S_URL: https://server:6443 diff --git a/pkg/provider/kubernetes/ingress/client.go b/pkg/provider/kubernetes/ingress/client.go index b0388e1fa..8bbdbc637 100644 --- a/pkg/provider/kubernetes/ingress/client.go +++ b/pkg/provider/kubernetes/ingress/client.go @@ -15,11 +15,9 @@ import ( traefikversion "github.com/traefik/traefik/v3/pkg/version" corev1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" - netv1beta1 "k8s.io/api/networking/v1beta1" kerror "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/util/intstr" kinformers "k8s.io/client-go/informers" kclientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" @@ -42,7 +40,6 @@ type Client interface { GetSecret(namespace, name string) (*corev1.Secret, bool, error) GetEndpoints(namespace, name string) (*corev1.Endpoints, bool, error) UpdateIngressStatus(ing *netv1.Ingress, ingStatus []netv1.IngressLoadBalancerIngress) error - GetServerVersion() *version.Version } type clientWrapper struct { @@ -167,16 +164,9 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (< for _, ns := range namespaces { factoryIngress := kinformers.NewSharedInformerFactoryWithOptions(c.clientset, resyncPeriod, kinformers.WithNamespace(ns), kinformers.WithTweakListOptions(matchesLabelSelector)) - if supportsNetworkingV1Ingress(serverVersion) { - _, err = factoryIngress.Networking().V1().Ingresses().Informer().AddEventHandler(eventHandler) - if err != nil { - return nil, err - } - } else { - _, err = factoryIngress.Networking().V1beta1().Ingresses().Informer().AddEventHandler(eventHandler) - if err != nil { - return nil, err - } + _, err = factoryIngress.Networking().V1().Ingresses().Informer().AddEventHandler(eventHandler) + if err != nil { + return nil, err } c.factoriesIngress[ns] = factoryIngress @@ -226,19 +216,12 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (< } } - if !c.disableIngressClassInformer && supportsIngressClass(serverVersion) { + if !c.disableIngressClassInformer { c.clusterFactory = kinformers.NewSharedInformerFactoryWithOptions(c.clientset, resyncPeriod) - if supportsNetworkingV1Ingress(serverVersion) { - _, err = c.clusterFactory.Networking().V1().IngressClasses().Informer().AddEventHandler(eventHandler) - if err != nil { - return nil, err - } - } else { - _, err = c.clusterFactory.Networking().V1beta1().IngressClasses().Informer().AddEventHandler(eventHandler) - if err != nil { - return nil, err - } + _, err = c.clusterFactory.Networking().V1().IngressClasses().Informer().AddEventHandler(eventHandler) + if err != nil { + return nil, err } c.clusterFactory.Start(stopCh) @@ -257,98 +240,26 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (< func (c *clientWrapper) GetIngresses() []*netv1.Ingress { var results []*netv1.Ingress - isNetworkingV1Supported := supportsNetworkingV1Ingress(c.serverVersion) - for ns, factory := range c.factoriesIngress { - if isNetworkingV1Supported { - // networking - listNew, err := factory.Networking().V1().Ingresses().Lister().List(labels.Everything()) - if err != nil { - log.Error().Err(err).Msgf("Failed to list ingresses in namespace %s", ns) - continue - } - - results = append(results, listNew...) - continue - } - - // networking beta - list, err := factory.Networking().V1beta1().Ingresses().Lister().List(labels.Everything()) + // networking + listNew, err := factory.Networking().V1().Ingresses().Lister().List(labels.Everything()) if err != nil { log.Error().Err(err).Msgf("Failed to list ingresses in namespace %s", ns) continue } - for _, ing := range list { - n, err := convert[netv1.Ingress](ing) - if err != nil { - log.Error().Err(err).Msgf("Failed to convert ingress %s from networking/v1beta1 to networking/v1", ns) - continue - } - - addServiceFromV1Beta1(n, *ing) - - results = append(results, n) - } + results = append(results, listNew...) } + return results } -func addServiceFromV1Beta1(ing *netv1.Ingress, old netv1beta1.Ingress) { - if old.Spec.Backend != nil { - port := netv1.ServiceBackendPort{} - if old.Spec.Backend.ServicePort.Type == intstr.Int { - port.Number = old.Spec.Backend.ServicePort.IntVal - } else { - port.Name = old.Spec.Backend.ServicePort.StrVal - } - - if old.Spec.Backend.ServiceName != "" { - ing.Spec.DefaultBackend = &netv1.IngressBackend{ - Service: &netv1.IngressServiceBackend{ - Name: old.Spec.Backend.ServiceName, - Port: port, - }, - } - } - } - - for rc, rule := range ing.Spec.Rules { - if rule.HTTP == nil { - continue - } - for pc, path := range rule.HTTP.Paths { - if path.Backend.Service == nil { - oldBackend := old.Spec.Rules[rc].HTTP.Paths[pc].Backend - - port := netv1.ServiceBackendPort{} - if oldBackend.ServicePort.Type == intstr.Int { - port.Number = oldBackend.ServicePort.IntVal - } else { - port.Name = oldBackend.ServicePort.StrVal - } - - svc := netv1.IngressServiceBackend{ - Name: oldBackend.ServiceName, - Port: port, - } - - ing.Spec.Rules[rc].HTTP.Paths[pc].Backend.Service = &svc - } - } - } -} - // UpdateIngressStatus updates an Ingress with a provided status. func (c *clientWrapper) UpdateIngressStatus(src *netv1.Ingress, ingStatus []netv1.IngressLoadBalancerIngress) error { if !c.isWatchedNamespace(src.Namespace) { return fmt.Errorf("failed to get ingress %s/%s: namespace is not within watched namespaces", src.Namespace, src.Name) } - if !supportsNetworkingV1Ingress(c.serverVersion) { - return c.updateIngressStatusOld(src, ingStatus) - } - ing, err := c.factoriesIngress[c.lookupNamespace(src.Namespace)].Networking().V1().Ingresses().Lister().Ingresses(src.Namespace).Get(src.Name) if err != nil { return fmt.Errorf("failed to get ingress %s/%s: %w", src.Namespace, src.Name, err) @@ -376,43 +287,6 @@ func (c *clientWrapper) UpdateIngressStatus(src *netv1.Ingress, ingStatus []netv return nil } -func (c *clientWrapper) updateIngressStatusOld(src *netv1.Ingress, ingStatus []netv1.IngressLoadBalancerIngress) error { - ing, err := c.factoriesIngress[c.lookupNamespace(src.Namespace)].Networking().V1beta1().Ingresses().Lister().Ingresses(src.Namespace).Get(src.Name) - if err != nil { - return fmt.Errorf("failed to get ingress %s/%s: %w", src.Namespace, src.Name, err) - } - - logger := log.With().Str("namespace", ing.Namespace).Str("ingress", ing.Name).Logger() - - ingresses, err := convertSlice[netv1.IngressLoadBalancerIngress](ing.Status.LoadBalancer.Ingress) - if err != nil { - return err - } - - if isLoadBalancerIngressEquals(ingresses, ingStatus) { - logger.Debug().Msg("Skipping ingress status update") - return nil - } - - ingressesBeta1, err := convertSlice[netv1beta1.IngressLoadBalancerIngress](ingStatus) - if err != nil { - return err - } - - ingCopy := ing.DeepCopy() - ingCopy.Status = netv1beta1.IngressStatus{LoadBalancer: netv1beta1.IngressLoadBalancerStatus{Ingress: ingressesBeta1}} - - ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout) - defer cancel() - - _, err = c.clientset.NetworkingV1beta1().Ingresses(ingCopy.Namespace).UpdateStatus(ctx, ingCopy, metav1.UpdateOptions{}) - if err != nil { - return fmt.Errorf("failed to update ingress status %s/%s: %w", src.Namespace, src.Name, err) - } - logger.Info().Msg("Updated ingress status") - return nil -} - // isLoadBalancerIngressEquals returns true if the given slices are equal, false otherwise. func isLoadBalancerIngressEquals(aSlice, bSlice []netv1.IngressLoadBalancerIngress) bool { if len(aSlice) != len(bSlice) { @@ -472,26 +346,6 @@ func (c *clientWrapper) GetIngressClasses() ([]*netv1.IngressClass, error) { } var ics []*netv1.IngressClass - if !supportsNetworkingV1Ingress(c.serverVersion) { - ingressClasses, err := c.clusterFactory.Networking().V1beta1().IngressClasses().Lister().List(labels.Everything()) - if err != nil { - return nil, err - } - - for _, ic := range ingressClasses { - if ic.Spec.Controller == traefikDefaultIngressClassController { - icN, err := convert[netv1.IngressClass](ic) - if err != nil { - log.Error().Err(err).Msgf("Failed to convert ingress class %s from networking/v1beta1 to networking/v1", ic.Name) - continue - } - ics = append(ics, icN) - } - } - - return ics, nil - } - ingressClasses, err := c.clusterFactory.Networking().V1().IngressClasses().Lister().List(labels.Everything()) if err != nil { return nil, err @@ -519,11 +373,6 @@ func (c *clientWrapper) lookupNamespace(ns string) string { return ns } -// GetServerVersion returns the cluster server version, or an error. -func (c *clientWrapper) GetServerVersion() *version.Version { - return c.serverVersion -} - // translateNotFoundError will translate a "not found" error to a boolean return // value which indicates if the resource exists and a nil error. func translateNotFoundError(err error) (bool, error) { @@ -547,14 +396,6 @@ func (c *clientWrapper) isWatchedNamespace(ns string) bool { return false } -// IngressClass objects are supported since Kubernetes v1.18. -// See https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class -func supportsIngressClass(serverVersion *version.Version) bool { - ingressClassVersion := version.Must(version.NewVersion("1.18")) - - return ingressClassVersion.LessThanOrEqual(serverVersion) -} - // filterIngressClassByName return a slice containing ingressclasses with the correct name. func filterIngressClassByName(ingressClassName string, ics []*netv1.IngressClass) []*netv1.IngressClass { var ingressClasses []*netv1.IngressClass @@ -567,11 +408,3 @@ func filterIngressClassByName(ingressClassName string, ics []*netv1.IngressClass return ingressClasses } - -// Ingress in networking.k8s.io/v1 is supported starting 1.19. -// thus, we query it in K8s starting 1.19. -func supportsNetworkingV1Ingress(serverVersion *version.Version) bool { - ingressNetworkingVersion := version.Must(version.NewVersion("1.19")) - - return serverVersion.GreaterThanOrEqual(ingressNetworkingVersion) -} diff --git a/pkg/provider/kubernetes/ingress/client_mock_test.go b/pkg/provider/kubernetes/ingress/client_mock_test.go index 518797a8c..6f565b25c 100644 --- a/pkg/provider/kubernetes/ingress/client_mock_test.go +++ b/pkg/provider/kubernetes/ingress/client_mock_test.go @@ -4,11 +4,9 @@ import ( "fmt" "os" - "github.com/hashicorp/go-version" "github.com/traefik/traefik/v3/pkg/provider/kubernetes/k8s" corev1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" - netv1beta1 "k8s.io/api/networking/v1beta1" ) var _ Client = (*clientMock)(nil) @@ -20,8 +18,6 @@ type clientMock struct { endpoints []*corev1.Endpoints ingressClasses []*netv1.IngressClass - serverVersion *version.Version - apiServiceError error apiSecretError error apiEndpointsError error @@ -30,46 +26,29 @@ type clientMock struct { watchChan chan interface{} } -func newClientMock(serverVersion string, paths ...string) clientMock { +func newClientMock(path string) clientMock { c := clientMock{} - c.serverVersion = version.Must(version.NewVersion(serverVersion)) + yamlContent, err := os.ReadFile(path) + if err != nil { + panic(fmt.Errorf("unable to read file %q: %w", path, err)) + } - for _, path := range paths { - yamlContent, err := os.ReadFile(path) - if err != nil { - panic(err) - } - - k8sObjects := k8s.MustParseYaml(yamlContent) - for _, obj := range k8sObjects { - switch o := obj.(type) { - case *corev1.Service: - c.services = append(c.services, o) - case *corev1.Secret: - c.secrets = append(c.secrets, o) - case *corev1.Endpoints: - c.endpoints = append(c.endpoints, o) - case *netv1beta1.Ingress: - ing, err := convert[netv1.Ingress](o) - if err != nil { - panic(err) - } - addServiceFromV1Beta1(ing, *o) - c.ingresses = append(c.ingresses, ing) - case *netv1.Ingress: - c.ingresses = append(c.ingresses, o) - case *netv1beta1.IngressClass: - ic, err := convert[netv1.IngressClass](o) - if err != nil { - panic(err) - } - c.ingressClasses = append(c.ingressClasses, ic) - case *netv1.IngressClass: - c.ingressClasses = append(c.ingressClasses, o) - default: - panic(fmt.Sprintf("Unknown runtime object %+v %T", o, o)) - } + k8sObjects := k8s.MustParseYaml(yamlContent) + for _, obj := range k8sObjects { + switch o := obj.(type) { + case *corev1.Service: + c.services = append(c.services, o) + case *corev1.Secret: + c.secrets = append(c.secrets, o) + case *corev1.Endpoints: + c.endpoints = append(c.endpoints, o) + case *netv1.Ingress: + c.ingresses = append(c.ingresses, o) + case *netv1.IngressClass: + c.ingressClasses = append(c.ingressClasses, o) + default: + panic(fmt.Sprintf("Unknown runtime object %+v %T", o, o)) } } @@ -80,10 +59,6 @@ func (c clientMock) GetIngresses() []*netv1.Ingress { return c.ingresses } -func (c clientMock) GetServerVersion() *version.Version { - return c.serverVersion -} - func (c clientMock) GetService(namespace, name string) (*corev1.Service, bool, error) { if c.apiServiceError != nil { return nil, false, c.apiServiceError diff --git a/pkg/provider/kubernetes/ingress/client_test.go b/pkg/provider/kubernetes/ingress/client_test.go index 402da8e45..44d611bcb 100644 --- a/pkg/provider/kubernetes/ingress/client_test.go +++ b/pkg/provider/kubernetes/ingress/client_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" - netv1beta1 "k8s.io/api/networking/v1beta1" kerror "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kschema "k8s.io/apimachinery/pkg/runtime/schema" @@ -289,72 +288,3 @@ func TestClientIgnoresEmptyEndpointUpdates(t *testing.T) { case <-time.After(50 * time.Millisecond): } } - -func TestClientUsesCorrectServerVersion(t *testing.T) { - ingressV1Beta := &netv1beta1.Ingress{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "default", - Name: "ingress-v1beta", - }, - } - - ingressV1 := &netv1.Ingress{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "default", - Name: "ingress-v1", - }, - } - - kubeClient := kubefake.NewSimpleClientset(ingressV1Beta, ingressV1) - - discovery, _ := kubeClient.Discovery().(*discoveryfake.FakeDiscovery) - discovery.FakedServerVersion = &kversion.Info{ - GitVersion: "v1.18.12+foobar", - } - - stopCh := make(chan struct{}) - - client := newClientImpl(kubeClient) - - eventCh, err := client.WatchAll(nil, stopCh) - require.NoError(t, err) - - select { - case event := <-eventCh: - ingress, ok := event.(*netv1beta1.Ingress) - require.True(t, ok) - - assert.Equal(t, "ingress-v1beta", ingress.Name) - case <-time.After(50 * time.Millisecond): - assert.Fail(t, "expected to receive event for ingress") - } - - select { - case <-eventCh: - assert.Fail(t, "received more than one event") - case <-time.After(50 * time.Millisecond): - } - - discovery.FakedServerVersion = &kversion.Info{ - GitVersion: "v1.19", - } - - eventCh, err = client.WatchAll(nil, stopCh) - require.NoError(t, err) - - select { - case event := <-eventCh: - ingress, ok := event.(*netv1.Ingress) - require.True(t, ok) - - assert.Equal(t, "ingress-v1", ingress.Name) - case <-time.After(50 * time.Millisecond): - assert.Fail(t, "expected to receive event for ingress") - } - - select { - case <-eventCh: - assert.Fail(t, "received more than one event") - case <-time.After(50 * time.Millisecond): - } -} diff --git a/pkg/provider/kubernetes/ingress/convert.go b/pkg/provider/kubernetes/ingress/convert.go index b0274d660..d5c5006fc 100644 --- a/pkg/provider/kubernetes/ingress/convert.go +++ b/pkg/provider/kubernetes/ingress/convert.go @@ -5,7 +5,6 @@ import ( corev1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" - netv1beta1 "k8s.io/api/networking/v1beta1" ) type marshaler interface { @@ -17,7 +16,7 @@ type unmarshaler interface { } type LoadBalancerIngress interface { - corev1.LoadBalancerIngress | netv1beta1.IngressLoadBalancerIngress | netv1.IngressLoadBalancerIngress + corev1.LoadBalancerIngress | netv1.IngressLoadBalancerIngress } // convertSlice converts slice of LoadBalancerIngress to slice of LoadBalancerIngress. diff --git a/pkg/provider/kubernetes/ingress/convert_test.go b/pkg/provider/kubernetes/ingress/convert_test.go index 0002b2b3a..285a6cb40 100644 --- a/pkg/provider/kubernetes/ingress/convert_test.go +++ b/pkg/provider/kubernetes/ingress/convert_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" - netv1beta1 "k8s.io/api/networking/v1beta1" ) func Test_convertSlice_corev1_to_networkingv1(t *testing.T) { @@ -45,76 +44,6 @@ func Test_convertSlice_corev1_to_networkingv1(t *testing.T) { assert.Equal(t, expected, actual) } -func Test_convertSlice_networkingv1beta1_to_networkingv1(t *testing.T) { - g := []netv1beta1.IngressLoadBalancerIngress{ - { - IP: "132456", - Hostname: "foo", - Ports: []netv1beta1.IngressPortStatus{ - { - Port: 123, - Protocol: "https", - Error: ptr("test"), - }, - }, - }, - } - - actual, err := convertSlice[netv1.IngressLoadBalancerIngress](g) - require.NoError(t, err) - - expected := []netv1.IngressLoadBalancerIngress{ - { - IP: "132456", - Hostname: "foo", - Ports: []netv1.IngressPortStatus{ - { - Port: 123, - Protocol: "https", - Error: ptr("test"), - }, - }, - }, - } - - assert.Equal(t, expected, actual) -} - -func Test_convertSlice_networkingv1_to_networkingv1beta1(t *testing.T) { - g := []netv1.IngressLoadBalancerIngress{ - { - IP: "132456", - Hostname: "foo", - Ports: []netv1.IngressPortStatus{ - { - Port: 123, - Protocol: "https", - Error: ptr("test"), - }, - }, - }, - } - - actual, err := convertSlice[netv1beta1.IngressLoadBalancerIngress](g) - require.NoError(t, err) - - expected := []netv1beta1.IngressLoadBalancerIngress{ - { - IP: "132456", - Hostname: "foo", - Ports: []netv1beta1.IngressPortStatus{ - { - Port: 123, - Protocol: "https", - Error: ptr("test"), - }, - }, - }, - } - - assert.Equal(t, expected, actual) -} - func Test_convert(t *testing.T) { g := &corev1.LoadBalancerIngress{ IP: "132456", diff --git a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name.yml b/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name.yml new file mode 100644 index 000000000..616e2e3a8 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name.yml @@ -0,0 +1,102 @@ +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + - ip: 10.10.0.2 + ports: + - name: tchouk + port: 8089 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: toto + +subsets: + - addresses: + - ip: 10.11.0.1 + - ip: 10.11.0.2 + ports: + - name: tchouk + port: 8089 + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: tchouk + pathType: Prefix + - path: /foo + backend: + service: + name: service1 + port: + name: carotte + pathType: Prefix + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: toto + +spec: + rules: + - host: toto.traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: tchouk + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: toto + +spec: + ports: + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_endpoint.yml deleted file mode 100644 index 3eee9b2a4..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_endpoint.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: - - addresses: - - ip: 10.10.0.1 - - ip: 10.10.0.2 - ports: - - name: tchouk - port: 8089 - ---- -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: toto - -subsets: - - addresses: - - ip: 10.11.0.1 - - ip: 10.11.0.2 - ports: - - name: tchouk - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_ingress.yml deleted file mode 100644 index a44f610bb..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_ingress.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: tchouk - - path: /foo - backend: - serviceName: service1 - servicePort: carotte - ---- -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: toto - -spec: - rules: - - host: toto.traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: tchouk diff --git a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_service.yml b/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_service.yml deleted file mode 100644 index 0ca4be86a..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_service.yml +++ /dev/null @@ -1,24 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 - ---- -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: toto - -spec: - ports: - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress.yml new file mode 100644 index 000000000..b002d0fc5 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress.yml @@ -0,0 +1,84 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + defaultBackend: + service: + name: service1 + port: + number: 80 + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + defaultBackend: + service: + name: service2 + port: + number: 80 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service2 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiversion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.30.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.41.0.1 + ports: + - port: 8080 + +--- +kind: Endpoints +apiversion: v1 +metadata: + name: service2 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_endpoint.yml deleted file mode 100644 index ea93c651a..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_endpoint.yml +++ /dev/null @@ -1,32 +0,0 @@ -kind: Endpoints -apiversion: v1 -metadata: - name: service1 - namespace: testing - -subsets: - - addresses: - - ip: 10.30.0.1 - ports: - - port: 8080 - - addresses: - - ip: 10.41.0.1 - ports: - - port: 8080 - ---- -kind: Endpoints -apiversion: v1 -metadata: - name: service2 - namespace: testing - -subsets: - - addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 - - addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_ingress.yml deleted file mode 100644 index 040df2ac8..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_ingress.yml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - backend: - serviceName: service1 - servicePort: 80 - ---- -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - backend: - serviceName: service2 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_service.yml deleted file mode 100644 index aa1c61f36..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_service.yml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 - ---- -kind: Service -apiVersion: v1 -metadata: - name: service2 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Empty-ingresses.yml b/pkg/provider/kubernetes/ingress/fixtures/Empty-ingresses.yml new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path.yml new file mode 100644 index 000000000..14b050fbd --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path.yml @@ -0,0 +1,57 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + - host: traefik.courgette + http: + paths: + - path: /carotte + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_ingress.yml deleted file mode 100644 index 72c7aa9ed..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_ingress.yml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - host: traefik.courgette - http: - paths: - - path: /carotte - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only.yml similarity index 72% rename from pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only_ingress.yml rename to pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only.yml index 529c8d9ea..47a6d07e9 100644 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only_ingress.yml +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only.yml @@ -1,5 +1,5 @@ kind: Ingress -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 metadata: name: "" namespace: testing diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths.yml new file mode 100644 index 000000000..675ddac66 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths.yml @@ -0,0 +1,54 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + - path: /foo + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_ingress.yml deleted file mode 100644 index 4d6bd4349..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_ingress.yml +++ /dev/null @@ -1,19 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - path: /foo - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host.yml new file mode 100644 index 000000000..2cb84cb33 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host.yml @@ -0,0 +1,47 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_ingress.yml deleted file mode 100644 index 4e27d7f07..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths.yml new file mode 100644 index 000000000..8cd87d4c4 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths.yml @@ -0,0 +1,53 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + - path: /foo + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_ingress.yml deleted file mode 100644 index d04fc0ef5..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_ingress.yml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - path: /foo - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled.yml new file mode 100644 index 000000000..41a68b162 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled.yml @@ -0,0 +1,31 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: example.com + namespace: testing + +spec: + rules: + - http: + paths: + - path: /foo + backend: + service: + name: service-foo + port: + number: 8080 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service-foo + namespace: testing + +spec: + ports: + - name: http + port: 8080 + type: ExternalName + externalName: "2001:0db8:3c4d:0015:0000:0000:1a2f:2a3b" diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_ingress.yml deleted file mode 100644 index e41dde42f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: example.com - namespace: testing - -spec: - rules: - - http: - paths: - - path: /foo - backend: - serviceName: service-foo - servicePort: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_service.yml deleted file mode 100644 index 67c193cfa..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_service.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: service-foo - namespace: testing - -spec: - ports: - - name: http - port: 8080 - type: ExternalName - externalName: "2001:0db8:3c4d:0015:0000:0000:1a2f:2a3b" diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints.yml new file mode 100644 index 000000000..340f79a60 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints.yml @@ -0,0 +1,66 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: example.com + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service-bar + port: + number: 8080 + pathType: Prefix + - path: /foo + backend: + service: + name: service-foo + port: + number: 8080 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service-bar + namespace: testing + +spec: + ports: + - name: http + port: 8080 + clusterIP: "fc00:f853:ccd:e793::1" + type: ClusterIP + +--- +kind: Service +apiVersion: v1 +metadata: + name: service-foo + namespace: testing + +spec: + ports: + - name: http + port: 8080 + type: ExternalName + externalName: "2001:0db8:3c4d:0015:0000:0000:1a2f:2a3b" + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service-bar + namespace: testing + +subsets: + - addresses: + - ip: "2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b" + ports: + - name: http + port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_endpoint.yml deleted file mode 100644 index e70dd1a13..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_endpoint.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service-bar - namespace: testing - -subsets: -- addresses: - - ip: "2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b" - ports: - - name: http - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_ingress.yml deleted file mode 100644 index a12baef74..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_ingress.yml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: example.com - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service-bar - servicePort: 8080 - - path: /foo - backend: - serviceName: service-foo - servicePort: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_service.yml deleted file mode 100644 index da1189725..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_service.yml +++ /dev/null @@ -1,26 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service-bar - namespace: testing - -spec: - ports: - - name: http - port: 8080 - clusterIP: "fc00:f853:ccd:e793::1" - type: ClusterIP - ---- -kind: Service -apiVersion: v1 -metadata: - name: service-foo - namespace: testing - -spec: - ports: - - name: http - port: 8080 - type: ExternalName - externalName: "2001:0db8:3c4d:0015:0000:0000:1a2f:2a3b" diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443).yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443).yml new file mode 100644 index 000000000..0b3f020db --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443).yml @@ -0,0 +1,47 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 443 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 443 + targetPort: 8443 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8443 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_endpoint.yml deleted file mode 100644 index 2c5387099..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8443 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_ingress.yml deleted file mode 100644 index 582a06a56..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_service.yml deleted file mode 100644 index 8c4b63324..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_service.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 443 - targetPort: 8443 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https).yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https).yml new file mode 100644 index 000000000..46227d191 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https).yml @@ -0,0 +1,50 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 8443 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: https + protocol: "" + port: 8443 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - name: https + port: 8443 + - addresses: + - ip: 10.21.0.1 + ports: + - name: https + port: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_endpoint.yml deleted file mode 100644 index b409a7851..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_endpoint.yml +++ /dev/null @@ -1,17 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - name: https - port: 8443 -- addresses: - - ip: 10.21.0.1 - ports: - - name: https - port: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_ingress.yml deleted file mode 100644 index 544c4bb82..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_service.yml deleted file mode 100644 index 106e85b97..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_service.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: https - protocol: "" - port: 8443 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https).yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https).yml new file mode 100644 index 000000000..3cce7e424 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https).yml @@ -0,0 +1,50 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 8443 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: https-foo + protocol: "" + port: 8443 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - name: https-foo + port: 8443 + - addresses: + - ip: 10.21.0.1 + ports: + - name: https-foo + port: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_endpoint.yml deleted file mode 100644 index 7e71390a4..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_endpoint.yml +++ /dev/null @@ -1,17 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - name: https-foo - port: 8443 -- addresses: - - ip: 10.21.0.1 - ports: - - name: https-foo - port: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_ingress.yml deleted file mode 100644 index 544c4bb82..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 8443 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_service.yml deleted file mode 100644 index 0a858f63b..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_service.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: https-foo - protocol: "" - port: 8443 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path.yml new file mode 100644 index 000000000..fcfbc08b1 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path.yml @@ -0,0 +1,46 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_ingress.yml deleted file mode 100644 index c8c0919f6..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_service.yml deleted file mode 100644 index cc747fa4d..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_service.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods.yml new file mode 100644 index 000000000..8c65a2271 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods.yml @@ -0,0 +1,55 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: tchouk + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: carotte + port: 8082 + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + - ip: 10.10.0.2 + ports: + - name: tchouk + port: 8089 + - addresses: + - ip: 10.10.0.1 + - ip: 10.10.0.2 + - ip: 10.10.0.3 + ports: + - name: carotte + port: 8090 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_endpoint.yml deleted file mode 100644 index 21004ad0f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_endpoint.yml +++ /dev/null @@ -1,20 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: - - addresses: - - ip: 10.10.0.1 - - ip: 10.10.0.2 - ports: - - name: tchouk - port: 8089 - - addresses: - - ip: 10.10.0.1 - - ip: 10.10.0.2 - - ip: 10.10.0.3 - ports: - - name: carotte - port: 8090 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_ingress.yml deleted file mode 100644 index ddc20ca40..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: tchouk diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_service.yml deleted file mode 100644 index 55437f6b2..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_service.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: carotte - port: 8082 - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations.yml new file mode 100644 index 000000000..8acc12c2f --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations.yml @@ -0,0 +1,70 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + ingress.kubernetes.io/foo: bar + traefik.ingress.kubernetes.io/foo: bar + traefik.ingress.kubernetes.io/router.pathmatcher: Path + 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.tls: "true" + traefik.ingress.kubernetes.io/router.tls.certresolver: foobar + traefik.ingress.kubernetes.io/router.tls.domains.0.main: domain.com + traefik.ingress.kubernetes.io/router.tls.domains.0.sans: one.domain.com,two.domain.com + traefik.ingress.kubernetes.io/router.tls.domains.1.main: example.com + traefik.ingress.kubernetes.io/router.tls.domains.1.sans: one.example.com,two.example.com + traefik.ingress.kubernetes.io/router.tls.options: foobar + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Exact + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + annotations: + ingress.kubernetes.io/foo: bar + traefik.ingress.kubernetes.io/foo: bar + traefik.ingress.kubernetes.io/service.serversscheme: protocol + traefik.ingress.kubernetes.io/service.serverstransport: foobar@file + traefik.ingress.kubernetes.io/service.passhostheader: "true" + traefik.ingress.kubernetes.io/service.sticky.cookie: "true" + traefik.ingress.kubernetes.io/service.sticky.cookie.httponly: "true" + traefik.ingress.kubernetes.io/service.sticky.cookie.name: foobar + traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true" + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_ingress.yml deleted file mode 100644 index 01247f76c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_ingress.yml +++ /dev/null @@ -1,28 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - ingress.kubernetes.io/foo: bar - traefik.ingress.kubernetes.io/foo: bar - traefik.ingress.kubernetes.io/router.pathmatcher: Path - 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.tls: "true" - traefik.ingress.kubernetes.io/router.tls.certresolver: foobar - traefik.ingress.kubernetes.io/router.tls.domains.0.main: domain.com - traefik.ingress.kubernetes.io/router.tls.domains.0.sans: one.domain.com,two.domain.com - traefik.ingress.kubernetes.io/router.tls.domains.1.main: example.com - traefik.ingress.kubernetes.io/router.tls.domains.1.sans: one.example.com,two.example.com - traefik.ingress.kubernetes.io/router.tls.options: foobar - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml deleted file mode 100644 index 57c561247..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_service.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - annotations: - ingress.kubernetes.io/foo: bar - traefik.ingress.kubernetes.io/foo: bar - traefik.ingress.kubernetes.io/service.serversscheme: protocol - traefik.ingress.kubernetes.io/service.serverstransport: foobar@file - traefik.ingress.kubernetes.io/service.passhostheader: "true" - traefik.ingress.kubernetes.io/service.sticky.cookie: "true" - traefik.ingress.kubernetes.io/service.sticky.cookie.httponly: "true" - traefik.ingress.kubernetes.io/service.sticky.cookie.name: foobar - traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true" - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host.yml new file mode 100644 index 000000000..b9d2b116d --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host.yml @@ -0,0 +1,58 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: "*.bar" + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + + - host: "bar" + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_ingress.yml deleted file mode 100644 index a8aa09dcd..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_ingress.yml +++ /dev/null @@ -1,23 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: "*.bar" - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - - host: "bar" - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path.yml new file mode 100644 index 000000000..d0ef9b15d --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path.yml @@ -0,0 +1,54 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /foo/bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + + - path: /foo-bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_ingress.yml deleted file mode 100644 index abfe74519..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_ingress.yml +++ /dev/null @@ -1,19 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /foo/bar - backend: - serviceName: service1 - servicePort: 80 - - - path: /foo-bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass.yml new file mode 100644 index 000000000..96ad4c8fd --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass.yml @@ -0,0 +1,44 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + kubernetes.io/ingress.class: traefik + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_ingress.yml deleted file mode 100644 index 528bfd84d..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - kubernetes.io/ingress.class: traefik - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-defaultbackend.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-defaultbackend.yml new file mode 100644 index 000000000..7a9e31231 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-defaultbackend.yml @@ -0,0 +1,62 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: defaultbackend + namespace: testing + +spec: + defaultBackend: + service: + name: defaultservice + port: + number: 8080 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 +--- + +kind: Service +apiVersion: v1 +metadata: + name: defaultservice + namespace: testing + +spec: + ports: + - port: 8080 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 80 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: defaultservice + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-empty-pathType.yml similarity index 53% rename from pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_ingress.yml rename to pkg/provider/kubernetes/ingress/fixtures/Ingress-with-empty-pathType.yml index 2ea3bf486..e4557b59b 100644 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_ingress.yml +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-empty-pathType.yml @@ -16,3 +16,28 @@ spec: name: service1 port: number: 80 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-exact-pathType.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-exact-pathType.yml new file mode 100644 index 000000000..cf33330da --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-exact-pathType.yml @@ -0,0 +1,41 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + rules: + - http: + paths: + - path: /bar + pathType: Exact + backend: + service: + name: service1 + port: + number: 80 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-implementationSpecific-pathType.yml similarity index 51% rename from pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_ingress.yml rename to pkg/provider/kubernetes/ingress/fixtures/Ingress-with-implementationSpecific-pathType.yml index 9804e7eba..f410cd5f3 100644 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_ingress.yml +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-implementationSpecific-pathType.yml @@ -15,4 +15,29 @@ spec: service: name: service1 port: - number: 80 \ No newline at end of file + number: 80 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingress-annotation.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingress-annotation.yml new file mode 100644 index 000000000..3f9a500f5 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingress-annotation.yml @@ -0,0 +1,43 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + kubernetes.io/ingress.class: traefik +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation.yml new file mode 100644 index 000000000..96ad4c8fd --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation.yml @@ -0,0 +1,44 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + kubernetes.io/ingress.class: traefik + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_ingress.yml deleted file mode 100644 index 528bfd84d..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - kubernetes.io/ingress.class: traefik - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass.yml new file mode 100644 index 000000000..e272a505a --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass.yml @@ -0,0 +1,51 @@ +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: traefik-lb +spec: + controller: traefik.io/ingress-controller + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + ingressClassName: traefik-lb + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClasses-filter.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClasses-filter.yml new file mode 100644 index 000000000..edc1b2a05 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClasses-filter.yml @@ -0,0 +1,77 @@ +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: traefik-lb2 +spec: + controller: traefik.io/ingress-controller + +--- +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: traefik-lb +spec: + controller: traefik.io/ingress-controller + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + ingressClassName: traefik-lb + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + ingressClassName: traefik-lb2 + rules: + - http: + paths: + - path: /foo + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-missing-ingressClass.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-missing-ingressClass.yml new file mode 100644 index 000000000..26473bbb3 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-missing-ingressClass.yml @@ -0,0 +1,42 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + ingressClassName: traefik-lb + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-multiple-ingressClasses.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-multiple-ingressClasses.yml new file mode 100644 index 000000000..edc1b2a05 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-multiple-ingressClasses.yml @@ -0,0 +1,77 @@ +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: traefik-lb2 +spec: + controller: traefik.io/ingress-controller + +--- +apiVersion: networking.k8s.io/v1 +kind: IngressClass +metadata: + name: traefik-lb +spec: + controller: traefik.io/ingress-controller + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + ingressClassName: traefik-lb + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + ingressClassName: traefik-lb2 + rules: + - http: + paths: + - path: /foo + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-named-port.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-named-port.yml new file mode 100644 index 000000000..4d0394000 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-named-port.yml @@ -0,0 +1,43 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + rules: + - http: + paths: + - path: /bar + pathType: Prefix + backend: + service: + name: service1 + port: + name: foobar + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: foobar + port: 4711 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - name: foobar + port: 4711 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb.yml new file mode 100644 index 000000000..1c2c49b44 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb.yml @@ -0,0 +1,34 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 8080 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + annotations: + traefik.ingress.kubernetes.io/service.nativelb: "true" + +spec: + ports: + - port: 8080 + clusterIP: 10.0.0.1 + type: ClusterIP + externalName: traefik.wtf diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_ingress.yml deleted file mode 100644 index f9645ad09..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_service.yml deleted file mode 100644 index e394301fc..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_service.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - annotations: - traefik.ingress.kubernetes.io/service.nativelb: "true" - -spec: - ports: - - port: 8080 - clusterIP: 10.0.0.1 - type: ClusterIP - externalName: traefik.wtf - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation.yml new file mode 100644 index 000000000..7c69c842b --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation.yml @@ -0,0 +1,44 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + kubernetes.io/ingress.class: toto + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_ingress.yml deleted file mode 100644 index 69d02cc8f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - kubernetes.io/ingress.class: toto - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path.yml new file mode 100644 index 000000000..8de5910ad --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path.yml @@ -0,0 +1,45 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: example.com + http: + paths: + - backend: + service: + name: example-com + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: example-com + namespace: testing + +spec: + ports: + - name: http + port: 80 + clusterIP: 10.0.0.1 + type: ClusterIP + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: example-com + namespace: testing + +subsets: + - addresses: + - ip: 10.11.0.1 + ports: + - name: http + port: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_endpoint.yml deleted file mode 100644 index 97545bba8..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_endpoint.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: example-com - namespace: testing - -subsets: -- addresses: - - ip: 10.11.0.1 - ports: - - name: http - port: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_ingress.yml deleted file mode 100644 index dd233845f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: example.com - http: - paths: - - backend: - serviceName: example-com - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_service.yml deleted file mode 100644 index d68c69269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_service.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: example-com - namespace: testing - -spec: - ports: - - name: http - port: 80 - clusterIP: 10.0.0.1 - type: ClusterIP diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint.yml new file mode 100644 index 000000000..6437806f0 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint.yml @@ -0,0 +1,29 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset.yml similarity index 51% rename from pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_ingress.yml rename to pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset.yml index bc88fc058..f0d9ffc8b 100644 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_ingress.yml +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset.yml @@ -3,14 +3,35 @@ apiVersion: networking.k8s.io/v1 metadata: name: "" namespace: testing + spec: rules: - - http: + - host: traefik.tchouk + http: paths: - path: /bar - pathType: Prefix backend: service: name: service1 port: number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_endpoint.yml deleted file mode 100644 index 72b65cf58..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_endpoint.yml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_ingress.yml deleted file mode 100644 index 4e27d7f07..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_endpoint.yml deleted file mode 100644 index ecd9082d9..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: - - addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 - - addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_service.yml deleted file mode 100644 index e05f39335..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service.yml new file mode 100644 index 000000000..ccf4c9557 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service.yml @@ -0,0 +1,63 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.port + http: + paths: + - path: /port + backend: + service: + name: service1 + port: + number: 8080 + pathType: Prefix + +--- +apiVersion: v1 +kind: Service +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http-api + - name: http-admin + port: 8079 + protocol: TCP + targetPort: http-admin + selector: + app: foo + sessionAffinity: None + type: ClusterIP + +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: service1 + namespace: testing +subsets: + - addresses: + - ip: 10.0.0.1 + nodeName: admin.whoami.service1 + ports: + - name: http-admin + port: 8079 + protocol: TCP + - addresses: + - ip: 10.0.0.1 + nodeName: whoami.service1 + # targetRef: + ports: + - name: http + port: 8080 + protocol: TCP diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_endpoint.yml deleted file mode 100644 index dfe20f52d..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_endpoint.yml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Endpoints -metadata: - name: service1 - namespace: testing -subsets: - - addresses: - - ip: 10.0.0.1 - nodeName: admin.whoami.service1 - ports: - - name: http-admin - port: 8079 - protocol: TCP - - addresses: - - ip: 10.0.0.1 - nodeName: whoami.service1 -# targetRef: - ports: - - name: http - port: 8080 - protocol: TCP diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_ingress.yml deleted file mode 100644 index 12c508feb..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.port - http: - paths: - - path: /port - backend: - serviceName: service1 - servicePort: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_service.yml deleted file mode 100644 index d83acc42f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_service.yml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: http - port: 8080 - protocol: TCP - targetPort: http-api - - name: http-admin - port: 8079 - protocol: TCP - targetPort: http-admin - selector: - app: foo - sessionAffinity: None - type: ClusterIP diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica.yml new file mode 100644 index 000000000..10216d602 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica.yml @@ -0,0 +1,50 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: tchouk + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: carotte + port: 8082 + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + - ip: 10.10.0.2 + ports: + - name: carotte + port: 8090 + - name: tchouk + port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_endpoint.yml deleted file mode 100644 index a3fb499b0..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - - ip: 10.10.0.2 - ports: - - name: carotte - port: 8090 - - name: tchouk - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_ingress.yml deleted file mode 100644 index 613f43959..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: tchouk diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_service.yml deleted file mode 100644 index 141a467c1..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_service.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: carotte - port: 8082 - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica.yml new file mode 100644 index 000000000..d9ea086f4 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica.yml @@ -0,0 +1,56 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: tchouk + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: carotte + port: 8082 + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - name: carotte + port: 8090 + - name: tchouk + port: 8089 + - addresses: + - ip: 10.21.0.1 + ports: + - name: carotte + port: 8090 + - name: tchouk + port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_endpoint.yml deleted file mode 100644 index ad4e1d04a..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_endpoint.yml +++ /dev/null @@ -1,21 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - name: carotte - port: 8090 - - name: tchouk - port: 8089 -- addresses: - - ip: 10.21.0.1 - ports: - - name: carotte - port: 8090 - - name: tchouk - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_ingress.yml deleted file mode 100644 index 613f43959..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: tchouk diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_service.yml deleted file mode 100644 index 141a467c1..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_service.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: carotte - port: 8082 - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica.yml new file mode 100644 index 000000000..073f5faa5 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica.yml @@ -0,0 +1,56 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: carotte + port: 8082 + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - name: carotte + port: 8090 + - name: tchouk + port: 8089 + - addresses: + - ip: 10.21.0.1 + ports: + - name: carotte + port: 8090 + - name: tchouk + port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_endpoint.yml deleted file mode 100644 index ad4e1d04a..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_endpoint.yml +++ /dev/null @@ -1,21 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - name: carotte - port: 8090 - - name: tchouk - port: 8089 -- addresses: - - ip: 10.21.0.1 - ports: - - name: carotte - port: 8090 - - name: tchouk - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_ingress.yml deleted file mode 100644 index 4e27d7f07..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_service.yml deleted file mode 100644 index 141a467c1..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_service.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: carotte - port: 8082 - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-prefix-pathType.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-prefix-pathType.yml new file mode 100644 index 000000000..ca66982c8 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-prefix-pathType.yml @@ -0,0 +1,41 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing +spec: + rules: + - http: + paths: + - path: /bar + pathType: Prefix + backend: + service: + name: service1 + port: + number: 80 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled.yml new file mode 100644 index 000000000..1b02e27fd --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled.yml @@ -0,0 +1,32 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 8080 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 8080 + clusterIP: 10.0.0.1 + type: ExternalName + externalName: traefik.wtf diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_ingress.yml deleted file mode 100644 index f9645ad09..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_service.yml deleted file mode 100644 index 972e4cdbc..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_service.yml +++ /dev/null @@ -1,13 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 8080 - clusterIP: 10.0.0.1 - type: ExternalName - externalName: traefik.wtf - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName.yml new file mode 100644 index 000000000..1b02e27fd --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName.yml @@ -0,0 +1,32 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 8080 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 8080 + clusterIP: 10.0.0.1 + type: ExternalName + externalName: traefik.wtf diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_ingress.yml deleted file mode 100644 index f9645ad09..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_service.yml deleted file mode 100644 index 972e4cdbc..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_service.yml +++ /dev/null @@ -1,13 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 8080 - clusterIP: 10.0.0.1 - type: ExternalName - externalName: traefik.wtf - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path.yml new file mode 100644 index 000000000..9f3a5d477 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path.yml @@ -0,0 +1,55 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + - http: + paths: + - path: /foo + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_ingress.yml deleted file mode 100644 index 0b6d34c1f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_ingress.yml +++ /dev/null @@ -1,20 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - http: - paths: - - path: /foo - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name.yml new file mode 100644 index 000000000..8474965be --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name.yml @@ -0,0 +1,57 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: tchouk + pathType: Prefix + - path: /foo + backend: + service: + name: service1 + port: + name: carotte + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - name: carotte + port: 8082 + - name: tchouk + port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + - ip: 10.10.0.2 + ports: + - name: carotte + port: 8090 + - name: tchouk + port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_endpoint.yml deleted file mode 100644 index a3fb499b0..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - - ip: 10.10.0.2 - ports: - - name: carotte - port: 8090 - - name: tchouk - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_ingress.yml deleted file mode 100644 index c25449a50..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_ingress.yml +++ /dev/null @@ -1,19 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: tchouk - - path: /foo - backend: - serviceName: service1 - servicePort: carotte diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_service.yml deleted file mode 100644 index 141a467c1..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_service.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: carotte - port: 8082 - - name: tchouk - port: 80 - clusterIP: 10.0.0.1 - diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services.yml new file mode 100644 index 000000000..55b9e4218 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services.yml @@ -0,0 +1,86 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + - host: traefik.courgette + http: + paths: + - path: /carotte + backend: + service: + name: service2 + port: + number: 8082 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service2 + namespace: testing + +spec: + ports: + - port: 8082 + clusterIP: 10.1.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.1 + ports: + - port: 8080 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service2 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.2 + ports: + - port: 8080 + - addresses: + - ip: 10.21.0.2 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_ingress.yml deleted file mode 100644 index 887df113f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_ingress.yml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - - host: traefik.courgette - http: - paths: - - path: /carotte - backend: - serviceName: service2 - servicePort: 8082 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_service.yml deleted file mode 100644 index befb87b74..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_service.yml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 - ---- -kind: Service -apiVersion: v1 -metadata: - name: service2 - namespace: testing - -spec: - ports: - - port: 8082 - clusterIP: 10.1.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name.yml new file mode 100644 index 000000000..b22892ff5 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name.yml @@ -0,0 +1,44 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + name: toto + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.11.0.1 + - ip: 10.11.0.2 + ports: + - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_endpoint.yml deleted file mode 100644 index 017fb01cf..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_endpoint.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.11.0.1 - - ip: 10.11.0.2 - ports: - - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_ingress.yml deleted file mode 100644 index 3ac34b3ae..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: toto diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port.yml new file mode 100644 index 000000000..7ef564b1a --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port.yml @@ -0,0 +1,44 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: traefik.tchouk + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 21 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.11.0.1 + - ip: 10.11.0.2 + ports: + - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_endpoint.yml deleted file mode 100644 index 017fb01cf..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_endpoint.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.11.0.1 - - ip: 10.11.0.2 - ports: - - port: 8089 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_ingress.yml deleted file mode 100644 index 18a3af939..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: traefik.tchouk - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 21 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host.yml new file mode 100644 index 000000000..ff18bfd83 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host.yml @@ -0,0 +1,43 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + rules: + - host: "*.foobar.com" + http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_ingress.yml deleted file mode 100644 index c72c09d85..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - rules: - - host: "*.foobar.com" - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_service.yml deleted file mode 100644 index cc747fa4d..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_service.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation.yml new file mode 100644 index 000000000..e2312d68e --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation.yml @@ -0,0 +1,44 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + kubernetes.io/ingress.class: tchouk + +spec: + rules: + - http: + paths: + - path: /bar + backend: + service: + name: service1 + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +subsets: + - addresses: + - ip: 10.10.0.1 + ports: + - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_ingress.yml deleted file mode 100644 index 28def8528..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - kubernetes.io/ingress.class: tchouk - -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules).yml similarity index 50% rename from pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_endpoint.yml rename to pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules).yml index b30fe3dab..7ba4b0196 100644 --- a/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_endpoint.yml +++ b/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules).yml @@ -1,3 +1,29 @@ +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + defaultBackend: + service: + name: service1 + port: + number: 80 + +--- +kind: Service +apiVersion: v1 +metadata: + name: service1 + namespace: testing + +spec: + ports: + - port: 80 + clusterIP: 10.0.0.1 + +--- kind: Endpoints apiVersion: v1 metadata: @@ -13,20 +39,3 @@ subsets: - ip: 10.21.0.1 ports: - port: 8080 - ---- -kind: Endpoints -apiVersion: v1 -metadata: - name: service2 - namespace: testing - -subsets: - - addresses: - - ip: 10.10.0.2 - ports: - - port: 8080 - - addresses: - - ip: 10.21.0.2 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_endpoint.yml deleted file mode 100644 index b19cd5c3f..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_endpoint.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 -- addresses: - - ip: 10.21.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_ingress.yml deleted file mode 100644 index ac692c73e..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_ingress.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_service.yml b/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/TLS-support.yml b/pkg/provider/kubernetes/ingress/fixtures/TLS-support.yml new file mode 100644 index 000000000..6760730cd --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/TLS-support.yml @@ -0,0 +1,97 @@ +apiVersion: v1 +kind: Secret +metadata: + name: my-tls-secret + namespace: testing + +data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= + tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + annotations: + traefik.ingress.kubernetes.io/router.tls: "true" + +spec: + tls: + - secretName: my-tls-secret + rules: + - host: example.com + http: + paths: + - path: "" + backend: + service: + name: example-com + port: + number: 80 + pathType: Prefix + +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: "" + namespace: testing + +spec: + tls: + - secretName: my-undefined-secret + rules: + - host: example.fail + http: + paths: + - path: "" + backend: + service: + name: example-fail + port: + number: 80 + pathType: Prefix + +--- +kind: Service +apiVersion: v1 +metadata: + name: example-com + namespace: testing + +spec: + ports: + - name: http + port: 80 + clusterIP: 10.0.0.1 + type: ClusterIP + +--- +kind: Service +apiVersion: v1 +metadata: + name: example-org + namespace: testing + +spec: + ports: + - name: http + port: 80 + clusterIP: 10.0.0.2 + type: ClusterIP + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: example-com + namespace: testing + +subsets: + - addresses: + - ip: 10.11.0.1 + ports: + - name: http + port: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/TLS-support_endpoint.yml deleted file mode 100644 index 97545bba8..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_endpoint.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: example-com - namespace: testing - -subsets: -- addresses: - - ip: 10.11.0.1 - ports: - - name: http - port: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/TLS-support_ingress.yml deleted file mode 100644 index e5f39fc91..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_ingress.yml +++ /dev/null @@ -1,38 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - traefik.ingress.kubernetes.io/router.tls: "true" - -spec: - tls: - - secretName: my-tls-secret - rules: - - host: example.com - http: - paths: - - path: "" - backend: - serviceName: example-com - servicePort: 80 - ---- -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - -spec: - tls: - - secretName: my-undefined-secret - rules: - - host: example.fail - http: - paths: - - path: "" - backend: - serviceName: example-fail - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_secret.yml b/pkg/provider/kubernetes/ingress/fixtures/TLS-support_secret.yml deleted file mode 100644 index 77df8ed37..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_secret.yml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: my-tls-secret - namespace: testing - -data: - tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= - tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= diff --git a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_service.yml b/pkg/provider/kubernetes/ingress/fixtures/TLS-support_service.yml deleted file mode 100644 index d204e8dbb..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/TLS-support_service.yml +++ /dev/null @@ -1,26 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: example-com - namespace: testing - -spec: - ports: - - name: http - port: 80 - clusterIP: 10.0.0.1 - type: ClusterIP - ---- -kind: Service -apiVersion: v1 -metadata: - name: example-org - namespace: testing - -spec: - ports: - - name: http - port: 80 - clusterIP: 10.0.0.2 - type: ClusterIP diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_ingress.yml deleted file mode 100644 index b01a04d51..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - traefik.ingress.kubernetes.io/router.pathmatcher: Path -spec: - rules: - - http: - paths: - - path: /bar - pathType: "" - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_ingress.yml deleted file mode 100644 index d3f9848f6..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - rules: - - http: - paths: - - path: /bar - pathType: Exact - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_ingress.yml deleted file mode 100644 index 8b1cc9674..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - traefik.ingress.kubernetes.io/router.pathmatcher: Path -spec: - rules: - - http: - paths: - - path: /bar - pathType: ImplementationSpecific - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_ingress.yml deleted file mode 100644 index e223946d0..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - kubernetes.io/ingress.class: traefik -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingress.yml deleted file mode 100644 index 0a8047318..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingressclass.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingressclass.yml deleted file mode 100644 index b96f42518..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingressclass.yml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: networking.k8s.io/v1beta1 -kind: IngressClass -metadata: - name: traefik-lb -spec: - controller: traefik.io/ingress-controller diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingress.yml deleted file mode 100644 index fb4eec709..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingress.yml +++ /dev/null @@ -1,30 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - ---- -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb2 - rules: - - http: - paths: - - path: /foo - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingressclass.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingressclass.yml deleted file mode 100644 index c0dd6d23a..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingressclass.yml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: networking.k8s.io/v1beta1 -kind: IngressClass -metadata: - name: traefik-lb2 -spec: - controller: traefik.io/ingress-controller - ---- -apiVersion: networking.k8s.io/v1beta1 -kind: IngressClass -metadata: - name: traefik-lb -spec: - controller: traefik.io/ingress-controller diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_ingress.yml deleted file mode 100644 index 0a8047318..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingress.yml deleted file mode 100644 index fb4eec709..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingress.yml +++ /dev/null @@ -1,30 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 - ---- -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb2 - rules: - - http: - paths: - - path: /foo - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingressclass.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingressclass.yml deleted file mode 100644 index c0dd6d23a..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingressclass.yml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: networking.k8s.io/v1beta1 -kind: IngressClass -metadata: - name: traefik-lb2 -spec: - controller: traefik.io/ingress-controller - ---- -apiVersion: networking.k8s.io/v1beta1 -kind: IngressClass -metadata: - name: traefik-lb -spec: - controller: traefik.io/ingress-controller diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_ingress.yml deleted file mode 100644 index 740d39d1c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_ingress.yml +++ /dev/null @@ -1,15 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing - annotations: - traefik.ingress.kubernetes.io/router.pathmatcher: Path -spec: - rules: - - http: - paths: - - path: /bar - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_ingress.yml deleted file mode 100644 index 2ae20e2ef..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_ingress.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1beta1 -metadata: - name: "" - namespace: testing -spec: - rules: - - http: - paths: - - path: /bar - pathType: Prefix - backend: - serviceName: service1 - servicePort: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_endpoint.yml deleted file mode 100644 index 0e64b4434..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_endpoint.yml +++ /dev/null @@ -1,24 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 80 - ---- -kind: Endpoints -apiVersion: v1 -metadata: - name: defaultservice - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_ingress.yml deleted file mode 100644 index 58b7aac63..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_ingress.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: defaultbackend - namespace: testing - -spec: - defaultBackend: - service: - name: defaultservice - port: - number: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_service.yml deleted file mode 100644 index 1bca9be2b..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_service.yml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 ---- - -kind: Service -apiVersion: v1 -metadata: - name: defaultservice - namespace: testing - -spec: - ports: - - port: 8080 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_ingress.yml deleted file mode 100644 index ca25ad48e..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing -spec: - rules: - - http: - paths: - - path: /bar - pathType: Exact - backend: - service: - name: service1 - port: - number: 80 \ No newline at end of file diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_ingress.yml deleted file mode 100644 index 1e8f60949..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_ingress.yml +++ /dev/null @@ -1,17 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing - annotations: - kubernetes.io/ingress.class: traefik -spec: - rules: - - http: - paths: - - path: /bar - backend: - service: - name: service1 - port: - number: 80 \ No newline at end of file diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingress.yml deleted file mode 100644 index 22c268983..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb - rules: - - http: - paths: - - path: /bar - backend: - service: - name: service1 - port: - number: 80 \ No newline at end of file diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingressclass.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingressclass.yml deleted file mode 100644 index b96f42518..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingressclass.yml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: networking.k8s.io/v1beta1 -kind: IngressClass -metadata: - name: traefik-lb -spec: - controller: traefik.io/ingress-controller diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingress.yml deleted file mode 100644 index c9be2e68c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb-v1 - rules: - - http: - paths: - - path: /bar - backend: - service: - name: service1 - port: - number: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingressclass.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingressclass.yml deleted file mode 100644 index 744ecc9cd..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingressclass.yml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: IngressClass -metadata: - name: traefik-lb-v1 -spec: - controller: traefik.io/ingress-controller diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_ingress.yml deleted file mode 100644 index b14b1a4bb..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing -spec: - ingressClassName: traefik-lb - rules: - - http: - paths: - - path: /bar - backend: - service: - name: service1 - port: - number: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_endpoint.yml deleted file mode 100644 index bf2e7526e..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_endpoint.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: - - addresses: - - ip: 10.10.0.1 - ports: - - name: foobar - port: 4711 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_ingress.yml deleted file mode 100644 index 12f17bc54..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_ingress.yml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing -spec: - rules: - - http: - paths: - - path: /bar - pathType: Prefix - backend: - service: - name: service1 - port: - name: foobar diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_service.yml deleted file mode 100644 index c064e5872..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_service.yml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - name: foobar - port: 4711 - clusterIP: 10.0.0.1 - diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_ingress.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_ingress.yml deleted file mode 100644 index 6327a89a5..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_ingress.yml +++ /dev/null @@ -1,17 +0,0 @@ -kind: Ingress -apiVersion: networking.k8s.io/v1 -metadata: - name: "" - namespace: testing - annotations: - traefik.ingress.kubernetes.io/router.pathmatcher: Path -spec: - rules: - - http: - paths: - - path: /bar - backend: - service: - name: service1 - port: - number: 80 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_endpoint.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_endpoint.yml deleted file mode 100644 index 6ed60d79c..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_endpoint.yml +++ /dev/null @@ -1,11 +0,0 @@ -kind: Endpoints -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -subsets: -- addresses: - - ip: 10.10.0.1 - ports: - - port: 8080 diff --git a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_service.yml b/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_service.yml deleted file mode 100644 index 0ec7e2269..000000000 --- a/pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_service.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: service1 - namespace: testing - -spec: - ports: - - port: 80 - clusterIP: 10.0.0.1 diff --git a/pkg/provider/kubernetes/ingress/kubernetes.go b/pkg/provider/kubernetes/ingress/kubernetes.go index cca5ea57e..05f3cbce9 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes.go +++ b/pkg/provider/kubernetes/ingress/kubernetes.go @@ -212,11 +212,9 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl TCP: &dynamic.TCPConfiguration{}, } - serverVersion := client.GetServerVersion() - var ingressClasses []*netv1.IngressClass - if !p.DisableIngressClassLookup && supportsIngressClass(serverVersion) { + if !p.DisableIngressClassLookup { ics, err := client.GetIngressClasses() if err != nil { log.Ctx(ctx).Warn().Err(err).Msg("Failed to list ingress classes") diff --git a/pkg/provider/kubernetes/ingress/kubernetes_test.go b/pkg/provider/kubernetes/ingress/kubernetes_test.go index 6a3119f0c..e044cf577 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes_test.go +++ b/pkg/provider/kubernetes/ingress/kubernetes_test.go @@ -4,7 +4,6 @@ import ( "context" "errors" "math" - "os" "path/filepath" "strings" "testing" @@ -29,7 +28,6 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { testCases := []struct { desc string ingressClass string - serverVersion string expected *dynamic.Configuration allowEmptyServices bool disableIngressClassLookup bool @@ -1131,39 +1129,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v18 Ingress with ingressClass", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "PathPrefix(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with multiple ingressClasses", - serverVersion: "v1.18", + desc: "Ingress with multiple ingressClasses", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1197,241 +1163,8 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v18 Ingress with no pathType", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "Path(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with empty pathType", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "Path(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with implementationSpecific pathType", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "Path(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with prefix pathType", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "PathPrefix(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with exact pathType", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "Path(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with missing ingressClass", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{}, - Services: map[string]*dynamic.Service{}, - }, - }, - }, - { - desc: "v18 Ingress with ingress annotation", - serverVersion: "v1.18", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "PathPrefix(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - // Duplicate test case with the same fixture as the one above, but with the disableIngressClassLookup option to true. - // Showing that disabling the ingressClass discovery still allow the discovery of ingresses with ingress annotation. - desc: "v18 Ingress with ingress annotation", - serverVersion: "v1.18", - disableIngressClassLookup: true, - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "PathPrefix(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v18 Ingress with ingressClasses filter", - serverVersion: "v1.18", - ingressClass: "traefik-lb2", + desc: "Ingress with ingressClasses filter", + ingressClass: "traefik-lb2", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1461,24 +1194,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - // Duplicate test case with the same fixture as the one above, but with the disableIngressClassLookup option to true. - // Showing that disabling the ingressClass discovery avoid discovering Ingresses with an IngressClass. - desc: "v18 Ingress with ingressClasses filter", - serverVersion: "v1.18", - ingressClass: "traefik-lb2", - disableIngressClassLookup: true, - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{}, - Services: map[string]*dynamic.Service{}, - }, - }, - }, - { - desc: "v19 Ingress with prefix pathType", - serverVersion: "v1.19", + desc: "Ingress with prefix pathType", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1508,8 +1224,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with no pathType", - serverVersion: "v1.19", + desc: "Ingress with empty pathType", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1539,8 +1254,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with empty pathType", - serverVersion: "v1.19", + desc: "Ingress with exact pathType", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1570,8 +1284,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with exact pathType", - serverVersion: "v1.19", + desc: "Ingress with implementationSpecific pathType", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1601,39 +1314,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with implementationSpecific pathType", - serverVersion: "v1.19", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "Path(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v19 Ingress with ingress annotation", - serverVersion: "v1.19", + desc: "Ingress with ingress annotation", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1665,8 +1346,8 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { { // Duplicate test case with the same fixture as the one above, but with the disableIngressClassLookup option to true. // Showing that disabling the ingressClass discovery still allow the discovery of ingresses with ingress annotation. - desc: "v19 Ingress with ingress annotation", - serverVersion: "v1.19", + desc: "Ingress with ingress annotation", + disableIngressClassLookup: true, expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1696,8 +1377,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with ingressClass", - serverVersion: "v1.19", + desc: "Ingress with ingressClass", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1729,9 +1409,8 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { { // Duplicate test case with the same fixture as the one above, but with the disableIngressClassLookup option to true. // Showing that disabling the ingressClass discovery avoid discovering Ingresses with an IngressClass. - desc: "v19 Ingress with ingressClass", + desc: "Ingress with ingressClass", disableIngressClassLookup: true, - serverVersion: "v1.19", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1742,39 +1421,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with ingressClassv1", - serverVersion: "v1.19", - expected: &dynamic.Configuration{ - TCP: &dynamic.TCPConfiguration{}, - HTTP: &dynamic.HTTPConfiguration{ - Middlewares: map[string]*dynamic.Middleware{}, - Routers: map[string]*dynamic.Router{ - "testing-bar": { - Rule: "PathPrefix(`/bar`)", - Service: "testing-service1-80", - }, - }, - Services: map[string]*dynamic.Service{ - "testing-service1-80": { - LoadBalancer: &dynamic.ServersLoadBalancer{ - PassHostHeader: Bool(true), - ResponseForwarding: &dynamic.ResponseForwarding{ - FlushInterval: ptypes.Duration(100 * time.Millisecond), - }, - Servers: []dynamic.Server{ - { - URL: "http://10.10.0.1:8080", - }, - }, - }, - }, - }, - }, - }, - }, - { - desc: "v19 Ingress with named port", - serverVersion: "v1.19", + desc: "Ingress with named port", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1804,8 +1451,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with missing ingressClass", - serverVersion: "v1.19", + desc: "Ingress with missing ingressClass", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1816,8 +1462,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { }, }, { - desc: "v19 Ingress with defaultbackend", - serverVersion: "v1.19", + desc: "Ingress with defaultbackend", expected: &dynamic.Configuration{ TCP: &dynamic.TCPConfiguration{}, HTTP: &dynamic.HTTPConfiguration{ @@ -1855,34 +1500,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) { t.Run(test.desc, func(t *testing.T) { t.Parallel() - var paths []string - _, err := os.Stat(generateTestFilename("_ingress", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_ingress", test.desc)) - } - _, err = os.Stat(generateTestFilename("_endpoint", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_endpoint", test.desc)) - } - _, err = os.Stat(generateTestFilename("_service", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_service", test.desc)) - } - _, err = os.Stat(generateTestFilename("_secret", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_secret", test.desc)) - } - _, err = os.Stat(generateTestFilename("_ingressclass", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_ingressclass", test.desc)) - } - - serverVersion := test.serverVersion - if serverVersion == "" { - serverVersion = "v1.17" - } - - clientMock := newClientMock(serverVersion, paths...) + clientMock := newClientMock(generateTestFilename(test.desc)) p := Provider{ IngressClass: test.ingressClass, AllowEmptyServices: test.allowEmptyServices, @@ -1899,7 +1517,6 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { testCases := []struct { desc string ingressClass string - serverVersion string allowExternalNameServices bool expected *dynamic.Configuration }{ @@ -2014,34 +1631,7 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { t.Run(test.desc, func(t *testing.T) { t.Parallel() - var paths []string - _, err := os.Stat(generateTestFilename("_ingress", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_ingress", test.desc)) - } - _, err = os.Stat(generateTestFilename("_endpoint", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_endpoint", test.desc)) - } - _, err = os.Stat(generateTestFilename("_service", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_service", test.desc)) - } - _, err = os.Stat(generateTestFilename("_secret", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_secret", test.desc)) - } - _, err = os.Stat(generateTestFilename("_ingressclass", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_ingressclass", test.desc)) - } - - serverVersion := test.serverVersion - if serverVersion == "" { - serverVersion = "v1.17" - } - - clientMock := newClientMock(serverVersion, paths...) + clientMock := newClientMock(generateTestFilename(test.desc)) p := Provider{IngressClass: test.ingressClass} p.AllowExternalNameServices = test.allowExternalNameServices @@ -2054,10 +1644,9 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { func TestLoadConfigurationFromIngressesWithNativeLB(t *testing.T) { testCases := []struct { - desc string - ingressClass string - serverVersion string - expected *dynamic.Configuration + desc string + ingressClass string + expected *dynamic.Configuration }{ { desc: "Ingress with native service lb", @@ -2095,34 +1684,7 @@ func TestLoadConfigurationFromIngressesWithNativeLB(t *testing.T) { t.Run(test.desc, func(t *testing.T) { t.Parallel() - var paths []string - _, err := os.Stat(generateTestFilename("_ingress", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_ingress", test.desc)) - } - _, err = os.Stat(generateTestFilename("_endpoint", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_endpoint", test.desc)) - } - _, err = os.Stat(generateTestFilename("_service", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_service", test.desc)) - } - _, err = os.Stat(generateTestFilename("_secret", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_secret", test.desc)) - } - _, err = os.Stat(generateTestFilename("_ingressclass", test.desc)) - if err == nil { - paths = append(paths, generateTestFilename("_ingressclass", test.desc)) - } - - serverVersion := test.serverVersion - if serverVersion == "" { - serverVersion = "v1.17" - } - - clientMock := newClientMock(serverVersion, paths...) + clientMock := newClientMock(generateTestFilename(test.desc)) p := Provider{IngressClass: test.ingressClass} conf := p.loadConfigurationFromIngresses(context.Background(), clientMock) @@ -2132,8 +1694,8 @@ func TestLoadConfigurationFromIngressesWithNativeLB(t *testing.T) { } } -func generateTestFilename(suffix, desc string) string { - return filepath.Join("fixtures", strings.ReplaceAll(desc, " ", "-")+suffix+".yml") +func generateTestFilename(desc string) string { + return filepath.Join("fixtures", strings.ReplaceAll(desc, " ", "-")+".yml") } func TestGetCertificates(t *testing.T) { From 0a861716d422ff42fc5ad53c1fbac09cda0922cc Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 20 Jun 2023 17:12:05 +0200 Subject: [PATCH 15/17] Update release documentation --- docs/content/deprecation/releases.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/deprecation/releases.md b/docs/content/deprecation/releases.md index 6d23f06c0..1e73eda6d 100644 --- a/docs/content/deprecation/releases.md +++ b/docs/content/deprecation/releases.md @@ -6,7 +6,8 @@ Below is a non-exhaustive list of versions and their maintenance status: | Version | Release Date | Active Support | Security Support | |---------|--------------|--------------------|------------------| -| 2.9 | Oct 03, 2022 | Yes | Yes | +| 2.10 | Apr 24, 2023 | Yes | Yes | +| 2.9 | Oct 03, 2022 | Ended Apr 24, 2023 | No | | 2.8 | Jun 29, 2022 | Ended Oct 03, 2022 | No | | 2.7 | May 24, 2022 | Ended Jun 29, 2022 | No | | 2.6 | Jan 24, 2022 | Ended May 24, 2022 | No | From 0a35fa096af0f745c01f4c9aa43c0ec5f0aca7a7 Mon Sep 17 00:00:00 2001 From: Romain Date: Wed, 21 Jun 2023 10:06:05 +0200 Subject: [PATCH 16/17] Improve Kubernetes support documentation Co-authored-by: Kevin Pollet --- docs/content/deprecation/features.md | 5 + .../includes/kubernetes-requirements.md | 3 + docs/content/middlewares/http/overview.md | 13 -- docs/content/middlewares/tcp/overview.md | 13 -- docs/content/migration/v2-to-v3.md | 9 +- docs/content/providers/kubernetes-crd.md | 10 +- docs/content/providers/kubernetes-gateway.md | 4 +- docs/content/providers/kubernetes-ingress.md | 2 +- .../kubernetes-crd-definition-v1beta1.yml | 133 ------------------ .../dynamic-configuration/kubernetes-crd.md | 10 -- .../routing/providers/kubernetes-crd.md | 2 +- .../routing/providers/kubernetes-gateway.md | 2 +- 12 files changed, 24 insertions(+), 182 deletions(-) create mode 100644 docs/content/includes/kubernetes-requirements.md delete mode 100644 docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml diff --git a/docs/content/deprecation/features.md b/docs/content/deprecation/features.md index f74a0bd2d..c5f0f2dfe 100644 --- a/docs/content/deprecation/features.md +++ b/docs/content/deprecation/features.md @@ -6,6 +6,7 @@ This page is maintained and updated periodically to reflect our roadmap and any |----------------------------------------------------------------------------------------------------------------------|------------|----------------|---------| | [Kubernetes CRDs API Version `traefik.io/v1alpha1`](#kubernetes-crds-api-version-traefikiov1alpha1) | N/A | N/A | 3.0 | | [Kubernetes Ingress API Version `networking.k8s.io/v1beta1`](#kubernetes-ingress-api-version-networkingk8siov1beta1) | N/A | N/A | 3.0 | +| [CRD API Version `apiextensions.k8s.io/v1beta1`](#kubernetes-ingress-api-version-networkingk8siov1beta1) | N/A | N/A | 3.0 | ## Impact @@ -16,3 +17,7 @@ The newly introduced Kubernetes CRD API Version `traefik.io/v1alpha1` will subse ### Kubernetes Ingress API Version `networking.k8s.io/v1beta1` The Kubernetes Ingress API Version `networking.k8s.io/v1beta1` is removed in v3. Please use the API Group `networking.k8s.io/v1` instead. + +### Traefik CRD API Version `apiextensions.k8s.io/v1beta1` + +The Traefik CRD API Version `apiextensions.k8s.io/v1beta1` is removed in v3. Please use the API Group `apiextensions.k8s.io/v1` instead. diff --git a/docs/content/includes/kubernetes-requirements.md b/docs/content/includes/kubernetes-requirements.md new file mode 100644 index 000000000..437fc7382 --- /dev/null +++ b/docs/content/includes/kubernetes-requirements.md @@ -0,0 +1,3 @@ +Traefik follows the [Kubernetes support policy](https://kubernetes.io/releases/version-skew-policy/#supported-versions), +and supports at least the latest three minor versions of Kubernetes. +General functionality cannot be guaranteed for versions older than that. diff --git a/docs/content/middlewares/http/overview.md b/docs/content/middlewares/http/overview.md index 17b2ab1cf..96ba29e74 100644 --- a/docs/content/middlewares/http/overview.md +++ b/docs/content/middlewares/http/overview.md @@ -26,19 +26,6 @@ whoami: ```yaml tab="Kubernetes IngressRoute" # As a Kubernetes Traefik IngressRoute -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: middlewares.traefik.io -spec: - group: traefik.io - version: v1alpha1 - names: - kind: Middleware - plural: middlewares - singular: middleware - scope: Namespaced - --- apiVersion: traefik.io/v1alpha1 kind: Middleware diff --git a/docs/content/middlewares/tcp/overview.md b/docs/content/middlewares/tcp/overview.md index 5572160cb..4b461d3ba 100644 --- a/docs/content/middlewares/tcp/overview.md +++ b/docs/content/middlewares/tcp/overview.md @@ -26,19 +26,6 @@ whoami: ```yaml tab="Kubernetes IngressRoute" # As a Kubernetes Traefik IngressRoute -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: middlewaretcps.traefik.io -spec: - group: traefik.io - version: v1alpha1 - names: - kind: MiddlewareTCP - plural: middlewaretcps - singular: middlewaretcp - scope: Namespaced - --- apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP diff --git a/docs/content/migration/v2-to-v3.md b/docs/content/migration/v2-to-v3.md index 1f5f0de46..b4cf1bafd 100644 --- a/docs/content/migration/v2-to-v3.md +++ b/docs/content/migration/v2-to-v3.md @@ -97,7 +97,12 @@ In v3, the provider Docker has been split into 2 providers: ### Kubernetes Ingress API Group `networking.k8s.io/v1beta1` -As v3 is targeting support for Kubernetes v1.23+, -the Kubernetes Ingress API Group `networking.k8s.io/v1beta1` ([removed since Kubernetes v1.22](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122)) support has been removed. +In v3, the Kubernetes Ingress API Group `networking.k8s.io/v1beta1` ([removed since Kubernetes v1.22](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122)) support has been removed. Please use the API Group `networking.k8s.io/v1` instead. + +### Traefik CRD API Version `apiextensions.k8s.io/v1beta1` + +In v3, the Traefik CRD API Version `apiextensions.k8s.io/v1beta1` ([removed since Kubernetes v1.22](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122)) support has been removed. + +Please use the CRD definition with the API Version `apiextensions.k8s.io/v1` instead. diff --git a/docs/content/providers/kubernetes-crd.md b/docs/content/providers/kubernetes-crd.md index 737213713..f39f89605 100644 --- a/docs/content/providers/kubernetes-crd.md +++ b/docs/content/providers/kubernetes-crd.md @@ -14,7 +14,9 @@ However, as the community expressed the need to benefit from Traefik features wi the Traefik engineering team developed a [Custom Resource Definition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) (CRD) for an IngressRoute type, defined below, in order to provide a better way to configure access to a Kubernetes cluster. -## Configuration Requirements +## Requirements + +{!kubernetes-requirements.md!} !!! tip "All Steps for a Successful Deployment" @@ -25,12 +27,6 @@ the Traefik engineering team developed a [Custom Resource Definition](https://ku * Apply the needed kubernetesCRD provider [configuration](#provider-configuration) * Add all necessary Traefik custom [resources](../reference/dynamic-configuration/kubernetes-crd.md#resources) -!!! warning "Deprecated apiextensions.k8s.io/v1beta1 CRD" - - The `apiextensions.k8s.io/v1beta1` CustomResourceDefinition is deprecated in Kubernetes `v1.16+` and will be removed in `v1.22+`. - - For Kubernetes `v1.16+`, please use the Traefik `apiextensions.k8s.io/v1` CRDs instead. - !!! example "Installing Resource Definition and RBAC" ```bash diff --git a/docs/content/providers/kubernetes-gateway.md b/docs/content/providers/kubernetes-gateway.md index 809e5630a..e8fc7b133 100644 --- a/docs/content/providers/kubernetes-gateway.md +++ b/docs/content/providers/kubernetes-gateway.md @@ -41,7 +41,9 @@ This provider is proposed as an experimental feature and partially supports the --experimental.kubernetesgateway=true --providers.kubernetesgateway=true #... ``` -## Configuration Requirements +## Requirements + +{!kubernetes-requirements.md!} !!! tip "All Steps for a Successful Deployment" diff --git a/docs/content/providers/kubernetes-ingress.md b/docs/content/providers/kubernetes-ingress.md index 9a13a0a7d..8f03d3317 100644 --- a/docs/content/providers/kubernetes-ingress.md +++ b/docs/content/providers/kubernetes-ingress.md @@ -13,7 +13,7 @@ it manages access to cluster services by supporting the [Ingress](https://kubern ## Requirements -Traefik supports `1.23+` Kubernetes clusters. +{!kubernetes-requirements.md!} ## Routing Configuration diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml deleted file mode 100644 index 4fb320d42..000000000 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml +++ /dev/null @@ -1,133 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: ingressroutes.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: IngressRoute - plural: ingressroutes - singular: ingressroute - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: middlewares.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: Middleware - plural: middlewares - singular: middleware - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: middlewaretcps.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: MiddlewareTCP - plural: middlewaretcps - singular: middlewaretcp - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: ingressroutetcps.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: IngressRouteTCP - plural: ingressroutetcps - singular: ingressroutetcp - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: ingressrouteudps.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: IngressRouteUDP - plural: ingressrouteudps - singular: ingressrouteudp - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: tlsoptions.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: TLSOption - plural: tlsoptions - singular: tlsoption - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: tlsstores.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: TLSStore - plural: tlsstores - singular: tlsstore - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: traefikservices.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: TraefikService - plural: traefikservices - singular: traefikservice - scope: Namespaced - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serverstransports.traefik.io - -spec: - group: traefik.io - version: v1alpha1 - names: - kind: ServersTransport - plural: serverstransports - singular: serverstransport - scope: Namespaced diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd.md b/docs/content/reference/dynamic-configuration/kubernetes-crd.md index 5519ad0f5..ba7c6e56e 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd.md +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd.md @@ -8,22 +8,12 @@ description: "Learn about the definitions, resources, and RBAC of dynamic config Dynamic configuration with Kubernetes Custom Resource {: .subtitle } -!!! warning "Deprecated apiextensions.k8s.io/v1beta1 CRD" - - The `apiextensions.k8s.io/v1beta1` CustomResourceDefinition is deprecated in Kubernetes `v1.16+` and will be removed in `v1.22+`. - - For Kubernetes `v1.16+`, please use the Traefik `apiextensions.k8s.io/v1` CRDs instead. - ## Definitions ```yaml tab="apiextensions.k8s.io/v1 (Kubernetes v1.16+)" --8<-- "content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml" ``` -```yaml tab="apiextensions.k8s.io/v1beta1 (Deprecated)" ---8<-- "content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml" -``` - ## Resources ```yaml diff --git a/docs/content/routing/providers/kubernetes-crd.md b/docs/content/routing/providers/kubernetes-crd.md index c11c61385..e2f5574f9 100644 --- a/docs/content/routing/providers/kubernetes-crd.md +++ b/docs/content/routing/providers/kubernetes-crd.md @@ -290,7 +290,7 @@ The Kubernetes Ingress Controller, The Custom Resource Way. ### Custom Resource Definition (CRD) * You can find an exhaustive list, generated from Traefik's source code, of the custom resources and their attributes in [the reference page](../../reference/dynamic-configuration/kubernetes-crd.md). -* Validate that [the prerequisites](../../providers/kubernetes-crd.md#configuration-requirements) are fulfilled before using the Traefik custom resources. +* Validate that [the prerequisites](../../providers/kubernetes-crd.md#requirements) are fulfilled before using the Traefik custom resources. * Traefik CRDs are building blocks that you can assemble according to your needs. You can find an excerpt of the available custom resources in the table below: diff --git a/docs/content/routing/providers/kubernetes-gateway.md b/docs/content/routing/providers/kubernetes-gateway.md index 09d0b607b..9ca76c4db 100644 --- a/docs/content/routing/providers/kubernetes-gateway.md +++ b/docs/content/routing/providers/kubernetes-gateway.md @@ -34,7 +34,7 @@ The Kubernetes Gateway API, The Experimental Way. {: .subtitle } * You can find an exhaustive list, of the custom resources and their attributes in [the reference page](../../reference/dynamic-configuration/kubernetes-gateway.md) or in the Kubernetes Sigs `Gateway API` [repository](https://github.com/kubernetes-sigs/gateway-api). -* Validate that [the prerequisites](../../providers/kubernetes-gateway.md#configuration-requirements) are fulfilled +* Validate that [the prerequisites](../../providers/kubernetes-gateway.md#requirements) are fulfilled before using the Traefik Kubernetes Gateway Provider. You can find an excerpt of the supported Kubernetes Gateway API resources in the table below: From 52d2d959afdfe86884d691314a301a387532671c Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Thu, 22 Jun 2023 01:18:05 +0200 Subject: [PATCH 17/17] Prepare release v3.0.0-beta3 --- CHANGELOG.md | 46 ++++++++++++++++++++++++++++++++++ script/gcg/traefik-rc-new.toml | 10 ++++---- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a48f380cd..e0acb6bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,49 @@ +## [v3.0.0-beta3](https://github.com/traefik/traefik/tree/v3.0.0-beta3) (2023-06-21) +[All Commits](https://github.com/traefik/traefik/compare/v3.0.0-beta2...v3.0.0-beta3) + +**Enhancements:** +- **[docker,docker/swarm]** Split Docker provider ([#9652](https://github.com/traefik/traefik/pull/9652) by [ldez](https://github.com/ldez)) +- **[k8s,hub]** Remove deprecated code ([#9804](https://github.com/traefik/traefik/pull/9804) by [ldez](https://github.com/ldez)) +- **[k8s,k8s/gatewayapi]** Support HostSNIRegexp in GatewayAPI TLS routes ([#9486](https://github.com/traefik/traefik/pull/9486) by [ddtmachado](https://github.com/ddtmachado)) +- **[k8s/gatewayapi]** Add support for HTTPRequestRedirectFilter in k8s Gateway API ([#9408](https://github.com/traefik/traefik/pull/9408) by [romantomjak](https://github.com/romantomjak)) +- **[k8s/ingress,k8s]** Remove support of the networking.k8s.io/v1beta1 APIVersion ([#9949](https://github.com/traefik/traefik/pull/9949) by [rtribotte](https://github.com/rtribotte)) +- **[k8s/ingress,k8s]** Add option to the Ingress provider to disable IngressClass lookup ([#9281](https://github.com/traefik/traefik/pull/9281) by [jandillenkofer](https://github.com/jandillenkofer)) +- **[marathon]** Remove Marathon provider ([#9614](https://github.com/traefik/traefik/pull/9614) by [rtribotte](https://github.com/rtribotte)) +- **[metrics]** Remove InfluxDB v1 metrics middleware ([#9612](https://github.com/traefik/traefik/pull/9612) by [tomMoulard](https://github.com/tomMoulard)) +- **[rancher]** Remove Rancher v1 provider ([#9613](https://github.com/traefik/traefik/pull/9613) by [tomMoulard](https://github.com/tomMoulard)) +- **[rules]** Remove containous/mux from HTTP muxer ([#9558](https://github.com/traefik/traefik/pull/9558) by [tomMoulard](https://github.com/tomMoulard)) +- **[tls,tcp,service]** Add TCP Servers Transports support ([#9465](https://github.com/traefik/traefik/pull/9465) by [sdelicata](https://github.com/sdelicata)) +- **[webui]** Added router priority to webui's list and detail page ([#9004](https://github.com/traefik/traefik/pull/9004) by [bendre90](https://github.com/bendre90)) + +**Bug fixes:** +- **[metrics]** Fix OpenTelemetry metrics ([#9962](https://github.com/traefik/traefik/pull/9962) by [rtribotte](https://github.com/rtribotte)) +- **[metrics]** Remove config reload failure metrics ([#9660](https://github.com/traefik/traefik/pull/9660) by [rtribotte](https://github.com/rtribotte)) +- **[metrics]** Fix open connections metric ([#9656](https://github.com/traefik/traefik/pull/9656) by [mpl](https://github.com/mpl)) +- **[metrics]** Fix OpenTelemetry service name ([#9619](https://github.com/traefik/traefik/pull/9619) by [tomMoulard](https://github.com/tomMoulard)) +- **[tcp]** Don't log EOF or timeout errors while peeking first bytes in Postgres StartTLS hook ([#9663](https://github.com/traefik/traefik/pull/9663) by [rtribotte](https://github.com/rtribotte)) +- **[webui]** Detect dashboard assets content types ([#9622](https://github.com/traefik/traefik/pull/9622) by [tomMoulard](https://github.com/tomMoulard)) +- **[webui]** fix: detect dashboard content types ([#9594](https://github.com/traefik/traefik/pull/9594) by [ldez](https://github.com/ldez)) + +**Documentation:** +- **[k8s]** Improve Kubernetes support documentation ([#9974](https://github.com/traefik/traefik/pull/9974) by [rtribotte](https://github.com/rtribotte)) +- Adjust quick start ([#9790](https://github.com/traefik/traefik/pull/9790) by [svx](https://github.com/svx)) +- Mention PathPrefix matcher changes in V3 Migration Guide ([#9727](https://github.com/traefik/traefik/pull/9727) by [aofei](https://github.com/aofei)) +- Fix yaml indentation in the HTTP3 example ([#9724](https://github.com/traefik/traefik/pull/9724) by [benwaffle](https://github.com/benwaffle)) +- Add OpenTelemetry in observability overview ([#9654](https://github.com/traefik/traefik/pull/9654) by [tomMoulard](https://github.com/tomMoulard)) + +**Misc:** +- Merge branch v2.10 into v3.0 ([#9977](https://github.com/traefik/traefik/pull/9977) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9931](https://github.com/traefik/traefik/pull/9931) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9896](https://github.com/traefik/traefik/pull/9896) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9867](https://github.com/traefik/traefik/pull/9867) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9850](https://github.com/traefik/traefik/pull/9850) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9845](https://github.com/traefik/traefik/pull/9845) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9803](https://github.com/traefik/traefik/pull/9803) by [ldez](https://github.com/ldez)) +- Merge branch v2.10 into v3.0 ([#9793](https://github.com/traefik/traefik/pull/9793) by [ldez](https://github.com/ldez)) +- Merge branch v2.9 into v3.0 ([#9722](https://github.com/traefik/traefik/pull/9722) by [rtribotte](https://github.com/rtribotte)) +- Merge branch v2.9 into v3.0 ([#9650](https://github.com/traefik/traefik/pull/9650) by [tomMoulard](https://github.com/tomMoulard)) +- Merge branch v2.9 into v3.0 ([#9632](https://github.com/traefik/traefik/pull/9632) by [kevinpollet](https://github.com/kevinpollet)) + ## [v2.10.3](https://github.com/traefik/traefik/tree/v2.10.3) (2023-06-17) [All Commits](https://github.com/traefik/traefik/compare/v2.10.2...v2.10.3) diff --git a/script/gcg/traefik-rc-new.toml b/script/gcg/traefik-rc-new.toml index 5c4090849..d46d2a2ff 100644 --- a/script/gcg/traefik-rc-new.toml +++ b/script/gcg/traefik-rc-new.toml @@ -4,11 +4,11 @@ RepositoryName = "traefik" OutputType = "file" FileName = "traefik_changelog.md" -# example beta2 of v3.0.0 -CurrentRef = "master" -PreviousRef = "v3.0.0-beta1" -BaseBranch = "master" -FutureCurrentRefName = "v3.0.0-beta2" +# example beta3 of v3.0.0 +CurrentRef = "v3.0" +PreviousRef = "v3.0.0-beta2" +BaseBranch = "v3.0" +FutureCurrentRefName = "v3.0.0-beta3" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10