diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0df46760d..6f48169bb 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,11 +2,11 @@ PLEASE READ THIS MESSAGE. Documentation fixes or enhancements: -- for Traefik v2: use branch v2.9 +- for Traefik v2: use branch v2.10 - for Traefik v3: use branch master Bug fixes: -- for Traefik v2: use branch v2.9 +- for Traefik v2: use branch v2.10 - for Traefik v3: use branch master Enhancements: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 110edf6cb..a219162d1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,7 @@ on: - '*' env: - GO_VERSION: 1.19 + GO_VERSION: '1.20' CGO_ENABLED: 0 IN_DOCKER: "" diff --git a/.github/workflows/check_doc.yml b/.github/workflows/check_doc.yml index ee7465fcb..c800ad248 100644 --- a/.github/workflows/check_doc.yml +++ b/.github/workflows/check_doc.yml @@ -19,3 +19,7 @@ jobs: - name: Check documentation run: make docs-pull-images docs + env: + # These variables are not passed to workflows that are triggered by a pull request from a fork. + DOCS_VERIFY_SKIP: ${{ vars.DOCS_VERIFY_SKIP }} + DOCS_LINT_SKIP: ${{ vars.DOCS_LINT_SKIP }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index bffb14497..7ef7f7ed3 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -7,7 +7,7 @@ on: - v* env: - STRUCTOR_VERSION: v1.12.0 + STRUCTOR_VERSION: v1.13.1 MIXTUS_VERSION: v0.4.1 jobs: @@ -41,12 +41,12 @@ jobs: - name: Build documentation run: $HOME/bin/structor -o traefik -r traefik --dockerfile-url="https://raw.githubusercontent.com/traefik/traefik/v1.7/docs.Dockerfile" --menu.js-url="https://raw.githubusercontent.com/traefik/structor/master/traefik-menu.js.gotmpl" --rqts-url="https://raw.githubusercontent.com/traefik/structor/master/requirements-override.txt" --force-edit-url --exp-branch=master --debug env: - STRUCTOR_LATEST_TAG: ${{ secrets.STRUCTOR_LATEST_TAG }} + STRUCTOR_LATEST_TAG: ${{ vars.STRUCTOR_LATEST_TAG }} - name: Apply seo run: $HOME/bin/seo -path=./site -product=traefik - name: Publish documentation - run: $HOME/bin/mixtus --dst-doc-path="./traefik" --dst-owner=traefik --dst-repo-name=doc --git-user-email="30906710+traefiker@users.noreply.github.com" --git-user-name=traefiker --src-doc-path="./site" --src-owner=containous --src-repo-name=traefik + run: $HOME/bin/mixtus --dst-doc-path="./traefik" --dst-owner=traefik --dst-repo-name=doc --git-user-email="30906710+traefiker@users.noreply.github.com" --git-user-name=traefiker --src-doc-path="./site" --src-owner=traefik --src-repo-name=traefik env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }} diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index c819cd1aa..ad9edcf41 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -6,7 +6,7 @@ on: - '*' env: - GO_VERSION: 1.19 + GO_VERSION: '1.20' IN_DOCKER: "" jobs: diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index beb87eec1..69de25cf4 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -6,8 +6,8 @@ on: - '*' env: - GO_VERSION: 1.19 - GOLANGCI_LINT_VERSION: v1.50.0 + GO_VERSION: '1.20' + GOLANGCI_LINT_VERSION: v1.51.2 MISSSPELL_VERSION: v0.4.0 IN_DOCKER: "" diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 2aab6ab3e..95ea73ed1 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -19,7 +19,7 @@ global_job_config: prologue: commands: - curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin" - - sudo semgo go1.19 + - sudo semgo go1.20 - export "GOPATH=$(go env GOPATH)" - export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}" - export "PATH=${GOPATH}/bin:${PATH}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 58fa58698..cc9a911ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,43 @@ +## [v2.10.0-rc1](https://github.com/traefik/traefik/tree/v2.10.0-rc1) (2023-03-22) +[All Commits](https://github.com/traefik/traefik/compare/b3f162a8a61d89beaa9edc8adc12cc4cb3e1de0f...v2.10.0-rc1) + +**Enhancements:** +- **[docker]** Expose ContainerName in Docker provider ([#9770](https://github.com/traefik/traefik/pull/9770) by [quinot](https://github.com/quinot)) +- **[hub]** hub: get out of experimental. ([#9792](https://github.com/traefik/traefik/pull/9792) by [mpl](https://github.com/mpl)) +- **[k8s/crd]** Introduce traefik.io API Group CRDs ([#9765](https://github.com/traefik/traefik/pull/9765) by [rtribotte](https://github.com/rtribotte)) +- **[k8s/ingress,k8s/crd,k8s]** Native Kubernetes service load-balancing ([#9740](https://github.com/traefik/traefik/pull/9740) by [rtribotte](https://github.com/rtribotte)) +- **[middleware,metrics]** Add prometheus metric requests_total with headers ([#9783](https://github.com/traefik/traefik/pull/9783) by [rtribotte](https://github.com/rtribotte)) +- **[nomad]** Support multiple namespaces in the Nomad Provider ([#9794](https://github.com/traefik/traefik/pull/9794) by [rtribotte](https://github.com/rtribotte)) +- **[tracing]** Add support to send DataDog traces via Unix Socket ([#9714](https://github.com/traefik/traefik/pull/9714) by [der-eismann](https://github.com/der-eismann)) + +**Documentation:** +- docs: update order of log levels ([#9791](https://github.com/traefik/traefik/pull/9791) by [svx](https://github.com/svx)) + +**Misc:** +- Merge current v2.9 into v2.10 ([#9798](https://github.com/traefik/traefik/pull/9798) by [ldez](https://github.com/ldez)) + +## [v2.9.9](https://github.com/traefik/traefik/tree/v2.9.9) (2023-03-21) +[All Commits](https://github.com/traefik/traefik/compare/v2.9.8...v2.9.9) + +**Bug fixes:** +- **[acme]** Update go-acme/lego to v4.10.2 ([#9749](https://github.com/traefik/traefik/pull/9749) by [ldez](https://github.com/ldez)) +- **[http3]** Update quic-go to v0.33.0 ([#9737](https://github.com/traefik/traefik/pull/9737) by [ldez](https://github.com/ldez)) +- **[metrics]** Include user-defined default cert for traefik_tls_certs_not_after metric ([#9742](https://github.com/traefik/traefik/pull/9742) by [rtribotte](https://github.com/rtribotte)) +- **[middleware]** Update vulcand/oxy to a0e9f7ff1040 ([#9750](https://github.com/traefik/traefik/pull/9750) by [ldez](https://github.com/ldez)) +- **[nomad]** Fix default configuration settings for Nomad Provider ([#9758](https://github.com/traefik/traefik/pull/9758) by [aofei](https://github.com/aofei)) +- **[nomad]** Fix Nomad client TLS defaults ([#9795](https://github.com/traefik/traefik/pull/9795) by [rtribotte](https://github.com/rtribotte)) +- **[server]** Remove User-Agent header removal from ReverseProxy director func ([#9752](https://github.com/traefik/traefik/pull/9752) by [rtribotte](https://github.com/rtribotte)) + +**Documentation:** +- **[middleware]** Clarify ratelimit middleware ([#9777](https://github.com/traefik/traefik/pull/9777) by [mpl](https://github.com/mpl)) +- **[tcp]** Correcting variable name 'server address' in TCP Router ([#9743](https://github.com/traefik/traefik/pull/9743) by [ralphg6](https://github.com/ralphg6)) + +## [v2.9.8](https://github.com/traefik/traefik/tree/v2.9.8) (2023-02-15) +[All Commits](https://github.com/traefik/traefik/compare/v2.9.7...v2.9.8) + +**Bug fixes:** +- **[server]** Update golang.org/x/net to v0.7.0 ([#9716](https://github.com/traefik/traefik/pull/9716) by [ldez](https://github.com/ldez)) + ## [v2.9.7](https://github.com/traefik/traefik/tree/v2.9.7) (2023-02-14) [All Commits](https://github.com/traefik/traefik/compare/v2.9.6...v2.9.7) @@ -168,13 +208,7 @@ Release canceled. - **[acme]** Fix ACME panic ([#9365](https://github.com/traefik/traefik/pull/9365) by [ldez](https://github.com/ldez)) **Documentation:** -- Prepare release v2.9.0 ([#9409](https://github.com/traefik/traefik/pull/9409) by [tomMoulard](https://github.com/tomMoulard)) - **[metrics]** Rework metrics overview page ([#9366](https://github.com/traefik/traefik/pull/9366) by [ddtmachado](https://github.com/ddtmachado)) -- Prepare release v2.9.0-rc5 ([#9402](https://github.com/traefik/traefik/pull/9402) by [ldez](https://github.com/ldez)) -- Prepare release v2.9.0-rc4 ([#9372](https://github.com/traefik/traefik/pull/9372) by [kevinpollet](https://github.com/kevinpollet)) -- Prepare release v2.9.0-rc3 ([#9344](https://github.com/traefik/traefik/pull/9344) by [kevinpollet](https://github.com/kevinpollet)) -- Prepare release v2.9.0-rc2 ([6c2c561](https://github.com/traefik/traefik/commit/6c2c561d8f935d76ccd07d28e1455c7768adc153) by [ldez](https://github.com/ldez)) -- Prepare release v2.9.0-rc1 ([#9334](https://github.com/traefik/traefik/pull/9334) by [rtribotte](https://github.com/rtribotte)) **Misc:** - Merge current v2.8 into v2.9 ([#9400](https://github.com/traefik/traefik/pull/9400) by [ldez](https://github.com/ldez)) diff --git a/build.Dockerfile b/build.Dockerfile index cf4ab8608..6d4ba8625 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine +FROM golang:1.20-alpine RUN apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \ && update-ca-certificates \ diff --git a/cmd/traefik/traefik.go b/cmd/traefik/traefik.go index 95d6117ad..bd3daf14f 100644 --- a/cmd/traefik/traefik.go +++ b/cmd/traefik/traefik.go @@ -193,9 +193,14 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err tsProviders := initTailscaleProviders(staticConfiguration, &providerAggregator) + // Metrics + + metricRegistries := registerMetricClients(staticConfiguration.Metrics) + metricsRegistry := metrics.NewMultiRegistry(metricRegistries) + // Entrypoints - serverEntryPointsTCP, err := server.NewTCPEntryPoints(staticConfiguration.EntryPoints, staticConfiguration.HostResolver) + serverEntryPointsTCP, err := server.NewTCPEntryPoints(staticConfiguration.EntryPoints, staticConfiguration.HostResolver, metricsRegistry) if err != nil { return nil, err } @@ -243,11 +248,6 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err } } - // Metrics - - metricRegistries := registerMetricClients(staticConfiguration.Metrics) - metricsRegistry := metrics.NewMultiRegistry(metricRegistries) - // Service manager factory var spiffeX509Source *workloadapi.X509Source @@ -297,7 +297,7 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err tlsManager.UpdateConfigs(ctx, conf.TLS.Stores, conf.TLS.Options, conf.TLS.Certificates) gauge := metricsRegistry.TLSCertsNotAfterTimestampGauge() - for _, certificate := range tlsManager.GetCertificates() { + for _, certificate := range tlsManager.GetServerCertificates() { appendCertMetric(gauge, certificate) } }) diff --git a/docs/content/deprecation/features.md b/docs/content/deprecation/features.md index 6e8c1f740..fa41c56b0 100644 --- a/docs/content/deprecation/features.md +++ b/docs/content/deprecation/features.md @@ -2,4 +2,12 @@ This page is maintained and updated periodically to reflect our roadmap and any decisions around feature deprecation. -There is no feature deprecation in Traefik v3 for now. +| Feature | Deprecated | End of Support | Removal | +|-----------------------------------------------------------------------------------------------------|------------|----------------|---------| +| [Kubernetes CRDs API Version `traefik.io/v1alpha1`](#kubernetes-crds-api-version-traefikiov1alpha1) | 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`. diff --git a/docs/content/getting-started/install-traefik.md b/docs/content/getting-started/install-traefik.md index 9e4926fc0..a0a5df6ea 100644 --- a/docs/content/getting-started/install-traefik.md +++ b/docs/content/getting-started/install-traefik.md @@ -16,8 +16,8 @@ You can install Traefik with the following flavors: Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with one sample configuration file: -* [YAML](https://raw.githubusercontent.com/traefik/traefik/v2.9/traefik.sample.yml) -* [TOML](https://raw.githubusercontent.com/traefik/traefik/v2.9/traefik.sample.toml) +* [YAML](https://raw.githubusercontent.com/traefik/traefik/v3.0/traefik.sample.yml) +* [TOML](https://raw.githubusercontent.com/traefik/traefik/v3.0/traefik.sample.toml) ```bash docker run -d -p 8080:8080 -p 80:80 \ @@ -121,7 +121,7 @@ by defining and applying an IngressRoute CRD (`kubectl apply -f dashboard.yaml`) ```yaml # dashboard.yaml -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: dashboard diff --git a/docs/content/getting-started/quick-start.md b/docs/content/getting-started/quick-start.md index e1883040d..e4007910d 100644 --- a/docs/content/getting-started/quick-start.md +++ b/docs/content/getting-started/quick-start.md @@ -1,11 +1,11 @@ --- title: "Traefik Getting Started Quickly" -description: "Looking to get started with Traefik Proxy quickly? Read the technical documentation to learn a simple use case that leverages Docker." +description: "Looking to get started with Traefik Proxy quickly? Read the technical documentation to see a basic use case that leverages Docker." --- # Quick Start -A Simple Use Case Using Docker +A Basic Use Case Using Docker {: .subtitle } ![quickstart-diagram](../assets/img/quickstart-diagram.png) @@ -19,9 +19,9 @@ version: '3' services: reverse-proxy: - # The official v2 Traefik docker image + # The official v3 Traefik Docker image image: traefik:v3.0 - # Enables the web UI and tells Traefik to listen to docker + # Enables the web UI and tells Traefik to listen to Docker command: --api.insecure=true --providers.docker ports: # The HTTP port @@ -63,7 +63,7 @@ services: - "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)" ``` -The above defines `whoami`: a simple web service that outputs information about the machine it is deployed on (its IP address, host, and so on). +The above defines [`whoami`](https://github.com/traefik/whoami "Link to whoami app on GitHub"), a web service that outputs information about the machine it is deployed on (its IP address, host, etc.). Start the `whoami` service with the following command: @@ -71,9 +71,9 @@ Start the `whoami` service with the following command: docker-compose up -d whoami ``` -Go back to your browser (`http://localhost:8080/api/rawdata`) and see that Traefik has automatically detected the new container and updated its own configuration. +Browse `http://localhost:8080/api/rawdata` and see that Traefik has automatically detected the new container and updated its own configuration. -When Traefik detects new services, it creates the corresponding routes so you can call them ... _let's see!_ (Here, we're using curl) +When Traefik detects new services, it creates the corresponding routes, so you can call them ... _let's see!_ (Here, we're using curl) ```shell curl -H Host:whoami.docker.localhost http://127.0.0.1 @@ -95,7 +95,7 @@ Run more instances of your `whoami` service with the following command: docker-compose up -d --scale whoami=2 ``` -Go back to your browser (`http://localhost:8080/api/rawdata`) and see that Traefik has automatically detected the new instance of the container. +Browse to `http://localhost:8080/api/rawdata` and see that Traefik has automatically detected the new instance of the container. Finally, see that Traefik load-balances between the two instances of your service by running the following command twice: @@ -119,6 +119,6 @@ IP: 172.27.0.4 !!! question "Where to Go Next?" - Now that you have a basic understanding of how Traefik can automatically create the routes to your services and load balance them, it is time to dive into [the documentation](/) and let Traefik work for you! + Now that you have a basic understanding of how Traefik can automatically create the routes to your services and load balance them, it is time to dive into [the documentation](/ "Link to the docs landing page") and let Traefik work for you! {!traefik-for-business-applications.md!} diff --git a/docs/content/https/include-acme-multiple-domains-example.md b/docs/content/https/include-acme-multiple-domains-example.md index 8395887eb..e60d08f1c 100644 --- a/docs/content/https/include-acme-multiple-domains-example.md +++ b/docs/content/https/include-acme-multiple-domains-example.md @@ -22,7 +22,7 @@ deploy: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: blogtls diff --git a/docs/content/https/include-acme-multiple-domains-from-rule-example.md b/docs/content/https/include-acme-multiple-domains-from-rule-example.md index 9a758ab20..1052228c3 100644 --- a/docs/content/https/include-acme-multiple-domains-from-rule-example.md +++ b/docs/content/https/include-acme-multiple-domains-from-rule-example.md @@ -18,7 +18,7 @@ deploy: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: blogtls diff --git a/docs/content/https/include-acme-single-domain-example.md b/docs/content/https/include-acme-single-domain-example.md index b7f5c84f0..f6fad9af9 100644 --- a/docs/content/https/include-acme-single-domain-example.md +++ b/docs/content/https/include-acme-single-domain-example.md @@ -18,7 +18,7 @@ deploy: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: blogtls diff --git a/docs/content/https/tailscale.md b/docs/content/https/tailscale.md index a4ab0a79c..6cb2f3e6c 100644 --- a/docs/content/https/tailscale.md +++ b/docs/content/https/tailscale.md @@ -103,7 +103,7 @@ A certificate resolver requests certificates for a set of domain names inferred ``` ```yaml tab="Kubernetes" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: blogtls @@ -159,7 +159,7 @@ A certificate resolver requests certificates for a set of domain names inferred ``` ```yaml tab="Kubernetes" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: blogtls diff --git a/docs/content/https/tls.md b/docs/content/https/tls.md index f6d84f5ce..075c562c5 100644 --- a/docs/content/https/tls.md +++ b/docs/content/https/tls.md @@ -134,7 +134,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -195,7 +195,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -269,7 +269,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -279,7 +279,7 @@ spec: minVersion: VersionTLS12 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: mintls13 @@ -320,7 +320,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -330,7 +330,7 @@ spec: maxVersion: VersionTLS13 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: maxtls12 @@ -365,7 +365,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -410,7 +410,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -446,7 +446,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -485,7 +485,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -537,7 +537,7 @@ tls: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default diff --git a/docs/content/middlewares/http/addprefix.md b/docs/content/middlewares/http/addprefix.md index 995524ff2..e6f458f31 100644 --- a/docs/content/middlewares/http/addprefix.md +++ b/docs/content/middlewares/http/addprefix.md @@ -22,7 +22,7 @@ labels: ```yaml tab="Kubernetes" # Prefixing with /foo -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: add-foo diff --git a/docs/content/middlewares/http/basicauth.md b/docs/content/middlewares/http/basicauth.md index 7707f270b..d5118f855 100644 --- a/docs/content/middlewares/http/basicauth.md +++ b/docs/content/middlewares/http/basicauth.md @@ -28,7 +28,7 @@ labels: ```yaml tab="Kubernetes" # Declaring the user list -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -102,7 +102,7 @@ labels: ```yaml tab="Kubernetes" # Declaring the user list -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -183,7 +183,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -239,7 +239,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -276,7 +276,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: my-auth @@ -315,7 +315,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth diff --git a/docs/content/middlewares/http/buffering.md b/docs/content/middlewares/http/buffering.md index 6e9d7b9ab..85c21a62b 100644 --- a/docs/content/middlewares/http/buffering.md +++ b/docs/content/middlewares/http/buffering.md @@ -26,7 +26,7 @@ labels: ```yaml tab="Kubernetes" # Sets the maximum request body to 2MB -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: limit @@ -72,7 +72,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: limit @@ -111,7 +111,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: limit @@ -152,7 +152,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: limit @@ -191,7 +191,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: limit @@ -232,7 +232,7 @@ You can have the Buffering middleware replay the request using `retryExpression` ``` ```yaml tab="Kubernetes" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: limit diff --git a/docs/content/middlewares/http/chain.md b/docs/content/middlewares/http/chain.md index ce3806a5d..de0074426 100644 --- a/docs/content/middlewares/http/chain.md +++ b/docs/content/middlewares/http/chain.md @@ -30,7 +30,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test @@ -47,7 +47,7 @@ spec: middlewares: - name: secured --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: secured @@ -58,7 +58,7 @@ spec: - name: known-ips - name: auth-users --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: auth-users @@ -67,7 +67,7 @@ spec: users: - test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/ --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: https-only @@ -75,7 +75,7 @@ spec: redirectScheme: scheme: https --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: known-ips diff --git a/docs/content/middlewares/http/circuitbreaker.md b/docs/content/middlewares/http/circuitbreaker.md index 7ff406c17..6edaedbe9 100644 --- a/docs/content/middlewares/http/circuitbreaker.md +++ b/docs/content/middlewares/http/circuitbreaker.md @@ -38,7 +38,7 @@ labels: ```yaml tab="Kubernetes" # Latency Check -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: latency-check diff --git a/docs/content/middlewares/http/compress.md b/docs/content/middlewares/http/compress.md index 4a17c9430..4618fb245 100644 --- a/docs/content/middlewares/http/compress.md +++ b/docs/content/middlewares/http/compress.md @@ -23,7 +23,7 @@ labels: ```yaml tab="Kubernetes" # Enable compression -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-compress @@ -88,7 +88,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-compress @@ -131,7 +131,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-compress diff --git a/docs/content/middlewares/http/contenttype.md b/docs/content/middlewares/http/contenttype.md index b74bfa6c2..c4d78a359 100644 --- a/docs/content/middlewares/http/contenttype.md +++ b/docs/content/middlewares/http/contenttype.md @@ -26,7 +26,7 @@ labels: ```yaml tab="Kubernetes" # Enable auto-detection -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: autodetect diff --git a/docs/content/middlewares/http/digestauth.md b/docs/content/middlewares/http/digestauth.md index d49d8f581..dcd9ca284 100644 --- a/docs/content/middlewares/http/digestauth.md +++ b/docs/content/middlewares/http/digestauth.md @@ -22,7 +22,7 @@ labels: ```yaml tab="Kubernetes" # Declaring the user list -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -78,7 +78,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -138,7 +138,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -194,7 +194,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -231,7 +231,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: my-auth @@ -270,7 +270,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth diff --git a/docs/content/middlewares/http/errorpages.md b/docs/content/middlewares/http/errorpages.md index 3ec1c1e20..0f8b1798a 100644 --- a/docs/content/middlewares/http/errorpages.md +++ b/docs/content/middlewares/http/errorpages.md @@ -27,7 +27,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-errors diff --git a/docs/content/middlewares/http/forwardauth.md b/docs/content/middlewares/http/forwardauth.md index f7a038020..4738747b2 100644 --- a/docs/content/middlewares/http/forwardauth.md +++ b/docs/content/middlewares/http/forwardauth.md @@ -24,7 +24,7 @@ labels: ```yaml tab="Kubernetes" # Forward authentication to example.com -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -78,7 +78,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -115,7 +115,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -156,7 +156,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -203,7 +203,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -251,7 +251,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -304,7 +304,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -362,7 +362,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -427,7 +427,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth @@ -490,7 +490,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-auth diff --git a/docs/content/middlewares/http/grpcweb.md b/docs/content/middlewares/http/grpcweb.md index c76153a26..8b14214a2 100644 --- a/docs/content/middlewares/http/grpcweb.md +++ b/docs/content/middlewares/http/grpcweb.md @@ -23,7 +23,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-grpcweb diff --git a/docs/content/middlewares/http/headers.md b/docs/content/middlewares/http/headers.md index 739380b42..de39548cb 100644 --- a/docs/content/middlewares/http/headers.md +++ b/docs/content/middlewares/http/headers.md @@ -27,7 +27,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-header @@ -77,7 +77,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-header @@ -130,7 +130,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-header @@ -177,7 +177,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-header diff --git a/docs/content/middlewares/http/inflightreq.md b/docs/content/middlewares/http/inflightreq.md index d654da5fb..b7eefd84d 100644 --- a/docs/content/middlewares/http/inflightreq.md +++ b/docs/content/middlewares/http/inflightreq.md @@ -20,7 +20,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-inflightreq @@ -63,7 +63,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-inflightreq @@ -128,7 +128,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-inflightreq @@ -182,7 +182,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-inflightreq @@ -228,7 +228,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-inflightreq @@ -268,7 +268,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-inflightreq diff --git a/docs/content/middlewares/http/ipallowlist.md b/docs/content/middlewares/http/ipallowlist.md index a34d5da73..8892b4fcd 100644 --- a/docs/content/middlewares/http/ipallowlist.md +++ b/docs/content/middlewares/http/ipallowlist.md @@ -19,7 +19,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ipallowlist @@ -92,7 +92,7 @@ labels: ```yaml tab="Kubernetes" # Allowlisting Based on `X-Forwarded-For` with `depth=2` -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ipallowlist @@ -157,7 +157,7 @@ labels: ```yaml tab="Kubernetes" # Exclude from `X-Forwarded-For` -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ipallowlist diff --git a/docs/content/middlewares/http/overview.md b/docs/content/middlewares/http/overview.md index 5757b3335..500e5d38d 100644 --- a/docs/content/middlewares/http/overview.md +++ b/docs/content/middlewares/http/overview.md @@ -29,9 +29,9 @@ whoami: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: middlewares.traefik.containo.us + name: middlewares.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: Middleware @@ -40,7 +40,7 @@ spec: scope: Namespaced --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -50,7 +50,7 @@ spec: - /stripit --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroute diff --git a/docs/content/middlewares/http/passtlsclientcert.md b/docs/content/middlewares/http/passtlsclientcert.md index 4264dd711..92c5cc83b 100644 --- a/docs/content/middlewares/http/passtlsclientcert.md +++ b/docs/content/middlewares/http/passtlsclientcert.md @@ -25,7 +25,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-passtlsclientcert @@ -83,7 +83,7 @@ http: ```yaml tab="Kubernetes" # Pass all the available info in the `X-Forwarded-Tls-Client-Cert-Info` header - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-passtlsclientcert diff --git a/docs/content/middlewares/http/ratelimit.md b/docs/content/middlewares/http/ratelimit.md index ac6d68e9f..9ae94a31a 100644 --- a/docs/content/middlewares/http/ratelimit.md +++ b/docs/content/middlewares/http/ratelimit.md @@ -10,6 +10,8 @@ To Control the Number of Requests Going to a Service The RateLimit middleware ensures that services will receive a _fair_ amount of requests, and allows one to define what fair is. +It is based on a [token bucket](https://en.wikipedia.org/wiki/Token_bucket) implementation. In this analogy, the [average](#average) parameter (defined below) is the rate at which the bucket refills, and the [burst](#burst) is the size (volume) of the bucket. + ## Configuration Example ```yaml tab="Docker" @@ -23,7 +25,7 @@ labels: ```yaml tab="Kubernetes" # Here, an average of 100 requests per second is allowed. # In addition, a burst of 50 requests is allowed. -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -79,7 +81,7 @@ labels: ```yaml tab="Kubernetes" # 100 reqs/s -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -128,7 +130,7 @@ labels: ```yaml tab="Kubernetes" # 6 reqs/minute -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -174,7 +176,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -236,7 +238,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -317,7 +319,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -363,7 +365,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit @@ -403,7 +405,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-ratelimit diff --git a/docs/content/middlewares/http/redirectregex.md b/docs/content/middlewares/http/redirectregex.md index fe4da4b30..d2e146673 100644 --- a/docs/content/middlewares/http/redirectregex.md +++ b/docs/content/middlewares/http/redirectregex.md @@ -26,7 +26,7 @@ labels: ```yaml tab="Kubernetes" # Redirect with domain replacement -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-redirectregex diff --git a/docs/content/middlewares/http/redirectscheme.md b/docs/content/middlewares/http/redirectscheme.md index 14e715add..e32fecfbc 100644 --- a/docs/content/middlewares/http/redirectscheme.md +++ b/docs/content/middlewares/http/redirectscheme.md @@ -34,7 +34,7 @@ labels: ```yaml tab="Kubernetes" # Redirect to https -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-redirectscheme @@ -84,7 +84,7 @@ labels: ```yaml tab="Kubernetes" # Redirect to https -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-redirectscheme @@ -131,7 +131,7 @@ labels: ```yaml tab="Kubernetes" # Redirect to https -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-redirectscheme @@ -175,7 +175,7 @@ labels: ```yaml tab="Kubernetes" # Redirect to https -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-redirectscheme diff --git a/docs/content/middlewares/http/replacepath.md b/docs/content/middlewares/http/replacepath.md index f2ddf0758..2c44e9f75 100644 --- a/docs/content/middlewares/http/replacepath.md +++ b/docs/content/middlewares/http/replacepath.md @@ -24,7 +24,7 @@ labels: ```yaml tab="Kubernetes" # Replace the path with /foo -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-replacepath diff --git a/docs/content/middlewares/http/replacepathregex.md b/docs/content/middlewares/http/replacepathregex.md index 1acd76591..562d3d2f3 100644 --- a/docs/content/middlewares/http/replacepathregex.md +++ b/docs/content/middlewares/http/replacepathregex.md @@ -25,7 +25,7 @@ labels: ```yaml tab="Kubernetes" # Replace path with regex -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-replacepathregex diff --git a/docs/content/middlewares/http/retry.md b/docs/content/middlewares/http/retry.md index 187d107a6..9706ec69f 100644 --- a/docs/content/middlewares/http/retry.md +++ b/docs/content/middlewares/http/retry.md @@ -27,7 +27,7 @@ labels: ```yaml tab="Kubernetes" # Retry 4 times with exponential backoff -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-retry diff --git a/docs/content/middlewares/http/stripprefix.md b/docs/content/middlewares/http/stripprefix.md index 135f7e08a..4d0d7d567 100644 --- a/docs/content/middlewares/http/stripprefix.md +++ b/docs/content/middlewares/http/stripprefix.md @@ -24,7 +24,7 @@ labels: ```yaml tab="Kubernetes" # Strip prefix /foobar and /fiibar -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-stripprefix diff --git a/docs/content/middlewares/http/stripprefixregex.md b/docs/content/middlewares/http/stripprefixregex.md index f6e58d871..ba61de6fc 100644 --- a/docs/content/middlewares/http/stripprefixregex.md +++ b/docs/content/middlewares/http/stripprefixregex.md @@ -18,7 +18,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-stripprefixregex diff --git a/docs/content/middlewares/overview.md b/docs/content/middlewares/overview.md index eeb70ea4f..c01423123 100644 --- a/docs/content/middlewares/overview.md +++ b/docs/content/middlewares/overview.md @@ -37,7 +37,7 @@ whoami: ```yaml tab="Kubernetes IngressRoute" --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -47,7 +47,7 @@ spec: - /stripit --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroute diff --git a/docs/content/middlewares/tcp/inflightconn.md b/docs/content/middlewares/tcp/inflightconn.md index 9619cd63e..f9993a7f8 100644 --- a/docs/content/middlewares/tcp/inflightconn.md +++ b/docs/content/middlewares/tcp/inflightconn.md @@ -13,7 +13,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: test-inflightconn diff --git a/docs/content/middlewares/tcp/ipallowlist.md b/docs/content/middlewares/tcp/ipallowlist.md index fad1f9cbf..8aa5be01c 100644 --- a/docs/content/middlewares/tcp/ipallowlist.md +++ b/docs/content/middlewares/tcp/ipallowlist.md @@ -19,7 +19,7 @@ labels: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: test-ipallowlist diff --git a/docs/content/middlewares/tcp/overview.md b/docs/content/middlewares/tcp/overview.md index dfbdd3f9b..ec28af85d 100644 --- a/docs/content/middlewares/tcp/overview.md +++ b/docs/content/middlewares/tcp/overview.md @@ -29,9 +29,9 @@ whoami: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: middlewaretcps.traefik.containo.us + name: middlewaretcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: MiddlewareTCP @@ -40,7 +40,7 @@ spec: scope: Namespaced --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: foo-ip-allowlist @@ -51,7 +51,7 @@ spec: - 192.168.1.7 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: ingressroute diff --git a/docs/content/migration/v1-to-v2.md b/docs/content/migration/v1-to-v2.md index c020a9a85..8d93e48f3 100644 --- a/docs/content/migration/v1-to-v2.md +++ b/docs/content/migration/v1-to-v2.md @@ -110,7 +110,7 @@ Then any router can refer to an instance of the wanted middleware. ```yaml tab="K8s IngressRoute" # The definitions below require the definitions for the Middleware and IngressRoute kinds. # https://doc.traefik.io/traefik/reference/dynamic-configuration/kubernetes-crd/#definitions - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: basicauth @@ -123,7 +123,7 @@ Then any router can refer to an instance of the wanted middleware. - test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0 --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -281,7 +281,7 @@ Then, a [router's TLS field](../routing/routers/index.md#tls) can refer to one o ```yaml tab="K8s IngressRoute" # The definitions below require the definitions for the TLSOption and IngressRoute kinds. # https://doc.traefik.io/traefik/reference/dynamic-configuration/kubernetes-crd/#definitions - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: mytlsoption @@ -297,7 +297,7 @@ Then, a [router's TLS field](../routing/routers/index.md#tls) can refer to one o - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -443,7 +443,7 @@ To apply a redirection: ``` ```yaml tab="K8s IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: http-redirect-ingressroute @@ -461,7 +461,7 @@ To apply a redirection: - name: https-redirect --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: https-ingressroute @@ -478,7 +478,7 @@ To apply a redirection: tls: {} --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: https-redirect @@ -597,7 +597,7 @@ with the path `/admin` stripped, e.g. to `http://:/`. In this case, yo ```yaml tab="Kubernetes IngressRoute" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: http-redirect-ingressroute @@ -614,7 +614,7 @@ with the path `/admin` stripped, e.g. to `http://:/`. In this case, yo middlewares: - name: admin-stripprefix --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: admin-stripprefix diff --git a/docs/content/migration/v2-to-v3.md b/docs/content/migration/v2-to-v3.md index b52fa6703..4792467b0 100644 --- a/docs/content/migration/v2-to-v3.md +++ b/docs/content/migration/v2-to-v3.md @@ -82,3 +82,8 @@ In v3, the Marathon provider has been removed. ## InfluxDB v1 In v3, the InfluxDB v1 metrics provider has been removed because InfluxDB v1.x maintenance [ended in 2021](https://www.influxdata.com/blog/influxdb-oss-and-enterprise-roadmap-update-from-influxdays-emea/). + +### Kubernetes CRDs API Group `traefik.containo.us` + +In v3 the Kubernetes CRDs API Group `traefik.containo.us` has been removed. +Please use the API Group `traefik.io` instead. diff --git a/docs/content/migration/v2.md b/docs/content/migration/v2.md index 85634a0d9..60cb2b813 100644 --- a/docs/content/migration/v2.md +++ b/docs/content/migration/v2.md @@ -65,13 +65,19 @@ rules: verbs: - update - apiGroups: + - traefik.io - traefik.containo.us resources: - middlewares + - middlewaretcps - ingressroutes - traefikservices - ingressroutetcps + - ingressrouteudps - tlsoptions + - tlsstores + - serverstransports + - serverstransporttcps verbs: - get - list @@ -164,20 +170,23 @@ rules: verbs: - update - apiGroups: + - traefik.io - traefik.containo.us resources: - middlewares + - middlewaretcps - ingressroutes - traefikservices - ingressroutetcps - ingressrouteudps - tlsoptions - tlsstores + - serverstransports + - serverstransporttcps verbs: - get - list - watch - ``` After having both resources applied, Traefik will work properly. @@ -496,3 +505,18 @@ In `v2.9`, Traefik Pilot support has been removed. ### Nomad Namespace In `v2.10`, the `namespace` option of the Nomad provider is deprecated, please use the `namespaces` options instead. + +## v2.10 + +### Kubernetes CRDs + +In `v2.10`, the Kubernetes CRDs API Group `traefik.containo.us` is deprecated, and its support will end starting with Traefik v3. Please use the API Group `traefik.io` instead. + +As the Kubernetes CRD provider still works with both API Versions (`traefik.io/v1alpha1` and `traefik.containo.us/v1alpha1`), +it means that for the same kind, namespace and name, the provider will only keep the `traefik.io/v1alpha1` resource. + +In addition, the Kubernetes CRDs API Version `traefik.io/v1alpha1` will not be supported in Traefik v3 itself. + +### Traefik Hub + +In `v2.10`, Traefik Hub is GA and the `experimental.hub` flag is deprecated. diff --git a/docs/content/observability/logs.md b/docs/content/observability/logs.md index 806d37b05..5e22aa64d 100644 --- a/docs/content/observability/logs.md +++ b/docs/content/observability/logs.md @@ -64,7 +64,9 @@ log: #### `level` -By default, the `level` is set to `ERROR`. Alternative logging levels are `TRACE`, `DEBUG`, `PANIC`, `FATAL`, `ERROR`, `WARN`, and `INFO`. +By default, the `level` is set to `ERROR`. + +Alternative logging levels are `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`, and `PANIC`. ```yaml tab="File (YAML)" log: diff --git a/docs/content/observability/metrics/overview.md b/docs/content/observability/metrics/overview.md index 60d4e7d78..795d1a377 100644 --- a/docs/content/observability/metrics/overview.md +++ b/docs/content/observability/metrics/overview.md @@ -16,27 +16,31 @@ Traefik Proxy hosts an official Grafana dashboard for both [on-premises](https:/ ## Global Metrics -| Metric | Type | Description | -|---------------------------------------------|---------|---------------------------------------------------------| -| Config reload total | Count | The total count of configuration reloads. | -| Config reload last success | Gauge | The timestamp of the last configuration reload success. | -| TLS certificates not after | Gauge | The expiration date of certificates. | +| Metric | Type | [Labels](#labels) | Description | +|----------------------------|-------|--------------------------|--------------------------------------------------------------------| +| Config reload total | Count | | The total count of configuration reloads. | +| Config reload last success | Gauge | | The timestamp of the last configuration reload success. | +| Open connections | Gauge | `entrypoint`, `protocol` | The current count of open connections, by entrypoint and protocol. | +| TLS certificates not after | Gauge | | The expiration date of certificates. | ```prom tab="Prometheus" traefik_config_reloads_total traefik_config_last_reload_success +traefik_open_connections traefik_tls_certs_not_after ``` ```dd tab="Datadog" config.reload.total config.reload.lastSuccessTimestamp +open.connections tls.certs.notAfterTimestamp ``` ```influxdb tab="InfluxDB2" traefik.config.reload.total traefik.config.reload.lastSuccessTimestamp +traefik.open.connections traefik.tls.certs.notAfterTimestamp ``` @@ -44,23 +48,35 @@ traefik.tls.certs.notAfterTimestamp # Default prefix: "traefik" {prefix}.config.reload.total {prefix}.config.reload.lastSuccessTimestamp +{prefix}.open.connections {prefix}.tls.certs.notAfterTimestamp ``` ```opentelemetry tab="OpenTelemetry" traefik_config_reloads_total traefik_config_last_reload_success +traefik_open_connections traefik_tls_certs_not_after ``` -## EntryPoint Metrics +### Labels + +Here is a comprehensive list of labels that are provided by the global metrics: + +| Label | Description | example | +|---------------|----------------------------------------|----------------------| +| `entrypoint` | Entrypoint that handled the connection | "example_entrypoint" | +| `protocol` | Connection protocol | "TCP" | + +## HTTP Metrics + +### EntryPoint Metrics | Metric | Type | [Labels](#labels) | Description | |-----------------------|-----------|--------------------------------------------|---------------------------------------------------------------------| | Requests total | Count | `code`, `method`, `protocol`, `entrypoint` | The total count of HTTP requests received by an entrypoint. | | Requests TLS total | Count | `tls_version`, `tls_cipher`, `entrypoint` | The total count of HTTPS requests received by an entrypoint. | | Request duration | Histogram | `code`, `method`, `protocol`, `entrypoint` | Request processing duration histogram on an entrypoint. | -| Open connections | Count | `method`, `protocol`, `entrypoint` | The current count of open connections on an entrypoint. | | Requests bytes total | Count | `code`, `method`, `protocol`, `entrypoint` | The total size of HTTP requests in bytes handled by an entrypoint. | | Responses bytes total | Count | `code`, `method`, `protocol`, `entrypoint` | The total size of HTTP responses in bytes handled by an entrypoint. | @@ -68,7 +84,6 @@ traefik_tls_certs_not_after 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 ``` @@ -77,7 +92,6 @@ traefik_entrypoint_responses_bytes_total entrypoint.request.total entrypoint.request.tls.total entrypoint.request.duration -entrypoint.connections.open entrypoint.requests.bytes.total entrypoint.responses.bytes.total ``` @@ -86,7 +100,6 @@ entrypoint.responses.bytes.total traefik.entrypoint.requests.total traefik.entrypoint.requests.tls.total traefik.entrypoint.request.duration -traefik.entrypoint.connections.open traefik.entrypoint.requests.bytes.total traefik.entrypoint.responses.bytes.total ``` @@ -96,7 +109,6 @@ traefik.entrypoint.responses.bytes.total {prefix}.entrypoint.request.total {prefix}.entrypoint.request.tls.total {prefix}.entrypoint.request.duration -{prefix}.entrypoint.connections.open {prefix}.entrypoint.requests.bytes.total {prefix}.entrypoint.responses.bytes.total ``` @@ -110,14 +122,13 @@ traefik_entrypoint_requests_bytes_total traefik_entrypoint_responses_bytes_total ``` -## Router Metrics +### Router Metrics | Metric | Type | [Labels](#labels) | Description | |-----------------------|-----------|---------------------------------------------------|----------------------------------------------------------------| | Requests total | Count | `code`, `method`, `protocol`, `router`, `service` | The total count of HTTP requests handled by a router. | | Requests TLS total | Count | `tls_version`, `tls_cipher`, `router`, `service` | The total count of HTTPS requests handled by a router. | | Request duration | Histogram | `code`, `method`, `protocol`, `router`, `service` | Request processing duration histogram on a router. | -| Open connections | Count | `method`, `protocol`, `router`, `service` | The current count of open connections on a router. | | Requests bytes total | Count | `code`, `method`, `protocol`, `router`, `service` | The total size of HTTP requests in bytes handled by a router. | | Responses bytes total | Count | `code`, `method`, `protocol`, `router`, `service` | The total size of HTTP responses in bytes handled by a router. | @@ -125,7 +136,6 @@ traefik_entrypoint_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 ``` @@ -134,7 +144,6 @@ traefik_router_responses_bytes_total router.request.total router.request.tls.total router.request.duration -router.connections.open router.requests.bytes.total router.responses.bytes.total ``` @@ -143,7 +152,6 @@ router.responses.bytes.total traefik.router.requests.total traefik.router.requests.tls.total traefik.router.request.duration -traefik.router.connections.open traefik.router.requests.bytes.total traefik.router.responses.bytes.total ``` @@ -153,7 +161,6 @@ traefik.router.responses.bytes.total {prefix}.router.request.total {prefix}.router.request.tls.total {prefix}.router.request.duration -{prefix}.router.connections.open {prefix}.router.requests.bytes.total {prefix}.router.responses.bytes.total ``` @@ -167,14 +174,13 @@ traefik_router_requests_bytes_total traefik_router_responses_bytes_total ``` -## Service Metrics +### Service Metrics | Metric | Type | Labels | Description | |-----------------------|-----------|-----------------------------------------|-------------------------------------------------------------| | Requests total | Count | `code`, `method`, `protocol`, `service` | The total count of HTTP requests processed on a service. | | Requests TLS total | Count | `tls_version`, `tls_cipher`, `service` | The total count of HTTPS requests processed on a service. | | Request duration | Histogram | `code`, `method`, `protocol`, `service` | Request processing duration histogram on a service. | -| Open connections | Count | `method`, `protocol`, `service` | The current count of open connections on a service. | | Retries total | Count | `service` | The count of requests retries on a service. | | Server UP | Gauge | `service`, `url` | Current service's server status, 0 for a down or 1 for up. | | Requests bytes total | Count | `code`, `method`, `protocol`, `service` | The total size of requests in bytes received by a service. | @@ -184,7 +190,6 @@ traefik_router_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 @@ -195,7 +200,6 @@ traefik_service_responses_bytes_total service.request.total router.service.tls.total service.request.duration -service.connections.open service.retries.total service.server.up service.requests.bytes.total @@ -206,7 +210,6 @@ service.responses.bytes.total traefik.service.requests.total traefik.service.requests.tls.total traefik.service.request.duration -traefik.service.connections.open traefik.service.retries.total traefik.service.server.up traefik.service.requests.bytes.total @@ -218,7 +221,6 @@ traefik.service.responses.bytes.total {prefix}.service.request.total {prefix}.service.request.tls.total {prefix}.service.request.duration -{prefix}.service.connections.open {prefix}.service.retries.total {prefix}.service.server.up {prefix}.service.requests.bytes.total @@ -236,7 +238,7 @@ traefik_service_requests_bytes_total traefik_service_responses_bytes_total ``` -## Labels +### Labels Here is a comprehensive list of labels that are provided by the metrics: diff --git a/docs/content/observability/metrics/prometheus.md b/docs/content/observability/metrics/prometheus.md index da7f73773..be3e29cb6 100644 --- a/docs/content/observability/metrics/prometheus.md +++ b/docs/content/observability/metrics/prometheus.md @@ -165,3 +165,66 @@ metrics: ```bash tab="CLI" --metrics.prometheus.manualrouting=true ``` + +#### `headerLabels` + +_Optional_ + +Defines the extra labels for the `requests_total` metrics, and for each of them, the request header containing the value for this label. +Please note that if the header is not present in the request it will be added nonetheless with an empty value. +In addition, the label should be a valid label name for Prometheus metrics, +otherwise, the Prometheus metrics provider will fail to serve any Traefik-related metric. + +```yaml tab="File (YAML)" +metrics: + prometheus: + headerLabels: + label: headerKey +``` + +```toml tab="File (TOML)" +[metrics] + [metrics.prometheus] + [metrics.prometheus.headerLabels] + label = "headerKey" +``` + +```bash tab="CLI" +--metrics.prometheus.headerlabels.label=headerKey +``` + +##### Example + +Here is an example of the entryPoint `requests_total` metric with an additional "useragent" label. + +When configuring the label in Static Configuration: + +```yaml tab="File (YAML)" +metrics: + prometheus: + headerLabels: + useragent: User-Agent +``` + +```toml tab="File (TOML)" +[metrics] + [metrics.prometheus] + [metrics.prometheus.headerLabels] + useragent = "User-Agent" +``` + +```bash tab="CLI" +--metrics.prometheus.headerlabels.useragent=User-Agent +``` + +And performing a request with a custom User-Agent: + +```bash +curl -H "User-Agent: foobar" http://localhost +``` + +The following metric is produced : + +```bash +traefik_entrypoint_requests_total{code="200",entrypoint="web",method="GET",protocol="http",useragent="foobar"} 1 +``` \ No newline at end of file diff --git a/docs/content/observability/tracing/datadog.md b/docs/content/observability/tracing/datadog.md index a6c93f22a..fe14bc72f 100644 --- a/docs/content/observability/tracing/datadog.md +++ b/docs/content/observability/tracing/datadog.md @@ -23,24 +23,46 @@ tracing: #### `localAgentHostPort` -_Required, Default="127.0.0.1:8126"_ +_Optional, Default="localhost:8126"_ Local Agent Host Port instructs the reporter to send spans to the Datadog Agent at this address (host:port). ```yaml tab="File (YAML)" tracing: datadog: - localAgentHostPort: 127.0.0.1:8126 + localAgentHostPort: localhost:8126 ``` ```toml tab="File (TOML)" [tracing] [tracing.datadog] - localAgentHostPort = "127.0.0.1:8126" + localAgentHostPort = "localhost:8126" ``` ```bash tab="CLI" ---tracing.datadog.localAgentHostPort=127.0.0.1:8126 +--tracing.datadog.localAgentHostPort=localhost:8126 +``` + +#### `localAgentSocket` + +_Optional, Default=""_ + +Local Agent Socket instructs the reporter to send spans to the Datadog Agent at this UNIX socket. + +```yaml tab="File (YAML)" +tracing: + datadog: + localAgentSocket: /var/run/datadog/apm.socket +``` + +```toml tab="File (TOML)" +[tracing] + [tracing.datadog] + localAgentSocket = "/var/run/datadog/apm.socket" +``` + +```bash tab="CLI" +--tracing.datadog.localAgentSocket=/var/run/datadog/apm.socket ``` #### `debug` diff --git a/docs/content/operations/include-api-examples.md b/docs/content/operations/include-api-examples.md index aa49dae33..d98db97a9 100644 --- a/docs/content/operations/include-api-examples.md +++ b/docs/content/operations/include-api-examples.md @@ -20,7 +20,7 @@ deploy: ``` ```yaml tab="Kubernetes CRD" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: traefik-dashboard @@ -34,7 +34,7 @@ spec: middlewares: - name: auth --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: auth diff --git a/docs/content/operations/include-dashboard-examples.md b/docs/content/operations/include-dashboard-examples.md index 9d90c42c4..5965d7070 100644 --- a/docs/content/operations/include-dashboard-examples.md +++ b/docs/content/operations/include-dashboard-examples.md @@ -20,7 +20,7 @@ deploy: ``` ```yaml tab="Kubernetes CRD" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: traefik-dashboard @@ -34,7 +34,7 @@ spec: middlewares: - name: auth --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: auth diff --git a/docs/content/providers/docker.md b/docs/content/providers/docker.md index 8c935c198..177a39702 100644 --- a/docs/content/providers/docker.md +++ b/docs/content/providers/docker.md @@ -440,10 +440,11 @@ _Optional, Default=```Host(`{{ normalize .Name }}`)```_ The `defaultRule` option defines what routing rule to apply to a container if no rule is defined by a label. -It must be a valid [Go template](https://pkg.go.dev/text/template/), and can use -[sprig template functions](https://masterminds.github.io/sprig/). -The container service name can be accessed with the `Name` identifier, -and the template has access to all the labels defined on this container. +It must be a valid [Go template](https://pkg.go.dev/text/template/), +and can use [sprig template functions](https://masterminds.github.io/sprig/). +The container name can be accessed with the `ContainerName` identifier. +The service name can be accessed with the `Name` identifier. +The template has access to all the labels defined on this container with the `Labels` identifier. ```yaml tab="File (YAML)" providers: diff --git a/docs/content/providers/kubernetes-crd.md b/docs/content/providers/kubernetes-crd.md index dccc60eb6..26579d758 100644 --- a/docs/content/providers/kubernetes-crd.md +++ b/docs/content/providers/kubernetes-crd.md @@ -35,10 +35,10 @@ the Traefik engineering team developed a [Custom Resource Definition](https://ku ```bash # Install Traefik Resource Definitions: - kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml + kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml # Install RBAC for Traefik: - kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml + kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml ``` ## Resource Configuration diff --git a/docs/content/providers/kubernetes-ingress.md b/docs/content/providers/kubernetes-ingress.md index 4d915a596..d6eb1b4e9 100644 --- a/docs/content/providers/kubernetes-ingress.md +++ b/docs/content/providers/kubernetes-ingress.md @@ -531,6 +531,6 @@ providers: ### Further 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.9/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository. +many examples of Ingresses definitions are located in the test [examples](https://github.com/traefik/traefik/tree/v3.0/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository. {!traefik-for-business-applications.md!} diff --git a/docs/content/providers/nomad.md b/docs/content/providers/nomad.md index 3bc27d3b2..90b3eeb4d 100644 --- a/docs/content/providers/nomad.md +++ b/docs/content/providers/nomad.md @@ -442,6 +442,36 @@ For additional information, refer to [Restrict the Scope of Service Discovery](. ### `namespaces` +??? warning "Deprecated in favor of the [`namespaces`](#namespaces) option." + + _Optional, Default=""_ + + The `namespace` option defines the namespace in which the Nomad services will be discovered. + + !!! warning + + One should only define either the `namespaces` option or the `namespace` option. + + ```yaml tab="File (YAML)" + providers: + nomad: + namespace: "production" + # ... + ``` + + ```toml tab="File (TOML)" + [providers.nomad] + namespace = "production" + # ... + ``` + + ```bash tab="CLI" + --providers.nomad.namespace=production + # ... + ``` + +### `namespaces` + _Optional, Default=""_ The `namespaces` option defines the namespaces in which the nomad services will be discovered. diff --git a/docs/content/providers/overview.md b/docs/content/providers/overview.md index 47d6178e8..fbb133589 100644 --- a/docs/content/providers/overview.md +++ b/docs/content/providers/overview.md @@ -82,7 +82,7 @@ For the list of the providers names, see the [supported providers](#supported-pr ``` ```yaml tab="Kubernetes Ingress Route" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutestripprefix @@ -104,7 +104,7 @@ For the list of the providers names, see the [supported providers](#supported-pr ``` ```yaml tab="Kubernetes Ingress" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml index fe3187a7d..37849dedc 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressroutes.traefik.containo.us + name: ingressroutes.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRoute listKind: IngressRouteList @@ -104,6 +104,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes @@ -274,9 +281,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressroutetcps.traefik.containo.us + name: ingressroutetcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRouteTCP listKind: IngressRouteTCPList @@ -357,6 +364,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean port: anyOf: - type: integer @@ -486,9 +500,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressrouteudps.traefik.containo.us + name: ingressrouteudps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRouteUDP listKind: IngressRouteUDPList @@ -543,6 +557,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean port: anyOf: - type: integer @@ -584,9 +605,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: middlewares.traefik.containo.us + name: middlewares.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: Middleware listKind: MiddlewareList @@ -819,6 +840,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if + the only child is the Kubernetes Service clusterIP. The + Kubernetes Service itself does load-balance to the pods. + By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. @@ -1479,9 +1507,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: middlewaretcps.traefik.containo.us + name: middlewaretcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: MiddlewareTCP listKind: MiddlewareTCPList @@ -1551,9 +1579,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: serverstransports.traefik.containo.us + name: serverstransports.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: ServersTransport listKind: ServersTransportList @@ -1692,9 +1720,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: serverstransporttcps.traefik.containo.us + name: serverstransporttcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: ServersTransportTCP listKind: ServersTransportTCPList @@ -1708,7 +1736,7 @@ spec: description: 'ServersTransportTCP is the CRD implementation of a TCPServersTransport. If no tcpServersTransport is specified, a default one named default@internal will be used. The default@internal tcpServersTransport can be configured - in the static configuration. More info: https://doc.traefik.io/traefik/v2.9/routing/services/#serverstransport_3' + in the static configuration. More info: https://doc.traefik.io/traefik/v3.0/routing/services/#serverstransport_3' properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -1814,9 +1842,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: tlsoptions.traefik.containo.us + name: tlsoptions.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TLSOption listKind: TLSOptionList @@ -1921,9 +1949,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: tlsstores.traefik.containo.us + name: tlsstores.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TLSStore listKind: TLSStoreList @@ -2020,9 +2048,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: traefikservices.traefik.containo.us + name: traefikservices.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TraefikService listKind: TraefikServiceList @@ -2089,6 +2117,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or + if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. @@ -2180,6 +2215,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if the + only child is the Kubernetes Service clusterIP. The Kubernetes + Service itself does load-balance to the pods. By default, NativeLB + is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. By default, @@ -2277,6 +2319,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or + if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml index 8319e66aa..4fb320d42 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1beta1.yml @@ -1,10 +1,10 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: ingressroutes.traefik.containo.us + name: ingressroutes.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: IngressRoute @@ -16,10 +16,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: middlewares.traefik.containo.us + name: middlewares.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: Middleware @@ -31,10 +31,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: middlewaretcps.traefik.containo.us + name: middlewaretcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: MiddlewareTCP @@ -46,10 +46,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: ingressroutetcps.traefik.containo.us + name: ingressroutetcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: IngressRouteTCP @@ -61,10 +61,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: ingressrouteudps.traefik.containo.us + name: ingressrouteudps.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: IngressRouteUDP @@ -76,10 +76,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: tlsoptions.traefik.containo.us + name: tlsoptions.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: TLSOption @@ -91,10 +91,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: tlsstores.traefik.containo.us + name: tlsstores.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: TLSStore @@ -106,10 +106,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: traefikservices.traefik.containo.us + name: traefikservices.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: TraefikService @@ -121,10 +121,10 @@ spec: apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: serverstransports.traefik.containo.us + name: serverstransports.traefik.io spec: - group: traefik.containo.us + group: traefik.io version: v1alpha1 names: kind: ServersTransport diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml index dc8357cb6..301ec5166 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml @@ -32,7 +32,7 @@ rules: verbs: - update - apiGroups: - - traefik.containo.us + - traefik.io resources: - middlewares - middlewaretcps diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-resource.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-resource.yml index 27689e9a8..93f1a95ff 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-resource.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-resource.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -17,7 +17,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -34,7 +34,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -53,7 +53,7 @@ spec: percent: 20 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror2 @@ -73,7 +73,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroute @@ -133,7 +133,7 @@ spec: namespace: default --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: ingressroutetcp.crd @@ -158,7 +158,7 @@ spec: namespace: default --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: ingressrouteudp.crd @@ -173,7 +173,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: tlsoption @@ -199,7 +199,7 @@ spec: - foobar --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -223,7 +223,7 @@ spec: disableHTTP2: true --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransporttcp diff --git a/docs/content/reference/dynamic-configuration/kubernetes-gateway-resource.yml b/docs/content/reference/dynamic-configuration/kubernetes-gateway-resource.yml index 55c394456..a22858a69 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-gateway-resource.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-gateway-resource.yml @@ -74,7 +74,7 @@ spec: value: /foo backendRefs: - - group: traefik.containo.us + - group: traefik.io kind: TraefikService name: myservice@file weight: 1 diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_ingressroutes.yaml b/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml similarity index 96% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_ingressroutes.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml index b6c0eff29..8ea5b28c2 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_ingressroutes.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressroutes.traefik.containo.us + name: ingressroutes.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRoute listKind: IngressRouteList @@ -104,6 +104,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_ingressroutetcps.yaml b/docs/content/reference/dynamic-configuration/traefik.io_ingressroutetcps.yaml similarity index 94% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_ingressroutetcps.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_ingressroutetcps.yaml index 4fd7e214d..7acb7cd5f 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_ingressroutetcps.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_ingressroutetcps.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressroutetcps.traefik.containo.us + name: ingressroutetcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRouteTCP listKind: IngressRouteTCPList @@ -89,6 +89,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean port: anyOf: - type: integer diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_ingressrouteudps.yaml b/docs/content/reference/dynamic-configuration/traefik.io_ingressrouteudps.yaml similarity index 87% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_ingressrouteudps.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_ingressrouteudps.yaml index 50a7e6298..59585a453 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_ingressrouteudps.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_ingressrouteudps.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressrouteudps.traefik.containo.us + name: ingressrouteudps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRouteUDP listKind: IngressRouteUDPList @@ -63,6 +63,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean port: anyOf: - type: integer diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml b/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml similarity index 98% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml index 9994d3469..67b9e0b5d 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: middlewares.traefik.containo.us + name: middlewares.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: Middleware listKind: MiddlewareList @@ -241,6 +241,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if + the only child is the Kubernetes Service clusterIP. The + Kubernetes Service itself does load-balance to the pods. + By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewaretcps.yaml b/docs/content/reference/dynamic-configuration/traefik.io_middlewaretcps.yaml similarity index 97% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_middlewaretcps.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_middlewaretcps.yaml index 071b49cf8..ec5ee7e68 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewaretcps.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_middlewaretcps.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: middlewaretcps.traefik.containo.us + name: middlewaretcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: MiddlewareTCP listKind: MiddlewareTCPList diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_serverstransports.yaml b/docs/content/reference/dynamic-configuration/traefik.io_serverstransports.yaml similarity index 98% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_serverstransports.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_serverstransports.yaml index 362db4f49..fff9f7006 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_serverstransports.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_serverstransports.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: serverstransports.traefik.containo.us + name: serverstransports.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: ServersTransport listKind: ServersTransportList diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_serverstransporttcps.yaml b/docs/content/reference/dynamic-configuration/traefik.io_serverstransporttcps.yaml similarity index 97% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_serverstransporttcps.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_serverstransporttcps.yaml index 0a54dd137..10e0a3f0e 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_serverstransporttcps.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_serverstransporttcps.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: serverstransporttcps.traefik.containo.us + name: serverstransporttcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: ServersTransportTCP listKind: ServersTransportTCPList @@ -22,7 +22,7 @@ spec: description: 'ServersTransportTCP is the CRD implementation of a TCPServersTransport. If no tcpServersTransport is specified, a default one named default@internal will be used. The default@internal tcpServersTransport can be configured - in the static configuration. More info: https://doc.traefik.io/traefik/v2.9/routing/services/#serverstransport_3' + in the static configuration. More info: https://doc.traefik.io/traefik/v3.0/routing/services/#serverstransport_3' properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_tlsoptions.yaml b/docs/content/reference/dynamic-configuration/traefik.io_tlsoptions.yaml similarity index 98% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_tlsoptions.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_tlsoptions.yaml index ffbd86ec1..ddf525ceb 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_tlsoptions.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_tlsoptions.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: tlsoptions.traefik.containo.us + name: tlsoptions.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TLSOption listKind: TLSOptionList diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_tlsstores.yaml b/docs/content/reference/dynamic-configuration/traefik.io_tlsstores.yaml similarity index 98% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_tlsstores.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_tlsstores.yaml index 9e35d6897..61d7063c0 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_tlsstores.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_tlsstores.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: tlsstores.traefik.containo.us + name: tlsstores.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TLSStore listKind: TLSStoreList diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_traefikservices.yaml b/docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml similarity index 93% rename from docs/content/reference/dynamic-configuration/traefik.containo.us_traefikservices.yaml rename to docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml index 3289806f9..870dfdf53 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_traefikservices.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_traefikservices.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: traefikservices.traefik.containo.us + name: traefikservices.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TraefikService listKind: TraefikServiceList @@ -75,6 +75,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or + if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. @@ -166,6 +173,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if the + only child is the Kubernetes Service clusterIP. The Kubernetes + Service itself does load-balance to the pods. By default, NativeLB + is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. By default, @@ -263,6 +277,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or + if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. diff --git a/docs/content/reference/static-configuration/cli-ref.md b/docs/content/reference/static-configuration/cli-ref.md index fa5c9759f..ac90226ce 100644 --- a/docs/content/reference/static-configuration/cli-ref.md +++ b/docs/content/reference/static-configuration/cli-ref.md @@ -189,9 +189,6 @@ WriteTimeout is the maximum duration before timing out writes of the response. I `--entrypoints..udp.timeout`: Timeout defines how long to wait on an idle session before releasing the related resources. (Default: ```3```) -`--experimental.hub`: -Enable the Traefik Hub provider. (Default: ```false```) - `--experimental.kubernetesgateway`: Allow the Kubernetes gateway api provider usage. (Default: ```false```) @@ -381,6 +378,9 @@ Buckets for latency metrics. (Default: ```0.100000, 0.300000, 1.200000, 5.000000 `--metrics.prometheus.entrypoint`: EntryPoint (Default: ```traefik```) +`--metrics.prometheus.headerlabels.`: +Defines the extra labels for the requests_total metrics, and for each of them, the request header containing the value for this label. + `--metrics.prometheus.manualrouting`: Manual routing (Default: ```false```) @@ -775,7 +775,7 @@ Constraints is an expression that Traefik matches against the Nomad service's ta Default rule. (Default: ```Host(`{{ normalize .Name }}`)```) `--providers.nomad.endpoint.address`: -The address of the Nomad server, including scheme and port. +The address of the Nomad server, including scheme and port. (Default: ```http://127.0.0.1:4646```) `--providers.nomad.endpoint.endpointwaittime`: WaitTime limits how long a Watch will block. If not provided, the agent default values will be used (Default: ```0```) @@ -945,6 +945,9 @@ Sets a list of key:value tags on all spans. `--tracing.datadog.localagenthostport`: Sets the Datadog Agent host:port. (Default: ```localhost:8126```) +`--tracing.datadog.localagentsocket`: +Sets the socket for the Datadog Agent. + `--tracing.datadog.parentidheadername`: Sets the header name used to store the parent ID. diff --git a/docs/content/reference/static-configuration/env-ref.md b/docs/content/reference/static-configuration/env-ref.md index 4a951b462..31748c91c 100644 --- a/docs/content/reference/static-configuration/env-ref.md +++ b/docs/content/reference/static-configuration/env-ref.md @@ -189,9 +189,6 @@ WriteTimeout is the maximum duration before timing out writes of the response. I `TRAEFIK_ENTRYPOINTS__UDP_TIMEOUT`: Timeout defines how long to wait on an idle session before releasing the related resources. (Default: ```3```) -`TRAEFIK_EXPERIMENTAL_HUB`: -Enable the Traefik Hub provider. (Default: ```false```) - `TRAEFIK_EXPERIMENTAL_KUBERNETESGATEWAY`: Allow the Kubernetes gateway api provider usage. (Default: ```false```) @@ -381,6 +378,9 @@ Buckets for latency metrics. (Default: ```0.100000, 0.300000, 1.200000, 5.000000 `TRAEFIK_METRICS_PROMETHEUS_ENTRYPOINT`: EntryPoint (Default: ```traefik```) +`TRAEFIK_METRICS_PROMETHEUS_HEADERLABELS_`: +Defines the extra labels for the requests_total metrics, and for each of them, the request header containing the value for this label. + `TRAEFIK_METRICS_PROMETHEUS_MANUALROUTING`: Manual routing (Default: ```false```) @@ -775,7 +775,7 @@ Constraints is an expression that Traefik matches against the Nomad service's ta Default rule. (Default: ```Host(`{{ normalize .Name }}`)```) `TRAEFIK_PROVIDERS_NOMAD_ENDPOINT_ADDRESS`: -The address of the Nomad server, including scheme and port. +The address of the Nomad server, including scheme and port. (Default: ```http://127.0.0.1:4646```) `TRAEFIK_PROVIDERS_NOMAD_ENDPOINT_ENDPOINTWAITTIME`: WaitTime limits how long a Watch will block. If not provided, the agent default values will be used (Default: ```0```) @@ -945,6 +945,9 @@ Sets a list of key:value tags on all spans. `TRAEFIK_TRACING_DATADOG_LOCALAGENTHOSTPORT`: Sets the Datadog Agent host:port. (Default: ```localhost:8126```) +`TRAEFIK_TRACING_DATADOG_LOCALAGENTSOCKET`: +Sets the socket for the Datadog Agent. + `TRAEFIK_TRACING_DATADOG_PARENTIDHEADERNAME`: Sets the header name used to store the parent ID. diff --git a/docs/content/reference/static-configuration/file.toml b/docs/content/reference/static-configuration/file.toml index 8bff3f0a2..b08074bb6 100644 --- a/docs/content/reference/static-configuration/file.toml +++ b/docs/content/reference/static-configuration/file.toml @@ -256,6 +256,9 @@ addServicesLabels = true entryPoint = "foobar" manualRouting = true + [metrics.prometheus.headerLabels] + label1 = "foobar" + label2 = "foobar" [metrics.datadog] address = "foobar" pushInterval = "42s" @@ -359,6 +362,7 @@ sampleRate = 42.0 [tracing.datadog] localAgentHostPort = "foobar" + localAgentSocket = "foobar" [tracing.datadog.globalTags] tag1 = "foobar" tag2 = "foobar" @@ -436,7 +440,7 @@ [experimental] kubernetesGateway = true - hub = true + http3 = true [experimental.plugins] [experimental.plugins.Descriptor0] moduleName = "foobar" diff --git a/docs/content/reference/static-configuration/file.yaml b/docs/content/reference/static-configuration/file.yaml index e6b100632..cb6f3c257 100644 --- a/docs/content/reference/static-configuration/file.yaml +++ b/docs/content/reference/static-configuration/file.yaml @@ -285,6 +285,9 @@ metrics: addServicesLabels: true entryPoint: foobar manualRouting: true + headerLabels: + label1: foobar + label2: foobar datadog: address: foobar pushInterval: 42s @@ -389,6 +392,7 @@ tracing: sampleRate: 42 datadog: localAgentHostPort: foobar + localAgentSocket: foobar globalTags: tag1: foobar tag2: foobar @@ -465,7 +469,7 @@ hub: key: foobar experimental: kubernetesGateway: true - hub: true + http3: true plugins: Descriptor0: moduleName: foobar diff --git a/docs/content/routing/providers/kubernetes-crd.md b/docs/content/routing/providers/kubernetes-crd.md index b317e3042..c25070808 100644 --- a/docs/content/routing/providers/kubernetes-crd.md +++ b/docs/content/routing/providers/kubernetes-crd.md @@ -107,7 +107,7 @@ The Kubernetes Ingress Controller, The Custom Resource Way. ``` ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: myingressroute @@ -125,7 +125,7 @@ The Kubernetes Ingress Controller, The Custom Resource Way. port: 80 --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: ingressroute.tcp @@ -141,7 +141,7 @@ The Kubernetes Ingress Controller, The Custom Resource Way. port: 8080 --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: ingressroute.udp @@ -317,7 +317,7 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne !!! info "IngressRoute Attributes" ```yaml - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: foo @@ -350,15 +350,16 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne sameSite: none strategy: RoundRobin weight: 10 - tls: # [11] - secretName: supersecret # [12] - options: # [13] - name: opt # [14] - namespace: default # [15] - certResolver: foo # [16] - domains: # [17] - - main: example.net # [18] - sans: # [19] + nativeLB: true # [11] + tls: # [12] + secretName: supersecret # [13] + options: # [14] + name: opt # [15] + namespace: default # [16] + certResolver: foo # [17] + domains: # [18] + - main: example.net # [19] + sans: # [20] - a.example.net - b.example.net ``` @@ -375,21 +376,22 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne | [8] | `routes[n].services` | List of any combination of [TraefikService](#kind-traefikservice) and reference to a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) (See below for `ExternalName Service` setup) | | [9] | `services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port. | | [10] | `services[n].serversTransport` | Defines the reference to a [ServersTransport](#kind-serverstransport). The ServersTransport namespace is assumed to be the [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) namespace (see [ServersTransport reference](#serverstransport-reference)). | -| [11] | `tls` | Defines [TLS](../routers/index.md#tls) certificate configuration | -| [12] | `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace) | -| [13] | `tls.options` | Defines the reference to a [TLSOption](#kind-tlsoption) | -| [14] | `options.name` | Defines the [TLSOption](#kind-tlsoption) name | -| [15] | `options.namespace` | Defines the [TLSOption](#kind-tlsoption) namespace | -| [16] | `tls.certResolver` | Defines the reference to a [CertResolver](../routers/index.md#certresolver) | -| [17] | `tls.domains` | List of [domains](../routers/index.md#domains) | -| [18] | `domains[n].main` | Defines the main domain name | -| [19] | `domains[n].sans` | List of SANs (alternative domains) | +| [11] | `services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. | +| [12] | `tls` | Defines [TLS](../routers/index.md#tls) certificate configuration | +| [13] | `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace) | +| [14] | `tls.options` | Defines the reference to a [TLSOption](#kind-tlsoption) | +| [15] | `options.name` | Defines the [TLSOption](#kind-tlsoption) name | +| [16] | `options.namespace` | Defines the [TLSOption](#kind-tlsoption) namespace | +| [17] | `tls.certResolver` | Defines the reference to a [CertResolver](../routers/index.md#certresolver) | +| [18] | `tls.domains` | List of [domains](../routers/index.md#domains) | +| [19] | `domains[n].main` | Defines the main domain name | +| [20] | `domains[n].sans` | List of SANs (alternative domains) | ??? example "Declaring an IngressRoute" ```yaml tab="IngressRoute" # All resources definition must be declared - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test-name @@ -436,7 +438,7 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne ```yaml tab="Middlewares" # All resources definition must be declared # Prefixing with /foo - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: middleware1 @@ -447,7 +449,7 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne ``` ```yaml tab="TLSOption" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: opt @@ -493,7 +495,7 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne ```yaml tab="IngressRoute" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route @@ -523,7 +525,7 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne ```yaml tab="ExternalName Service" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route @@ -554,7 +556,7 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne ```yaml tab="Both sides" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route @@ -591,7 +593,7 @@ More information in the dedicated server [load balancing](../services/index.md#l !!! info "Declaring and using Kubernetes Service Load Balancing" ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -640,6 +642,47 @@ More information in the dedicated server [load balancing](../services/index.md#l task: app2 ``` +!!! important "Kubernetes Service Native Load-Balancing" + + To avoid creating the server load-balancer with the pods IPs and use Kubernetes Service clusterIP directly, + one should set the service `NativeLB` option to true. + Please note that, by default, Traefik reuses the established connections to the backends for performance purposes. This can prevent the requests load balancing between the replicas from behaving as one would expect when the option is set. + By default, `NativeLB` is false. + + ??? example "Example" + + ```yaml + --- + apiVersion: traefik.io/v1alpha1 + kind: IngressRoute + metadata: + name: test.route + namespace: default + + spec: + entryPoints: + - foo + + routes: + - match: Host(`example.net`) + kind: Rule + services: + - name: svc + port: 80 + # Here, nativeLB instructs to build the servers load balancer with the Kubernetes Service clusterIP only. + nativeLB: true + + --- + apiVersion: v1 + kind: Service + metadata: + name: svc + namespace: default + spec: + type: ClusterIP + ... + ``` + ### Kind: `Middleware` `Middleware` is the CRD implementation of a [Traefik middleware](../../middlewares/http/overview.md). @@ -649,7 +692,7 @@ Register the `Middleware` [kind](../../reference/dynamic-configuration/kubernete ??? "Declaring and Referencing a Middleware" ```yaml tab="Middleware" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -662,7 +705,7 @@ Register the `Middleware` [kind](../../reference/dynamic-configuration/kubernete ``` ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -720,7 +763,7 @@ More information in the dedicated [Weighted Round Robin](../services/index.md#we ??? "Declaring and Using Weighted Round Robin" ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -739,7 +782,7 @@ More information in the dedicated [Weighted Round Robin](../services/index.md#we ``` ```yaml tab="Weighted Round Robin" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -759,7 +802,7 @@ More information in the dedicated [Weighted Round Robin](../services/index.md#we weight: 1 --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -827,7 +870,7 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser ??? "Declaring and Using Mirroring" ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -847,7 +890,7 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser ```yaml tab="Mirroring k8s Service" # Mirroring from a k8s Service - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -868,7 +911,7 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser ```yaml tab="Mirroring Traefik Service" # Mirroring from a Traefik Service - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -937,7 +980,7 @@ and there is a second level because each whoami service is a `replicaset` and is ??? "Stickiness on two load-balancing levels" ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -956,7 +999,7 @@ and there is a second level because each whoami service is a `replicaset` and is ``` ```yaml tab="Weighted Round Robin" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -1083,7 +1126,7 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube !!! info "IngressRouteTCP Attributes" ```yaml - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: ingressroutetcpfoo @@ -1104,18 +1147,19 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube proxyProtocol: # [11] version: 1 # [12] serversTransport: transport # [13] - tls: # [14] - secretName: supersecret # [15] - options: # [16] - name: opt # [17] - namespace: default # [18] - certResolver: foo # [19] - domains: # [20] - - main: example.net # [21] - sans: # [22] + nativeLB: true # [14] + tls: # [15] + secretName: supersecret # [16] + options: # [17] + name: opt # [18] + namespace: default # [19] + certResolver: foo # [20] + domains: # [21] + - main: example.net # [22] + sans: # [23] - a.example.net - b.example.net - passthrough: false # [23] + passthrough: false # [24] ``` | Ref | Attribute | Purpose | @@ -1133,21 +1177,22 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube | [11] | `services[n].proxyProtocol` | Defines the [PROXY protocol](../services/index.md#proxy-protocol) configuration | | [12] | `services[n].proxyProtocol.version` | Defines the [PROXY protocol](../services/index.md#proxy-protocol) version | | [13] | `services[n].serversTransport` | Defines the reference to a [ServersTransportTCP](#kind-serverstransporttcp). The ServersTransport namespace is assumed to be the [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) namespace (see [ServersTransport reference](#serverstransport-reference)). | -| [14] | `tls` | Defines [TLS](../routers/index.md#tls_1) certificate configuration | -| [15] | `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace) | -| [16] | `tls.options` | Defines the reference to a [TLSOption](#kind-tlsoption) | -| [17] | `tls.options.name` | Defines the [TLSOption](#kind-tlsoption) name | -| [18] | `tls.options.namespace` | Defines the [TLSOption](#kind-tlsoption) namespace | -| [19] | `tls.certResolver` | Defines the reference to a [CertResolver](../routers/index.md#certresolver_1) | -| [20] | `tls.domains` | List of [domains](../routers/index.md#domains_1) | -| [21] | `tls.domains[n].main` | Defines the main domain name | -| [22] | `tls.domains[n].sans` | List of SANs (alternative domains) | -| [23] | `tls.passthrough` | If `true`, delegates the TLS termination to the backend | +| [14] | `services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. | +| [15] | `tls` | Defines [TLS](../routers/index.md#tls_1) certificate configuration | +| [16] | `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace) | +| [17] | `tls.options` | Defines the reference to a [TLSOption](#kind-tlsoption) | +| [18] | `tls.options.name` | Defines the [TLSOption](#kind-tlsoption) name | +| [19] | `tls.options.namespace` | Defines the [TLSOption](#kind-tlsoption) namespace | +| [20] | `tls.certResolver` | Defines the reference to a [CertResolver](../routers/index.md#certresolver_1) | +| [21] | `tls.domains` | List of [domains](../routers/index.md#domains_1) | +| [22] | `tls.domains[n].main` | Defines the main domain name | +| [23] | `tls.domains[n].sans` | List of SANs (alternative domains) | +| [24] | `tls.passthrough` | If `true`, delegates the TLS termination to the backend | ??? example "Declaring an IngressRouteTCP" ```yaml tab="IngressRouteTCP" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: ingressroutetcpfoo @@ -1181,7 +1226,7 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube ``` ```yaml tab="TLSOption" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: opt @@ -1216,7 +1261,7 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube ```yaml tab="Only on IngressRouteTCP" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route @@ -1245,7 +1290,7 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube ```yaml tab="On both sides" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route @@ -1274,6 +1319,45 @@ Register the `IngressRouteTCP` [kind](../../reference/dynamic-configuration/kube - port: 80 ``` +!!! important "Kubernetes Service Native Load-Balancing" + + To avoid creating the server load-balancer with the pods IPs and use Kubernetes Service clusterIP directly, + one should set the TCP service `NativeLB` option to true. + By default, `NativeLB` is false. + + ??? example "Examples" + + ```yaml + --- + apiVersion: traefik.io/v1alpha1 + kind: IngressRouteTCP + metadata: + name: test.route + namespace: default + + spec: + entryPoints: + - foo + + routes: + - match: HostSNI(`*`) + services: + - name: svc + port: 80 + # Here, nativeLB instructs to build the servers load balancer with the Kubernetes Service clusterIP only. + nativeLB: true + + --- + apiVersion: v1 + kind: Service + metadata: + name: svc + namespace: default + spec: + type: ClusterIP + ... + ``` + ### Kind: `MiddlewareTCP` `MiddlewareTCP` is the CRD implementation of a [Traefik TCP middleware](../../middlewares/tcp/overview.md). @@ -1283,7 +1367,7 @@ Register the `MiddlewareTCP` [kind](../../reference/dynamic-configuration/kubern ??? "Declaring and Referencing a MiddlewareTCP " ```yaml tab="Middleware" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -1295,7 +1379,7 @@ Register the `MiddlewareTCP` [kind](../../reference/dynamic-configuration/kubern ``` ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -1334,7 +1418,7 @@ Register the `IngressRouteUDP` [kind](../../reference/dynamic-configuration/kube !!! info "IngressRouteUDP Attributes" ```yaml - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: ingressrouteudpfoo @@ -1347,21 +1431,23 @@ Register the `IngressRouteUDP` [kind](../../reference/dynamic-configuration/kube - name: foo # [4] port: 8080 # [5] weight: 10 # [6] + nativeLB: true # [7] ``` -| Ref | Attribute | Purpose | -|------|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [1] | `entryPoints` | List of [entrypoints](../routers/index.md#entrypoints_1) names | -| [2] | `routes` | List of routes | -| [3] | `routes[n].services` | List of [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) definitions (See below for `ExternalName Service` setup) | -| [4] | `services[n].name` | Defines the name of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) | -| [6] | `services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port. | -| [7] | `services[n].weight` | Defines the weight to apply to the server load balancing | +| Ref | Attribute | Purpose | +|-----|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| [1] | `entryPoints` | List of [entrypoints](../routers/index.md#entrypoints_1) names | +| [2] | `routes` | List of routes | +| [3] | `routes[n].services` | List of [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) definitions (See below for `ExternalName Service` setup) | +| [4] | `services[n].name` | Defines the name of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) | +| [5] | `services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port. | +| [6] | `services[n].weight` | Defines the weight to apply to the server load balancing | +| [7] | `services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. | ??? example "Declaring an IngressRouteUDP" ```yaml - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: ingressrouteudpfoo @@ -1393,7 +1479,7 @@ Register the `IngressRouteUDP` [kind](../../reference/dynamic-configuration/kube ```yaml tab="IngressRouteUDP" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route @@ -1421,7 +1507,7 @@ Register the `IngressRouteUDP` [kind](../../reference/dynamic-configuration/kube ```yaml tab="ExternalName Service" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route @@ -1450,7 +1536,7 @@ Register the `IngressRouteUDP` [kind](../../reference/dynamic-configuration/kube ```yaml tab="Both sides" --- - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route @@ -1478,6 +1564,44 @@ Register the `IngressRouteUDP` [kind](../../reference/dynamic-configuration/kube - port: 80 ``` +!!! important "Kubernetes Service Native Load-Balancing" + + To avoid creating the server load-balancer with the pods IPs and use Kubernetes Service clusterIP directly, + one should set the UDP service `NativeLB` option to true. + By default, `NativeLB` is false. + + ??? example "Example" + + ```yaml + --- + apiVersion: traefik.io/v1alpha1 + kind: IngressRouteUDP + metadata: + name: test.route + namespace: default + + spec: + entryPoints: + - foo + + routes: + - services: + - name: svc + port: 80 + # Here, nativeLB instructs to build the servers load balancer with the Kubernetes Service clusterIP only. + nativeLB: true + + --- + apiVersion: v1 + kind: Service + metadata: + name: svc + namespace: default + spec: + type: ClusterIP + ... + ``` + ### Kind: `TLSOption` `TLSOption` is the CRD implementation of a [Traefik "TLS Option"](../../https/tls.md#tls-options). @@ -1488,7 +1612,7 @@ or referencing TLS options in the [`IngressRoute`](#kind-ingressroute) / [`Ingre !!! info "TLSOption Attributes" ```yaml tab="TLSOption" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: mytlsoption # [1] @@ -1533,7 +1657,7 @@ or referencing TLS options in the [`IngressRoute`](#kind-ingressroute) / [`Ingre ??? example "Declaring and referencing a TLSOption" ```yaml tab="TLSOption" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: mytlsoption @@ -1553,7 +1677,7 @@ or referencing TLS options in the [`IngressRoute`](#kind-ingressroute) / [`Ingre ``` ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -1619,7 +1743,7 @@ Register the `TLSStore` kind in the Kubernetes cluster before creating `TLSStore !!! info "TLSStore Attributes" ```yaml tab="TLSStore" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -1640,7 +1764,7 @@ Register the `TLSStore` kind in the Kubernetes cluster before creating `TLSStore ??? example "Declaring and referencing a TLSStore" ```yaml tab="TLSStore" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -1651,7 +1775,7 @@ Register the `TLSStore` kind in the Kubernetes cluster before creating `TLSStore ``` ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutebar @@ -1690,7 +1814,7 @@ Register the `TLSStore` kind in the Kubernetes cluster before creating `TLSStore !!! info "ServersTransport Attributes" ```yaml tab="ServersTransport" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -1743,7 +1867,7 @@ Register the `TLSStore` kind in the Kubernetes cluster before creating `TLSStore ??? example "Declaring and referencing a ServersTransport" ```yaml tab="ServersTransport" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -1755,7 +1879,7 @@ Register the `TLSStore` kind in the Kubernetes cluster before creating `TLSStore ``` ```yaml tab="IngressRoute" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: testroute @@ -1794,7 +1918,7 @@ The `default@internal` serversTransportTCP is created from the [static configura !!! info "ServersTransportTCP Attributes" ```yaml tab="ServersTransportTCP" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1843,7 +1967,7 @@ The `default@internal` serversTransportTCP is created from the [static configura ??? example "Declaring and referencing a ServersTransportTCP" ```yaml tab="ServersTransportTCP" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1856,7 +1980,7 @@ The `default@internal` serversTransportTCP is created from the [static configura ``` ```yaml tab="IngressRouteTCP" - apiVersion: traefik.containo.us/v1alpha1 + apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: testroute diff --git a/docs/content/routing/providers/kubernetes-gateway.md b/docs/content/routing/providers/kubernetes-gateway.md index f67f488fd..6c15acb4f 100644 --- a/docs/content/routing/providers/kubernetes-gateway.md +++ b/docs/content/routing/providers/kubernetes-gateway.md @@ -39,13 +39,13 @@ The Kubernetes Gateway API, The Experimental Way. {: .subtitle } You can find an excerpt of the supported Kubernetes Gateway API resources in the table below: -| Kind | Purpose | Concept Behind | -|------------------------------------|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------| -| [GatewayClass](#kind-gatewayclass) | Defines a set of Gateways that share a common configuration and behaviour | [GatewayClass](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/gatewayclass) | -| [Gateway](#kind-gateway) | Describes how traffic can be translated to Services within the cluster | [Gateway](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/gateway) | -| [HTTPRoute](#kind-httproute) | HTTP rules for mapping requests from a Gateway to Kubernetes Services | [Route](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute) | -| [TCPRoute](#kind-tcproute) | Allows mapping TCP requests from a Gateway to Kubernetes Services | [Route](https://gateway-api.sigs.k8s.io/v1alpha2/guides/tcp/)| -| [TLSRoute](#kind-tlsroute) | Allows mapping TLS requests from a Gateway to Kubernetes Services | [Route](https://gateway-api.sigs.k8s.io/v1alpha2/guides/tls/)| +| Kind | Purpose | Concept Behind | +|------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------| +| [GatewayClass](#kind-gatewayclass) | Defines a set of Gateways that share a common configuration and behaviour | [GatewayClass](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/gatewayclass) | +| [Gateway](#kind-gateway) | Describes how traffic can be translated to Services within the cluster | [Gateway](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/gateway) | +| [HTTPRoute](#kind-httproute) | HTTP rules for mapping requests from a Gateway to Kubernetes Services | [Route](https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute) | +| [TCPRoute](#kind-tcproute) | Allows mapping TCP requests from a Gateway to Kubernetes Services | [Route](https://gateway-api.sigs.k8s.io/v1alpha2/guides/tcp/) | +| [TLSRoute](#kind-tlsroute) | Allows mapping TLS requests from a Gateway to Kubernetes Services | [Route](https://gateway-api.sigs.k8s.io/v1alpha2/guides/tls/) | ### Kind: `GatewayClass` @@ -238,7 +238,7 @@ Kubernetes cluster before creating `HTTPRoute` objects. weight: 1 # [16] port: 8080 # [17] - name: api@internal - group: traefik.containo.us # [18] + group: traefik.io # [18] kind: TraefikService # [19] ``` @@ -261,7 +261,7 @@ Kubernetes cluster before creating `HTTPRoute` objects. | [15] | `name` | The name of the referent service. | | [16] | `weight` | The proportion of traffic forwarded to a targetRef, computed as weight/(sum of all weights in targetRefs). | | [17] | `port` | The port of the referent service. | -| [18] | `group` | Group is the group of the referent. Only `traefik.containo.us` and `gateway.networking.k8s.io` values are supported. | +| [18] | `group` | Group is the group of the referent. Only `traefik.io` and `gateway.networking.k8s.io` values are supported. | | [19] | `kind` | Kind is kind of the referent. Only `TraefikService` and `Service` values are supported. | ### Kind: `TCPRoute` @@ -290,23 +290,23 @@ Kubernetes cluster before creating `TCPRoute` objects. weight: 1 # [8] port: 8080 # [9] - name: api@internal - group: traefik.containo.us # [10] + group: traefik.io # [10] kind: TraefikService # [11] ``` -| Ref | Attribute | Description | -|------|---------------|----------------------------------------------------------------------------------------------------------------------| -| [1] | `parentRefs` | References the resources (usually Gateways) that a Route wants to be attached to. | -| [2] | `name` | Name of the referent. | -| [3] | `namespace` | Namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. | -| [4] | `sectionName` | Name of a section within the target resource (the Listener name). | -| [5] | `rules` | Rules are a list of TCP matchers and actions. | -| [6] | `backendRefs` | Defines the backend(s) where matching requests should be sent. | -| [7] | `name` | The name of the referent service. | -| [8] | `weight` | The proportion of traffic forwarded to a targetRef, computed as weight/(sum of all weights in targetRefs). | -| [9] | `port` | The port of the referent service. | -| [10] | `group` | Group is the group of the referent. Only `traefik.containo.us` and `gateway.networking.k8s.io` values are supported. | -| [11] | `kind` | Kind is kind of the referent. Only `TraefikService` and `Service` values are supported. | +| Ref | Attribute | Description | +|------|---------------|-----------------------------------------------------------------------------------------------------------------| +| [1] | `parentRefs` | References the resources (usually Gateways) that a Route wants to be attached to. | +| [2] | `name` | Name of the referent. | +| [3] | `namespace` | Namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. | +| [4] | `sectionName` | Name of a section within the target resource (the Listener name). | +| [5] | `rules` | Rules are a list of TCP matchers and actions. | +| [6] | `backendRefs` | Defines the backend(s) where matching requests should be sent. | +| [7] | `name` | The name of the referent service. | +| [8] | `weight` | The proportion of traffic forwarded to a targetRef, computed as weight/(sum of all weights in targetRefs). | +| [9] | `port` | The port of the referent service. | +| [10] | `group` | Group is the group of the referent. Only `traefik.io` and `gateway.networking.k8s.io` values are supported. | +| [11] | `kind` | Kind is kind of the referent. Only `TraefikService` and `Service` values are supported. | ### Kind: `TLSRoute` @@ -336,21 +336,21 @@ Kubernetes cluster before creating `TLSRoute` objects. weight: 1 # [9] port: 8080 # [10] - name: api@internal - group: traefik.containo.us # [11] + group: traefik.io # [11] kind: TraefikService # [12] ``` -| Ref | Attribute | Description | -|------|---------------|----------------------------------------------------------------------------------------------------------------------| -| [1] | `parentRefs` | References the resources (usually Gateways) that a Route wants to be attached to. | -| [2] | `name` | Name of the referent. | -| [3] | `namespace` | Namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. | -| [4] | `sectionName` | Name of a section within the target resource (the Listener name). | -| [5] | `hostnames` | Defines a set of SNI names that should match against the SNI attribute of TLS ClientHello message in TLS handshake. | -| [6] | `rules` | Rules are a list of TCP matchers and actions. | -| [7] | `backendRefs` | Defines the backend(s) where matching requests should be sent. | -| [8] | `name` | The name of the referent service. | -| [9] | `weight` | The proportion of traffic forwarded to a targetRef, computed as weight/(sum of all weights in targetRefs). | -| [10] | `port` | The port of the referent service. | -| [11] | `group` | Group is the group of the referent. Only `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. | +| Ref | Attribute | Description | +|------|---------------|---------------------------------------------------------------------------------------------------------------------| +| [1] | `parentRefs` | References the resources (usually Gateways) that a Route wants to be attached to. | +| [2] | `name` | Name of the referent. | +| [3] | `namespace` | Namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. | +| [4] | `sectionName` | Name of a section within the target resource (the Listener name). | +| [5] | `hostnames` | Defines a set of SNI names that should match against the SNI attribute of TLS ClientHello message in TLS handshake. | +| [6] | `rules` | Rules are a list of TCP matchers and actions. | +| [7] | `backendRefs` | Defines the backend(s) where matching requests should be sent. | +| [8] | `name` | The name of the referent service. | +| [9] | `weight` | The proportion of traffic forwarded to a targetRef, computed as weight/(sum of all weights in targetRefs). | +| [10] | `port` | The port of the referent service. | +| [11] | `group` | Group is the group of the referent. Only `traefik.io` and `gateway.networking.k8s.io` values are supported. | +| [12] | `kind` | Kind is kind of the referent. Only `TraefikService` and `Service` values are supported. | diff --git a/docs/content/routing/providers/kubernetes-ingress.md b/docs/content/routing/providers/kubernetes-ingress.md index 45e01904a..bb87501c4 100644 --- a/docs/content/routing/providers/kubernetes-ingress.md +++ b/docs/content/routing/providers/kubernetes-ingress.md @@ -299,6 +299,17 @@ which in turn will create the resulting routers, services, handlers, etc. #### On Service +??? info "`traefik.ingress.kubernetes.io/service.nativelb`" + + Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the pods. + Please note that, by default, Traefik reuses the established connections to the backends for performance purposes. This can prevent the requests load balancing between the replicas from behaving as one would expect when the option is set. + By default, NativeLB is false. + + ```yaml + traefik.ingress.kubernetes.io/service.nativelb: "true" + ``` + ??? info "`traefik.ingress.kubernetes.io/service.serversscheme`" Overrides the default scheme. @@ -888,11 +899,15 @@ TLS certificates can be managed in Secrets objects. ### Communication Between Traefik and Pods -!!! info "It is not possible to route requests directly to [Kubernetes services](https://kubernetes.io/docs/concepts/services-networking/service/ "Link to Kubernetes service docs")" +!!! info "Routing directly to [Kubernetes services](https://kubernetes.io/docs/concepts/services-networking/service/ "Link to Kubernetes service docs")" - You can use an `ExternalName` service to forward requests to the Kubernetes service through DNS. + To route directly to the Kubernetes service, + one can use the `traefik.ingress.kubernetes.io/service.nativelb` annotation on the Kubernetes service. + It controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. - For doing so, you have to [allow external name services](https://doc.traefik.io/traefik/providers/kubernetes-ingress/#allowexternalnameservices "Link to docs about allowing external name services"). + One alternative is to use an `ExternalName` service to forward requests to the Kubernetes service through DNS. + To do so, one must [allow external name services](https://doc.traefik.io/traefik/providers/kubernetes-ingress/#allowexternalnameservices "Link to docs about allowing external name services"). Traefik automatically requests endpoint information based on the service provided in the ingress spec. Although Traefik will connect directly to the endpoints (pods), diff --git a/docs/content/routing/providers/kv.md b/docs/content/routing/providers/kv.md index edc911614..a54ef1c61 100644 --- a/docs/content/routing/providers/kv.md +++ b/docs/content/routing/providers/kv.md @@ -406,7 +406,7 @@ You can declare TCP Routers and/or Services using KV. #### TCP Services -??? info "`traefik/tcp/services//loadbalancer/servers//url`" +??? info "`traefik/tcp/services//loadbalancer/servers//address`" See [servers](../services/index.md#servers) for more information. diff --git a/docs/content/routing/services/index.md b/docs/content/routing/services/index.md index 47bd23078..c809392f4 100644 --- a/docs/content/routing/services/index.md +++ b/docs/content/routing/services/index.md @@ -555,7 +555,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -590,7 +590,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -632,7 +632,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -665,7 +665,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -705,7 +705,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -736,7 +736,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -767,7 +767,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -807,7 +807,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -842,7 +842,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -880,7 +880,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -916,7 +916,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -950,7 +950,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -988,7 +988,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -1022,7 +1022,7 @@ http: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport @@ -1661,7 +1661,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1695,7 +1695,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1735,7 +1735,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1767,7 +1767,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1799,7 +1799,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1836,7 +1836,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1880,7 +1880,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1915,7 +1915,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1957,7 +1957,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -1998,7 +1998,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport @@ -2033,7 +2033,7 @@ tcp: ``` ```yaml tab="Kubernetes" -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: mytransport diff --git a/docs/content/traefik-hub/index.md b/docs/content/traefik-hub/index.md index a6c57cee9..5c6698e9d 100644 --- a/docs/content/traefik-hub/index.md +++ b/docs/content/traefik-hub/index.md @@ -2,7 +2,7 @@ ## Overview -Once the Traefik Hub Experimental feature is enabled in Traefik, +Once the Traefik Hub feature is enabled in Traefik, Traefik and its local agent communicate together. This agent can: @@ -27,7 +27,6 @@ This agent can: * Traefik Hub is compatible with Traefik Proxy 2.7 or later. * The Traefik Hub Agent must be installed to connect to the Traefik Hub platform. - * Activate this feature in the experimental section of the static configuration. !!! information "Configuration Discovery" @@ -38,9 +37,6 @@ This agent can: !!! example "Minimal Static Configuration to Activate Traefik Hub for Docker" ```yaml tab="File (YAML)" - experimental: - hub: true - hub: tls: insecure: true @@ -51,9 +47,6 @@ This agent can: ``` ```toml tab="File (TOML)" - [experimental] - hub = true - [hub] [hub.tls] insecure = true @@ -64,7 +57,6 @@ This agent can: ``` ```bash tab="CLI" - --experimental.hub --hub.tls.insecure --metrics.prometheus.addrouterslabels ``` @@ -72,9 +64,6 @@ This agent can: !!! example "Minimal Static Configuration to Activate Traefik Hub for Kubernetes" ```yaml tab="File (YAML)" - experimental: - hub: true - hub: {} metrics: @@ -83,9 +72,6 @@ This agent can: ``` ```toml tab="File (TOML)" - [experimental] - hub = true - [hub] [metrics] @@ -94,7 +80,6 @@ This agent can: ``` ```bash tab="CLI" - --experimental.hub --hub --metrics.prometheus.addrouterslabels ``` diff --git a/docs/content/user-guides/crd-acme/04-ingressroutes.yml b/docs/content/user-guides/crd-acme/04-ingressroutes.yml index 6c4616365..6f57d99f5 100644 --- a/docs/content/user-guides/crd-acme/04-ingressroutes.yml +++ b/docs/content/user-guides/crd-acme/04-ingressroutes.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: simpleingressroute @@ -14,7 +14,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: ingressroutetls diff --git a/docs/content/user-guides/crd-acme/05-tlsoption.yml b/docs/content/user-guides/crd-acme/05-tlsoption.yml index f29d9bcd7..a94a610dc 100644 --- a/docs/content/user-guides/crd-acme/05-tlsoption.yml +++ b/docs/content/user-guides/crd-acme/05-tlsoption.yml @@ -1,5 +1,5 @@ --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default diff --git a/docs/content/user-guides/crd-acme/index.md b/docs/content/user-guides/crd-acme/index.md index 67953a85b..7eac2b9f8 100644 --- a/docs/content/user-guides/crd-acme/index.md +++ b/docs/content/user-guides/crd-acme/index.md @@ -49,10 +49,10 @@ and the RBAC authorization resources which will be referenced through the `servi ```bash # Install Traefik Resource Definitions: -kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml +kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml # Install RBAC for Traefik: -kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml +kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml ``` ### Services @@ -60,7 +60,7 @@ kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/con Then, the services. One for Traefik itself, and one for the app it routes for, i.e. in this case our demo HTTP server: [whoami](https://github.com/traefik/whoami). ```bash -kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/user-guides/crd-acme/02-services.yml +kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/user-guides/crd-acme/02-services.yml ``` ```yaml @@ -73,7 +73,7 @@ Next, the deployments, i.e. the actual pods behind the services. Again, one pod for Traefik, and one for the whoami app. ```bash -kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/user-guides/crd-acme/03-deployments.yml +kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/user-guides/crd-acme/03-deployments.yml ``` ```yaml @@ -100,7 +100,7 @@ Look it up. We can now finally apply the actual ingressRoutes, with: ```bash -kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/user-guides/crd-acme/04-ingressroutes.yml +kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/user-guides/crd-acme/04-ingressroutes.yml ``` ```yaml @@ -126,7 +126,7 @@ Nowadays, TLS v1.0 and v1.1 are deprecated. In order to force TLS v1.2 or later on all your IngressRoute, you can define the `default` TLSOption: ```bash -kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/user-guides/crd-acme/05-tlsoption.yml +kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/user-guides/crd-acme/05-tlsoption.yml ``` ```yaml diff --git a/exp.Dockerfile b/exp.Dockerfile index bb2fc4997..843f8ca0f 100644 --- a/exp.Dockerfile +++ b/exp.Dockerfile @@ -12,7 +12,7 @@ RUN yarn install RUN yarn build # BUILD -FROM golang:1.19-alpine as gobuild +FROM golang:1.20-alpine as gobuild RUN apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \ && update-ca-certificates \ diff --git a/go.mod b/go.mod index 179b4bf91..a083b62ce 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/traefik/traefik/v3 -go 1.19 +go 1.20 require ( github.com/BurntSushi/toml v1.2.1 @@ -19,7 +19,7 @@ require ( github.com/docker/docker v20.10.21+incompatible github.com/docker/go-connections v0.4.0 github.com/fatih/structs v1.1.0 - github.com/go-acme/lego/v4 v4.10.0 + github.com/go-acme/lego/v4 v4.10.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 @@ -43,7 +43,6 @@ require ( github.com/kvtools/redis v1.0.2 github.com/kvtools/valkeyrie v1.0.0 github.com/kvtools/zookeeper v1.0.2 - github.com/lucas-clemente/quic-go v0.28.1 github.com/mailgun/ttlmap v0.0.0-20170619185759-c1c17f74874f github.com/miekg/dns v1.1.50 github.com/mitchellh/copystructure v1.2.0 @@ -58,6 +57,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 github.com/prometheus/client_golang v1.12.2-0.20220704083116-e8f91604d835 github.com/prometheus/client_model v0.2.0 + github.com/quic-go/quic-go v0.33.0 github.com/rs/zerolog v1.28.0 github.com/sirupsen/logrus v1.9.0 github.com/spiffe/go-spiffe/v2 v2.1.1 @@ -71,7 +71,7 @@ require ( github.com/unrolled/render v1.0.2 github.com/unrolled/secure v1.0.9 github.com/vdemeester/shakers v0.1.0 - github.com/vulcand/oxy/v2 v2.0.0-20221121151423-d5cb734e4467 + github.com/vulcand/oxy/v2 v2.0.0-20230227135449-a0e9f7ff1040 github.com/vulcand/predicate v1.2.0 go.elastic.co/apm v1.13.1 go.elastic.co/apm/module/apmot v1.13.1 @@ -145,7 +145,6 @@ require ( github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect github.com/buger/goterm v1.0.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cheekybits/genny v1.0.0 // indirect github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible // indirect github.com/circonus-labs/circonusllhist v0.1.3 // indirect github.com/civo/civogo v0.3.11 // indirect @@ -207,6 +206,7 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect @@ -261,11 +261,6 @@ require ( github.com/mailgun/multibuf v0.1.2 // indirect github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/marten-seemann/qpack v0.2.1 // indirect - github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect - github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect - github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect - github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect @@ -294,10 +289,7 @@ require ( github.com/nrdcg/goinwx v0.8.1 // indirect github.com/nrdcg/namesilo v0.2.1 // indirect github.com/nrdcg/porkbun v0.1.1 // indirect - github.com/nxadm/tail v1.4.8 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/ginkgo/v2 v2.2.0 // indirect - github.com/onsi/gomega v1.20.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opencontainers/runc v1.1.4 // indirect @@ -309,6 +301,9 @@ require ( github.com/pquerna/otp v1.3.0 // indirect github.com/prometheus/common v0.35.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect + github.com/quic-go/qpack v0.4.0 // indirect + github.com/quic-go/qtls-go1-19 v0.2.1 // indirect + github.com/quic-go/qtls-go1-20 v0.1.1 // indirect github.com/rs/cors v1.7.0 // indirect github.com/sacloud/api-client-go v0.2.1 // indirect github.com/sacloud/go-http v0.1.2 // indirect @@ -373,7 +368,6 @@ require ( gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/ns1/ns1-go.v2 v2.6.5 // indirect gopkg.in/square/go-jose.v2 v2.5.1 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // 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 @@ -398,5 +392,3 @@ replace github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402 // ambiguous import: found package github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http in multiple modules // tencentcloud uses monorepo with multimodule but the go.mod files are incomplete. exclude github.com/tencentcloud/tencentcloud-sdk-go v3.0.83+incompatible - -// replace github.com/go-logr/logr => github.com/go-logr/logr v0.4.0 diff --git a/go.sum b/go.sum index 3b0915381..baf987523 100644 --- a/go.sum +++ b/go.sum @@ -2,9 +2,7 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxo bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c/go.mod h1:hSVuE3qU7grINVSwrmzHfpg9k87ALBk+XaualNyUzI4= cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= @@ -65,12 +63,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/AlecAivazis/survey/v2 v2.2.3 h1:utJR2X4Ibp2fBxdjalQUiMFf3zfQNjA15YE8+ftlKEs= github.com/AlecAivazis/survey/v2 v2.2.3/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -235,7 +228,6 @@ github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9or github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -285,13 +277,11 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dR github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/goterm v1.0.0 h1:ZB6uUlY8+sjJyFGzz2WpRqX2XYPeXVgtZAOJMwOsTWM= github.com/buger/goterm v1.0.0/go.mod h1:16STi3LquiscTIHA8SXUNKEa/Cnu4ZHBH8NsCaWgso0= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/bugsnag-go v1.4.1/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/bugsnag-go v1.5.0 h1:tP8hiPv1pGGW3LA6LKy5lW6WG+y9J2xWUdPd3WC452k= @@ -319,8 +309,6 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= -github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= -github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -492,7 +480,6 @@ github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmf github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -669,11 +656,9 @@ 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-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= 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= -github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= @@ -698,10 +683,9 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-acme/lego/v4 v4.10.0 h1:G4Cgq4lsPxCjqsTKsqhUjRs3oKAGVMFPhvrl6kzzs44= -github.com/go-acme/lego/v4 v4.10.0/go.mod h1:EMbf0Jmqwv94nJ5WL9qWnSXIBZnvsS9gNypansHGc6U= +github.com/go-acme/lego/v4 v4.10.2 h1:5eW3qmda5v/LP21v1Hj70edKY1jeFZQwO617tdkwp6Q= +github.com/go-acme/lego/v4 v4.10.2/go.mod h1:EMbf0Jmqwv94nJ5WL9qWnSXIBZnvsS9gNypansHGc6U= 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= @@ -836,7 +820,6 @@ github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -899,7 +882,6 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.0.0-20191015185424-71da34e4d9b3/go.mod h1:ZXFeSndFcK4vB1NR4voH1Zm38K7ViUNiYtfIBDxrwf0= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= @@ -931,6 +913,7 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= @@ -946,8 +929,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99 github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -998,7 +979,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaD github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -1173,7 +1153,6 @@ github.com/jcchavezs/porto v0.1.0 h1:Xmxxn25zQMmgE7/yHYmh19KcItG81hIwfbEEFnd6w/Q github.com/jcchavezs/porto v0.1.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 h1:FUwcHNlEqkqLjLBdCp5PRlCFijNjvcYANOZXzCfXwCM= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/gorm v1.9.2/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= github.com/jinzhu/gorm v1.9.11 h1:gaHGvE+UnWGlbWG4Y3FUwY1EcZ5n6S9WtqBA/uySMLE= @@ -1252,7 +1231,6 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= @@ -1309,9 +1287,6 @@ github.com/liquidweb/liquidweb-go v1.6.3/go.mod h1:SuXXp+thr28LnjEw18AYtWwIbWMHS github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20= github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI= -github.com/lucas-clemente/quic-go v0.28.1 h1:Uo0lvVxWg5la9gflIF9lwa39ONq85Xq2D91YNEIslzU= -github.com/lucas-clemente/quic-go v0.28.1/go.mod h1:oGz5DKK41cJt5+773+BSO9BXDsREY4HLf7+0odGAPO0= -github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -1326,7 +1301,6 @@ github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51/go.mod h1:RYmqHb github.com/mailgun/ttlmap v0.0.0-20170619185759-c1c17f74874f h1:ZZYhg16XocqSKPGNQAe0aeweNtFxuedbwwb4fSlg7h4= github.com/mailgun/ttlmap v0.0.0-20170619185759-c1c17f74874f/go.mod h1:8heskWJ5c0v5J9WH89ADhyal1DOZcayll8fSbhB+/9A= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -1334,16 +1308,6 @@ github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/marten-seemann/qpack v0.2.1 h1:jvTsT/HpCn2UZJdP+UUB53FfUUgeOyG5K1ns0OJOGVs= -github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= -github.com/marten-seemann/qtls-go1-16 v0.1.5 h1:o9JrYPPco/Nukd/HpOHMHZoBDXQqoNtUCmny98/1uqQ= -github.com/marten-seemann/qtls-go1-16 v0.1.5/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= -github.com/marten-seemann/qtls-go1-17 v0.1.2 h1:JADBlm0LYiVbuSySCHeY863dNkcpMmDR7s0bLKJeYlQ= -github.com/marten-seemann/qtls-go1-17 v0.1.2/go.mod h1:C2ekUKcDdz9SDWxec1N/MvcXBpaX9l3Nx67XaR84L5s= -github.com/marten-seemann/qtls-go1-18 v0.1.2 h1:JH6jmzbduz0ITVQ7ShevK10Av5+jBEKAHMntXmIV7kM= -github.com/marten-seemann/qtls-go1-18 v0.1.2/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= -github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1 h1:7m/WlWcSROrcK5NxuXaxYD32BZqe/LEEnBrWcH/cOqQ= -github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1381,7 +1345,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= @@ -1486,8 +1449,6 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2/go.mod h1:TLb2Sg7HQcgGdloNxkrmtgDNR9uVYF3lfdFIN4Ro6Sk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= @@ -1524,10 +1485,8 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.2.0 h1:3ZNA3L1c5FYDFTTxbFeVGGD8jYvjYauHD30YgLxVsNI= @@ -1541,13 +1500,11 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1593,7 +1550,6 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= @@ -1646,7 +1602,6 @@ github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prY github.com/pquerna/otp v1.3.0 h1:oJV/SkzR33anKXwQU3Of42rL4wbrffP4uvUf1SvS5Xs= github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -1670,7 +1625,6 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1686,7 +1640,6 @@ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.35.0 h1:Eyr+Pw2VymWejHqCugNaQXkAi6KayVNxaHeu6khmFBE= github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1706,6 +1659,14 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/qri-io/jsonpointer v0.1.0/go.mod h1:DnJPaYgiKu56EuDp8TU5wFLdZIcAnb/uH9v37ZaMV64= github.com/qri-io/jsonschema v0.1.1/go.mod h1:QpzJ6gBQ0GYgGmh7mDQ1YsvvhSgE4rYj0k8t5MBOmUY= +github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= +github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= +github.com/quic-go/qtls-go1-19 v0.2.1 h1:aJcKNMkH5ASEJB9FXNeZCyTEIHU1J7MmHyz1Q1TSG1A= +github.com/quic-go/qtls-go1-19 v0.2.1/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= +github.com/quic-go/qtls-go1-20 v0.1.1 h1:KbChDlg82d3IHqaj2bn6GfKRj84Per2VGf5XV3wSwQk= +github.com/quic-go/qtls-go1-20 v0.1.1/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= +github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0= +github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA= github.com/rboyer/safeio v0.2.1/go.mod h1:Cq/cEPK+YXFn622lsQ0K4KsPZSPtaptHHEldsy7Fmig= 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= @@ -1761,29 +1722,7 @@ github.com/shirou/gopsutil/v3 v3.20.10/go.mod h1:igHnfak0qnw1biGeI2qKQvu0ZkwvEkU github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -1809,8 +1748,6 @@ github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e h1:3OgWYFw7jxCZPc github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e/go.mod h1:fKZCUVdirrxrBpwd9wb+lSoVixvpwAu8eHzbQB2tums= 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/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -1882,7 +1819,6 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tailscale/tscert v0.0.0-20220316030059-54bbcb9f74e2 h1:xwMw7LFhV9dbvot9A7NLClP9udqbjrQlIwWMH8e7uiQ= github.com/tailscale/tscert v0.0.0-20220316030059-54bbcb9f74e2/go.mod h1:hL4gB6APAasMR2NNi/JHzqKkxW3EPQlFgLEq9PMi2t0= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= 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= @@ -1939,8 +1875,6 @@ github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vdemeester/shakers v0.1.0 h1:K+n9sSyUCg2ywmZkv+3c7vsYZfivcfKhMh8kRxCrONM= github.com/vdemeester/shakers v0.1.0/go.mod h1:IZ1HHynUOQt32iQ3rvAeVddXLd19h/6LWiKsh9RZtAQ= -github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= -github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vinyldns/go-vinyldns v0.9.16 h1:GZJStDkcCk1F1AcRc64LuuMh+ENL8pHA0CVd4ulRMcQ= github.com/vinyldns/go-vinyldns v0.9.16/go.mod h1:5qIJOdmzAnatKjurI+Tl4uTus7GJKJxb+zitufjHs3Q= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= @@ -1953,8 +1887,8 @@ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6Ac github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/vulcand/oxy/v2 v2.0.0-20221121151423-d5cb734e4467 h1:Dbv3KJLgwtDKLpCZzTf1ISeG5ZYudPaLfTdYi4O2dSU= -github.com/vulcand/oxy/v2 v2.0.0-20221121151423-d5cb734e4467/go.mod h1:0kOEB8mKzSeGHknF53gTM47UEvQnPoAPnM+58baqn2o= +github.com/vulcand/oxy/v2 v2.0.0-20230227135449-a0e9f7ff1040 h1:L+nLher4530BUkyOpxxBsl2SLbrD4fSlDH5rGZ8DRBM= +github.com/vulcand/oxy/v2 v2.0.0-20230227135449-a0e9f7ff1040/go.mod h1:A2voDnpONyqdplUDK0lt5y4XHLiBXPBw7iQES8+ZWRw= github.com/vulcand/predicate v1.2.0 h1:uFsW1gcnnR7R+QTID+FVcs0sSYlIGntoGOTb3rQJt50= github.com/vulcand/predicate v1.2.0/go.mod h1:VipoNYXny6c8N381zGUWkjuuNHiRbeAZhE7Qm9c+2GA= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= @@ -2025,7 +1959,6 @@ go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsX go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -2091,22 +2024,18 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org/intern v0.0.0-20211027215823-ae77deb06f29 h1:UXLjNohABv4S58tHmeuIZDO6e3mHpW2Dx33gaNt03LE= go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 h1:FyBZqvoA/jbNzuAWLQE2kG820zMAkcilx6BMjGbL/E4= go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -2124,7 +2053,6 @@ golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -2165,7 +2093,6 @@ golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZ golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -2201,8 +2128,6 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2210,7 +2135,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -2279,8 +2203,6 @@ golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2304,7 +2226,6 @@ golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7Lm golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2326,7 +2247,6 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2336,7 +2256,6 @@ golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2505,7 +2424,6 @@ golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2595,9 +2513,6 @@ gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2644,7 +2559,6 @@ google.golang.org/api v0.98.0 h1:yxZrcxXESimy6r6mdL5Q6EnZwmewDJK2dVg3g75s5Dg= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2655,10 +2569,6 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2752,7 +2662,6 @@ google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSg google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2889,7 +2798,6 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -3019,6 +2927,4 @@ sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/integration/fixtures/k8s/01-traefik-crd.yml b/integration/fixtures/k8s/01-traefik-crd.yml index fe3187a7d..37849dedc 100644 --- a/integration/fixtures/k8s/01-traefik-crd.yml +++ b/integration/fixtures/k8s/01-traefik-crd.yml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressroutes.traefik.containo.us + name: ingressroutes.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRoute listKind: IngressRouteList @@ -104,6 +104,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes @@ -274,9 +281,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressroutetcps.traefik.containo.us + name: ingressroutetcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRouteTCP listKind: IngressRouteTCPList @@ -357,6 +364,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean port: anyOf: - type: integer @@ -486,9 +500,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: ingressrouteudps.traefik.containo.us + name: ingressrouteudps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: IngressRouteUDP listKind: IngressRouteUDPList @@ -543,6 +557,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs + or if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean port: anyOf: - type: integer @@ -584,9 +605,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: middlewares.traefik.containo.us + name: middlewares.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: Middleware listKind: MiddlewareList @@ -819,6 +840,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if + the only child is the Kubernetes Service clusterIP. The + Kubernetes Service itself does load-balance to the pods. + By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. @@ -1479,9 +1507,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: middlewaretcps.traefik.containo.us + name: middlewaretcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: MiddlewareTCP listKind: MiddlewareTCPList @@ -1551,9 +1579,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: serverstransports.traefik.containo.us + name: serverstransports.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: ServersTransport listKind: ServersTransportList @@ -1692,9 +1720,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: serverstransporttcps.traefik.containo.us + name: serverstransporttcps.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: ServersTransportTCP listKind: ServersTransportTCPList @@ -1708,7 +1736,7 @@ spec: description: 'ServersTransportTCP is the CRD implementation of a TCPServersTransport. If no tcpServersTransport is specified, a default one named default@internal will be used. The default@internal tcpServersTransport can be configured - in the static configuration. More info: https://doc.traefik.io/traefik/v2.9/routing/services/#serverstransport_3' + in the static configuration. More info: https://doc.traefik.io/traefik/v3.0/routing/services/#serverstransport_3' properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -1814,9 +1842,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: tlsoptions.traefik.containo.us + name: tlsoptions.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TLSOption listKind: TLSOptionList @@ -1921,9 +1949,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: tlsstores.traefik.containo.us + name: tlsstores.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TLSStore listKind: TLSStoreList @@ -2020,9 +2048,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.6.2 creationTimestamp: null - name: traefikservices.traefik.containo.us + name: traefikservices.traefik.io spec: - group: traefik.containo.us + group: traefik.io names: kind: TraefikService listKind: TraefikServiceList @@ -2089,6 +2117,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or + if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. @@ -2180,6 +2215,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or if the + only child is the Kubernetes Service clusterIP. The Kubernetes + Service itself does load-balance to the pods. By default, NativeLB + is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. By default, @@ -2277,6 +2319,13 @@ spec: description: Namespace defines the namespace of the referenced Kubernetes Service or TraefikService. type: string + nativeLB: + description: NativeLB controls, when creating the load-balancer, + whether the LB's children are directly the pods IPs or + if the only child is the Kubernetes Service clusterIP. + The Kubernetes Service itself does load-balance to the + pods. By default, NativeLB is false. + type: boolean passHostHeader: description: PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service. diff --git a/integration/fixtures/k8s/03-ingressroute.yml b/integration/fixtures/k8s/03-ingressroute.yml index c040988b5..d00f4e34e 100644 --- a/integration/fixtures/k8s/03-ingressroute.yml +++ b/integration/fixtures/k8s/03-ingressroute.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/integration/fixtures/k8s/03-tlsoption.yml b/integration/fixtures/k8s/03-tlsoption.yml index 7c5df10fc..1d57c5065 100644 --- a/integration/fixtures/k8s/03-tlsoption.yml +++ b/integration/fixtures/k8s/03-tlsoption.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: mytlsoption diff --git a/integration/fixtures/k8s/03-tlsstore.yml b/integration/fixtures/k8s/03-tlsstore.yml index 5dea5d0fd..add5979cc 100644 --- a/integration/fixtures/k8s/03-tlsstore.yml +++ b/integration/fixtures/k8s/03-tlsstore.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: mytlsstore diff --git a/integration/fixtures/k8s/04-ingressroute.yml b/integration/fixtures/k8s/04-ingressroute.yml index 85643e638..2d8670c4a 100644 --- a/integration/fixtures/k8s/04-ingressroute.yml +++ b/integration/fixtures/k8s/04-ingressroute.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: mychain @@ -10,7 +10,7 @@ spec: - name: stripprefix --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -22,7 +22,7 @@ spec: - /tobestripped --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test2.route diff --git a/integration/fixtures/k8s/05-ingressroutetcp.yml b/integration/fixtures/k8s/05-ingressroutetcp.yml index a717a1999..1059648f0 100644 --- a/integration/fixtures/k8s/05-ingressroutetcp.yml +++ b/integration/fixtures/k8s/05-ingressroutetcp.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test3.route diff --git a/integration/fixtures/k8s/05-ingressrouteudp.yml b/integration/fixtures/k8s/05-ingressrouteudp.yml index 358559c23..54da9a2c9 100644 --- a/integration/fixtures/k8s/05-ingressrouteudp.yml +++ b/integration/fixtures/k8s/05-ingressrouteudp.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test3.route diff --git a/integration/fixtures/k8s/06-ingressroute-traefikservices.yml b/integration/fixtures/k8s/06-ingressroute-traefikservices.yml index 3e096d1a7..d979bc425 100644 --- a/integration/fixtures/k8s/06-ingressroute-traefikservices.yml +++ b/integration/fixtures/k8s/06-ingressroute-traefikservices.yml @@ -1,5 +1,5 @@ --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -14,7 +14,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -29,7 +29,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test3.route @@ -45,7 +45,7 @@ spec: - name: wrr1 kind: TraefikService --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: api.route diff --git a/integration/fixtures/k8s/07-ingressroute-cross-namespace.yml b/integration/fixtures/k8s/07-ingressroute-cross-namespace.yml index fbdeb88a4..ef437e25b 100644 --- a/integration/fixtures/k8s/07-ingressroute-cross-namespace.yml +++ b/integration/fixtures/k8s/07-ingressroute-cross-namespace.yml @@ -20,7 +20,7 @@ spec: task: whoami --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test6.route @@ -65,7 +65,7 @@ spec: - name: test-errorpage --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -78,7 +78,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr3 @@ -92,7 +92,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix2 @@ -104,7 +104,7 @@ spec: - /tobestripped --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-errorpage diff --git a/integration/fixtures/k8s/07-ingressroute-serverstransport.yml b/integration/fixtures/k8s/07-ingressroute-serverstransport.yml index aa1ff9ecc..8ad736917 100644 --- a/integration/fixtures/k8s/07-ingressroute-serverstransport.yml +++ b/integration/fixtures/k8s/07-ingressroute-serverstransport.yml @@ -1,5 +1,5 @@ --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: testst.route @@ -17,7 +17,7 @@ spec: serversTransport: mytransport --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: mytransport diff --git a/integration/k8s_test.go b/integration/k8s_test.go index d07271148..5d54bc3e1 100644 --- a/integration/k8s_test.go +++ b/integration/k8s_test.go @@ -215,7 +215,7 @@ func matchesConfig(wantConfig string, buf *bytes.Buffer) try.ResponseCondition { // The pods IPs are dynamic, so we cannot predict them, // which is why we have to ignore them in the comparison. rxURL := regexp.MustCompile(`"(url|address)":\s+(".*")`) - sanitizedExpected := rxURL.ReplaceAll(expected, []byte(`"$1": "XXXX"`)) + sanitizedExpected := rxURL.ReplaceAll(bytes.TrimSpace(expected), []byte(`"$1": "XXXX"`)) sanitizedGot := rxURL.ReplaceAll(got, []byte(`"$1": "XXXX"`)) rxServerStatus := regexp.MustCompile(`"http://.*?":\s+(".*")`) diff --git a/integration/testdata/rawdata-crd-label-selector.json b/integration/testdata/rawdata-crd-label-selector.json index 4e9df8d33..b5c9f1669 100644 --- a/integration/testdata/rawdata-crd-label-selector.json +++ b/integration/testdata/rawdata-crd-label-selector.json @@ -45,7 +45,7 @@ "url": "http://10.42.0.3:80" }, { - "url": "http://10.42.0.4:80" + "url": "http://10.42.0.6:80" } ], "passHostHeader": true, @@ -59,7 +59,7 @@ ], "serverStatus": { "http://10.42.0.3:80": "UP", - "http://10.42.0.4:80": "UP" + "http://10.42.0.6:80": "UP" } }, "noop@internal": { diff --git a/integration/testdata/rawdata-crd.json b/integration/testdata/rawdata-crd.json index 5afe2f0a8..81f397196 100644 --- a/integration/testdata/rawdata-crd.json +++ b/integration/testdata/rawdata-crd.json @@ -136,7 +136,7 @@ "loadBalancer": { "servers": [ { - "url": "http://10.42.0.6:80" + "url": "http://10.42.0.3:80" }, { "url": "http://10.42.0.7:80" @@ -152,7 +152,7 @@ "default-test-route-6b204d94623b3df4370c@kubernetescrd" ], "serverStatus": { - "http://10.42.0.6:80": "UP", + "http://10.42.0.3:80": "UP", "http://10.42.0.7:80": "UP" } }, @@ -160,7 +160,7 @@ "loadBalancer": { "servers": [ { - "url": "http://10.42.0.6:80" + "url": "http://10.42.0.3:80" }, { "url": "http://10.42.0.7:80" @@ -176,7 +176,7 @@ "default-test2-route-23c7f4c450289ee29016@kubernetescrd" ], "serverStatus": { - "http://10.42.0.6:80": "UP", + "http://10.42.0.3:80": "UP", "http://10.42.0.7:80": "UP" } }, @@ -184,7 +184,7 @@ "loadBalancer": { "servers": [ { - "url": "http://10.42.0.6:80" + "url": "http://10.42.0.3:80" }, { "url": "http://10.42.0.7:80" @@ -201,7 +201,7 @@ "default-testst-route-60ad45fcb5fc1f5f3629@kubernetescrd" ], "serverStatus": { - "http://10.42.0.6:80": "UP", + "http://10.42.0.3:80": "UP", "http://10.42.0.7:80": "UP" } }, @@ -209,7 +209,7 @@ "loadBalancer": { "servers": [ { - "url": "http://10.42.0.6:80" + "url": "http://10.42.0.3:80" }, { "url": "http://10.42.0.7:80" @@ -222,7 +222,7 @@ }, "status": "enabled", "serverStatus": { - "http://10.42.0.6:80": "UP", + "http://10.42.0.3:80": "UP", "http://10.42.0.7:80": "UP" } }, @@ -292,10 +292,10 @@ "loadBalancer": { "servers": [ { - "address": "10.42.0.10:8080" + "address": "10.42.0.2:8080" }, { - "address": "10.42.0.8:8080" + "address": "10.42.0.4:8080" } ] }, @@ -347,10 +347,10 @@ "loadBalancer": { "servers": [ { - "address": "10.42.0.4:8090" + "address": "10.42.0.5:8090" }, { - "address": "10.42.0.9:8090" + "address": "10.42.0.6:8090" } ] }, diff --git a/integration/testdata/rawdata-gateway.json b/integration/testdata/rawdata-gateway.json index 9c695ef06..d629cfc41 100644 --- a/integration/testdata/rawdata-gateway.json +++ b/integration/testdata/rawdata-gateway.json @@ -124,10 +124,10 @@ "loadBalancer": { "servers": [ { - "url": "http://10.42.0.6:80" + "url": "http://10.42.0.3:80" }, { - "url": "http://10.42.0.7:80" + "url": "http://10.42.0.4:80" } ], "passHostHeader": true, @@ -137,8 +137,8 @@ }, "status": "enabled", "serverStatus": { - "http://10.42.0.6:80": "UP", - "http://10.42.0.7:80": "UP" + "http://10.42.0.3:80": "UP", + "http://10.42.0.4:80": "UP" } }, "noop@internal": { @@ -239,7 +239,7 @@ "address": "10.42.0.2:8080" }, { - "address": "10.42.0.4:8080" + "address": "10.42.0.6:8080" } ] }, diff --git a/pkg/collector/collector.go b/pkg/collector/collector.go index 5a49b9196..1de1934ba 100644 --- a/pkg/collector/collector.go +++ b/pkg/collector/collector.go @@ -20,6 +20,8 @@ import ( const collectorURL = "https://collect.traefik.io/9vxmmkcdmalbdi635d4jgc5p5rx0h7h8" // Collected data. +// +//nolint:musttag // cannot be changed for historical reasons. type data struct { Version string Codename string diff --git a/pkg/config/dynamic/fixtures/sample.toml b/pkg/config/dynamic/fixtures/sample.toml index 6d37b8ab7..2cbbf5a60 100644 --- a/pkg/config/dynamic/fixtures/sample.toml +++ b/pkg/config/dynamic/fixtures/sample.toml @@ -141,6 +141,7 @@ sampleRate = 42.0 [tracing.datadog] localAgentHostPort = "foobar" + localAgentSocket = "foobar" debug = true prioritySampling = true traceIDHeaderName = "foobar" diff --git a/pkg/config/static/experimental.go b/pkg/config/static/experimental.go index a8fe8707e..7428f6a08 100644 --- a/pkg/config/static/experimental.go +++ b/pkg/config/static/experimental.go @@ -8,5 +8,4 @@ type Experimental struct { LocalPlugins map[string]plugins.LocalDescriptor `description:"Local plugins configuration." json:"localPlugins,omitempty" toml:"localPlugins,omitempty" yaml:"localPlugins,omitempty" export:"true"` KubernetesGateway bool `description:"Allow the Kubernetes gateway api provider usage." json:"kubernetesGateway,omitempty" toml:"kubernetesGateway,omitempty" yaml:"kubernetesGateway,omitempty" export:"true"` - Hub bool `description:"Enable the Traefik Hub provider." json:"hub,omitempty" toml:"hub,omitempty" yaml:"hub,omitempty" export:"true"` } diff --git a/pkg/config/static/hub.go b/pkg/config/static/hub.go index 584816316..2a87b342a 100644 --- a/pkg/config/static/hub.go +++ b/pkg/config/static/hub.go @@ -9,11 +9,6 @@ import ( ) func (c *Configuration) initHubProvider() error { - // Hub provider is an experimental feature. It requires the experimental flag to be enabled before continuing. - if c.Experimental == nil || !c.Experimental.Hub { - return errors.New("the experimental flag for Hub is not set") - } - if _, ok := c.EntryPoints[hub.TunnelEntrypoint]; !ok { var ep EntryPoint ep.SetDefaults() diff --git a/pkg/config/static/static_config.go b/pkg/config/static/static_config.go index a1e1661a6..05051ff54 100644 --- a/pkg/config/static/static_config.go +++ b/pkg/config/static/static_config.go @@ -260,7 +260,7 @@ func (c *Configuration) SetEffectiveConfiguration() { c.Hub = nil log.Error().Err(err).Msg("Unable to activate the Hub provider") } else { - log.Debug().Msg("Experimental Hub provider has been activated") + log.Debug().Msg("Hub provider has been activated") } } diff --git a/pkg/metrics/datadog.go b/pkg/metrics/datadog.go index ecc7ba33b..b09e3407a 100644 --- a/pkg/metrics/datadog.go +++ b/pkg/metrics/datadog.go @@ -18,23 +18,21 @@ var ( // Metric names consistent with https://github.com/DataDog/integrations-extras/pull/64 const ( - ddConfigReloadsName = "config.reload.total" - ddConfigReloadsFailureTagName = "failure" - ddLastConfigReloadSuccessName = "config.reload.lastSuccessTimestamp" - ddLastConfigReloadFailureName = "config.reload.lastFailureTimestamp" + ddConfigReloadsName = "config.reload.total" + ddLastConfigReloadSuccessName = "config.reload.lastSuccessTimestamp" + ddOpenConnsName = "open.connections" + ddTLSCertsNotAfterTimestampName = "tls.certs.notAfterTimestamp" ddEntryPointReqsName = "entrypoint.request.total" ddEntryPointReqsTLSName = "entrypoint.request.tls.total" ddEntryPointReqDurationName = "entrypoint.request.duration" - ddEntryPointOpenConnsName = "entrypoint.connections.open" ddEntryPointReqsBytesName = "entrypoint.requests.bytes.total" ddEntryPointRespsBytesName = "entrypoint.responses.bytes.total" ddRouterReqsName = "router.request.total" ddRouterReqsTLSName = "router.request.tls.total" ddRouterReqsDurationName = "router.request.duration" - ddRouterOpenConnsName = "router.connections.open" ddRouterReqsBytesName = "router.requests.bytes.total" ddRouterRespsBytesName = "router.responses.bytes.total" @@ -42,7 +40,6 @@ const ( ddServiceReqsTLSName = "service.request.tls.total" ddServiceReqsDurationName = "service.request.duration" ddServiceRetriesName = "service.retries.total" - ddServiceOpenConnsName = "service.connections.open" ddServiceServerUpName = "service.server.up" ddServiceReqsBytesName = "service.requests.bytes.total" ddServiceRespsBytesName = "service.responses.bytes.total" @@ -64,39 +61,35 @@ func RegisterDatadog(ctx context.Context, config *types.Datadog) Registry { registry := &standardRegistry{ configReloadsCounter: datadogClient.NewCounter(ddConfigReloadsName, 1.0), - configReloadsFailureCounter: datadogClient.NewCounter(ddConfigReloadsName, 1.0).With(ddConfigReloadsFailureTagName, "true"), lastConfigReloadSuccessGauge: datadogClient.NewGauge(ddLastConfigReloadSuccessName), - lastConfigReloadFailureGauge: datadogClient.NewGauge(ddLastConfigReloadFailureName), + openConnectionsGauge: datadogClient.NewGauge(ddOpenConnsName), tlsCertsNotAfterTimestampGauge: datadogClient.NewGauge(ddTLSCertsNotAfterTimestampName), } if config.AddEntryPointsLabels { registry.epEnabled = config.AddEntryPointsLabels - registry.entryPointReqsCounter = datadogClient.NewCounter(ddEntryPointReqsName, 1.0) + registry.entryPointReqsCounter = NewCounterWithNoopHeaders(datadogClient.NewCounter(ddEntryPointReqsName, 1.0)) registry.entryPointReqsTLSCounter = datadogClient.NewCounter(ddEntryPointReqsTLSName, 1.0) registry.entryPointReqDurationHistogram, _ = NewHistogramWithScale(datadogClient.NewHistogram(ddEntryPointReqDurationName, 1.0), time.Second) - registry.entryPointOpenConnsGauge = datadogClient.NewGauge(ddEntryPointOpenConnsName) registry.entryPointReqsBytesCounter = datadogClient.NewCounter(ddEntryPointReqsBytesName, 1.0) registry.entryPointRespsBytesCounter = datadogClient.NewCounter(ddEntryPointRespsBytesName, 1.0) } if config.AddRoutersLabels { registry.routerEnabled = config.AddRoutersLabels - registry.routerReqsCounter = datadogClient.NewCounter(ddRouterReqsName, 1.0) + registry.routerReqsCounter = NewCounterWithNoopHeaders(datadogClient.NewCounter(ddRouterReqsName, 1.0)) registry.routerReqsTLSCounter = datadogClient.NewCounter(ddRouterReqsTLSName, 1.0) registry.routerReqDurationHistogram, _ = NewHistogramWithScale(datadogClient.NewHistogram(ddRouterReqsDurationName, 1.0), time.Second) - registry.routerOpenConnsGauge = datadogClient.NewGauge(ddRouterOpenConnsName) registry.routerReqsBytesCounter = datadogClient.NewCounter(ddRouterReqsBytesName, 1.0) registry.routerRespsBytesCounter = datadogClient.NewCounter(ddRouterRespsBytesName, 1.0) } if config.AddServicesLabels { registry.svcEnabled = config.AddServicesLabels - registry.serviceReqsCounter = datadogClient.NewCounter(ddServiceReqsName, 1.0) + registry.serviceReqsCounter = NewCounterWithNoopHeaders(datadogClient.NewCounter(ddServiceReqsName, 1.0)) registry.serviceReqsTLSCounter = datadogClient.NewCounter(ddServiceReqsTLSName, 1.0) registry.serviceReqDurationHistogram, _ = NewHistogramWithScale(datadogClient.NewHistogram(ddServiceReqsDurationName, 1.0), time.Second) registry.serviceRetriesCounter = datadogClient.NewCounter(ddServiceRetriesName, 1.0) - registry.serviceOpenConnsGauge = datadogClient.NewGauge(ddServiceOpenConnsName) registry.serviceServerUpGauge = datadogClient.NewGauge(ddServiceServerUpName) registry.serviceReqsBytesCounter = datadogClient.NewCounter(ddServiceReqsBytesName, 1.0) registry.serviceRespsBytesCounter = datadogClient.NewCounter(ddServiceRespsBytesName, 1.0) diff --git a/pkg/metrics/datadog_test.go b/pkg/metrics/datadog_test.go index ea837fb52..68e79ba71 100644 --- a/pkg/metrics/datadog_test.go +++ b/pkg/metrics/datadog_test.go @@ -45,16 +45,14 @@ func testDatadogRegistry(t *testing.T, metricsPrefix string, datadogRegistry Reg expected := []string{ metricsPrefix + ".config.reload.total:1.000000|c\n", - metricsPrefix + ".config.reload.total:1.000000|c|#failure:true\n", metricsPrefix + ".config.reload.lastSuccessTimestamp:1.000000|g\n", - metricsPrefix + ".config.reload.lastFailureTimestamp:1.000000|g\n", + metricsPrefix + ".open.connections:1.000000|g|#entrypoint:test,protocol:TCP\n", metricsPrefix + ".tls.certs.notAfterTimestamp:1.000000|g|#key:value\n", metricsPrefix + ".entrypoint.request.total:1.000000|c|#entrypoint:test\n", metricsPrefix + ".entrypoint.request.tls.total:1.000000|c|#entrypoint:test,tls_version:foo,tls_cipher:bar\n", metricsPrefix + ".entrypoint.request.duration:10000.000000|h|#entrypoint:test\n", - metricsPrefix + ".entrypoint.connections.open:1.000000|g|#entrypoint:test\n", metricsPrefix + ".entrypoint.requests.bytes.total:1.000000|c|#entrypoint:test\n", metricsPrefix + ".entrypoint.responses.bytes.total:1.000000|c|#entrypoint:test\n", @@ -62,7 +60,6 @@ func testDatadogRegistry(t *testing.T, metricsPrefix string, datadogRegistry Reg metricsPrefix + ".router.request.total:1.000000|c|#router:demo,service:test,code:200,method:GET\n", metricsPrefix + ".router.request.tls.total:1.000000|c|#router:demo,service:test,tls_version:foo,tls_cipher:bar\n", metricsPrefix + ".router.request.duration:10000.000000|h|#router:demo,service:test,code:200\n", - metricsPrefix + ".router.connections.open:1.000000|g|#router:demo,service:test\n", metricsPrefix + ".router.requests.bytes.total:1.000000|c|#router:demo,service:test,code:200,method:GET\n", metricsPrefix + ".router.responses.bytes.total:1.000000|c|#router:demo,service:test,code:200,method:GET\n", @@ -70,7 +67,6 @@ func testDatadogRegistry(t *testing.T, metricsPrefix string, datadogRegistry Reg metricsPrefix + ".service.request.total:1.000000|c|#service:test,code:200,method:GET\n", metricsPrefix + ".service.request.tls.total:1.000000|c|#service:test,tls_version:foo,tls_cipher:bar\n", metricsPrefix + ".service.request.duration:10000.000000|h|#service:test,code:200\n", - metricsPrefix + ".service.connections.open:1.000000|g|#service:test\n", metricsPrefix + ".service.retries.total:2.000000|c|#service:test\n", metricsPrefix + ".service.request.duration:10000.000000|h|#service:test,code:200\n", metricsPrefix + ".service.server.up:1.000000|g|#service:test,url:http://127.0.0.1,one:two\n", @@ -80,32 +76,28 @@ func testDatadogRegistry(t *testing.T, metricsPrefix string, datadogRegistry Reg udp.ShouldReceiveAll(t, expected, func() { datadogRegistry.ConfigReloadsCounter().Add(1) - datadogRegistry.ConfigReloadsFailureCounter().Add(1) datadogRegistry.LastConfigReloadSuccessGauge().Add(1) - datadogRegistry.LastConfigReloadFailureGauge().Add(1) + datadogRegistry.OpenConnectionsGauge().With("entrypoint", "test", "protocol", "TCP").Add(1) datadogRegistry.TLSCertsNotAfterTimestampGauge().With("key", "value").Set(1) - datadogRegistry.EntryPointReqsCounter().With("entrypoint", "test").Add(1) + datadogRegistry.EntryPointReqsCounter().With(nil, "entrypoint", "test").Add(1) datadogRegistry.EntryPointReqsTLSCounter().With("entrypoint", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) datadogRegistry.EntryPointReqDurationHistogram().With("entrypoint", "test").Observe(10000) - datadogRegistry.EntryPointOpenConnsGauge().With("entrypoint", "test").Set(1) datadogRegistry.EntryPointReqsBytesCounter().With("entrypoint", "test").Add(1) datadogRegistry.EntryPointRespsBytesCounter().With("entrypoint", "test").Add(1) - datadogRegistry.RouterReqsCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - datadogRegistry.RouterReqsCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + datadogRegistry.RouterReqsCounter().With(nil, "router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + datadogRegistry.RouterReqsCounter().With(nil, "router", "demo", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) datadogRegistry.RouterReqsTLSCounter().With("router", "demo", "service", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) datadogRegistry.RouterReqDurationHistogram().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK)).Observe(10000) - datadogRegistry.RouterOpenConnsGauge().With("router", "demo", "service", "test").Set(1) datadogRegistry.RouterReqsBytesCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) datadogRegistry.RouterRespsBytesCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - datadogRegistry.ServiceReqsCounter().With("service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - datadogRegistry.ServiceReqsCounter().With("service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + datadogRegistry.ServiceReqsCounter().With(nil, "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + datadogRegistry.ServiceReqsCounter().With(nil, "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) datadogRegistry.ServiceReqsTLSCounter().With("service", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) datadogRegistry.ServiceReqDurationHistogram().With("service", "test", "code", strconv.Itoa(http.StatusOK)).Observe(10000) - datadogRegistry.ServiceOpenConnsGauge().With("service", "test").Set(1) datadogRegistry.ServiceRetriesCounter().With("service", "test").Add(1) datadogRegistry.ServiceRetriesCounter().With("service", "test").Add(1) datadogRegistry.ServiceServerUpGauge().With("service", "test", "url", "http://127.0.0.1", "one", "two").Set(1) diff --git a/pkg/metrics/headers.go b/pkg/metrics/headers.go new file mode 100644 index 000000000..65443cd29 --- /dev/null +++ b/pkg/metrics/headers.go @@ -0,0 +1,57 @@ +package metrics + +import ( + "net/http" + + "github.com/go-kit/kit/metrics" +) + +// CounterWithHeaders represents a counter that can use http.Header values as label values. +type CounterWithHeaders interface { + Add(delta float64) + With(headers http.Header, labelValues ...string) CounterWithHeaders +} + +// MultiCounterWithHeaders collects multiple individual CounterWithHeaders and treats them as a unit. +type MultiCounterWithHeaders []CounterWithHeaders + +// NewMultiCounterWithHeaders returns a multi-counter, wrapping the passed CounterWithHeaders. +func NewMultiCounterWithHeaders(c ...CounterWithHeaders) MultiCounterWithHeaders { + return c +} + +// Add adds the given delta value to the counter value. +func (c MultiCounterWithHeaders) Add(delta float64) { + for _, counter := range c { + counter.Add(delta) + } +} + +// With creates a new counter by appending the given label values and http.Header as labels and returns it. +func (c MultiCounterWithHeaders) With(headers http.Header, labelValues ...string) CounterWithHeaders { + next := make(MultiCounterWithHeaders, len(c)) + for i := range c { + next[i] = c[i].With(headers, labelValues...) + } + return next +} + +// NewCounterWithNoopHeaders returns a CounterWithNoopHeaders. +func NewCounterWithNoopHeaders(counter metrics.Counter) CounterWithNoopHeaders { + return CounterWithNoopHeaders{counter: counter} +} + +// CounterWithNoopHeaders is a counter that satisfies CounterWithHeaders but ignores the given http.Header. +type CounterWithNoopHeaders struct { + counter metrics.Counter +} + +// Add adds the given delta value to the counter value. +func (c CounterWithNoopHeaders) Add(delta float64) { + c.counter.Add(delta) +} + +// With creates a new counter by appending the given label values and returns it. +func (c CounterWithNoopHeaders) With(_ http.Header, labelValues ...string) CounterWithHeaders { + return NewCounterWithNoopHeaders(c.counter.With(labelValues...)) +} diff --git a/pkg/metrics/influxdb2.go b/pkg/metrics/influxdb2.go index 3c1b2339c..270ac03a9 100644 --- a/pkg/metrics/influxdb2.go +++ b/pkg/metrics/influxdb2.go @@ -25,23 +25,20 @@ var ( const ( influxDBConfigReloadsName = "traefik.config.reload.total" - influxDBConfigReloadsFailureName = influxDBConfigReloadsName + ".failure" influxDBLastConfigReloadSuccessName = "traefik.config.reload.lastSuccessTimestamp" - influxDBLastConfigReloadFailureName = "traefik.config.reload.lastFailureTimestamp" + influxDBOpenConnsName = "traefik.open.connections" influxDBTLSCertsNotAfterTimestampName = "traefik.tls.certs.notAfterTimestamp" influxDBEntryPointReqsName = "traefik.entrypoint.requests.total" influxDBEntryPointReqsTLSName = "traefik.entrypoint.requests.tls.total" influxDBEntryPointReqDurationName = "traefik.entrypoint.request.duration" - influxDBEntryPointOpenConnsName = "traefik.entrypoint.connections.open" influxDBEntryPointReqsBytesName = "traefik.entrypoint.requests.bytes.total" influxDBEntryPointRespsBytesName = "traefik.entrypoint.responses.bytes.total" influxDBRouterReqsName = "traefik.router.requests.total" influxDBRouterReqsTLSName = "traefik.router.requests.tls.total" influxDBRouterReqsDurationName = "traefik.router.request.duration" - influxDBORouterOpenConnsName = "traefik.router.connections.open" influxDBRouterReqsBytesName = "traefik.router.requests.bytes.total" influxDBRouterRespsBytesName = "traefik.router.responses.bytes.total" @@ -49,7 +46,6 @@ const ( influxDBServiceReqsTLSName = "traefik.service.requests.tls.total" influxDBServiceReqsDurationName = "traefik.service.request.duration" influxDBServiceRetriesTotalName = "traefik.service.retries.total" - influxDBServiceOpenConnsName = "traefik.service.connections.open" influxDBServiceServerUpName = "traefik.service.server.up" influxDBServiceReqsBytesName = "traefik.service.requests.bytes.total" influxDBServiceRespsBytesName = "traefik.service.responses.bytes.total" @@ -84,39 +80,35 @@ func RegisterInfluxDB2(ctx context.Context, config *types.InfluxDB2) Registry { registry := &standardRegistry{ configReloadsCounter: influxDB2Store.NewCounter(influxDBConfigReloadsName), - configReloadsFailureCounter: influxDB2Store.NewCounter(influxDBConfigReloadsFailureName), lastConfigReloadSuccessGauge: influxDB2Store.NewGauge(influxDBLastConfigReloadSuccessName), - lastConfigReloadFailureGauge: influxDB2Store.NewGauge(influxDBLastConfigReloadFailureName), + openConnectionsGauge: influxDB2Store.NewGauge(influxDBOpenConnsName), tlsCertsNotAfterTimestampGauge: influxDB2Store.NewGauge(influxDBTLSCertsNotAfterTimestampName), } if config.AddEntryPointsLabels { registry.epEnabled = config.AddEntryPointsLabels - registry.entryPointReqsCounter = influxDB2Store.NewCounter(influxDBEntryPointReqsName) + registry.entryPointReqsCounter = NewCounterWithNoopHeaders(influxDB2Store.NewCounter(influxDBEntryPointReqsName)) registry.entryPointReqsTLSCounter = influxDB2Store.NewCounter(influxDBEntryPointReqsTLSName) registry.entryPointReqDurationHistogram, _ = NewHistogramWithScale(influxDB2Store.NewHistogram(influxDBEntryPointReqDurationName), time.Second) - registry.entryPointOpenConnsGauge = influxDB2Store.NewGauge(influxDBEntryPointOpenConnsName) registry.entryPointReqsBytesCounter = influxDB2Store.NewCounter(influxDBEntryPointReqsBytesName) registry.entryPointRespsBytesCounter = influxDB2Store.NewCounter(influxDBEntryPointRespsBytesName) } if config.AddRoutersLabels { registry.routerEnabled = config.AddRoutersLabels - registry.routerReqsCounter = influxDB2Store.NewCounter(influxDBRouterReqsName) + registry.routerReqsCounter = NewCounterWithNoopHeaders(influxDB2Store.NewCounter(influxDBRouterReqsName)) registry.routerReqsTLSCounter = influxDB2Store.NewCounter(influxDBRouterReqsTLSName) registry.routerReqDurationHistogram, _ = NewHistogramWithScale(influxDB2Store.NewHistogram(influxDBRouterReqsDurationName), time.Second) - registry.routerOpenConnsGauge = influxDB2Store.NewGauge(influxDBORouterOpenConnsName) registry.routerReqsBytesCounter = influxDB2Store.NewCounter(influxDBRouterReqsBytesName) registry.routerRespsBytesCounter = influxDB2Store.NewCounter(influxDBRouterRespsBytesName) } if config.AddServicesLabels { registry.svcEnabled = config.AddServicesLabels - registry.serviceReqsCounter = influxDB2Store.NewCounter(influxDBServiceReqsName) + registry.serviceReqsCounter = NewCounterWithNoopHeaders(influxDB2Store.NewCounter(influxDBServiceReqsName)) registry.serviceReqsTLSCounter = influxDB2Store.NewCounter(influxDBServiceReqsTLSName) registry.serviceReqDurationHistogram, _ = NewHistogramWithScale(influxDB2Store.NewHistogram(influxDBServiceReqsDurationName), time.Second) registry.serviceRetriesCounter = influxDB2Store.NewCounter(influxDBServiceRetriesTotalName) - registry.serviceOpenConnsGauge = influxDB2Store.NewGauge(influxDBServiceOpenConnsName) registry.serviceServerUpGauge = influxDB2Store.NewGauge(influxDBServiceServerUpName) registry.serviceReqsBytesCounter = influxDB2Store.NewCounter(influxDBServiceReqsBytesName) registry.serviceRespsBytesCounter = influxDB2Store.NewCounter(influxDBServiceRespsBytesName) diff --git a/pkg/metrics/influxdb2_test.go b/pkg/metrics/influxdb2_test.go index c93fe9f13..89b558075 100644 --- a/pkg/metrics/influxdb2_test.go +++ b/pkg/metrics/influxdb2_test.go @@ -47,15 +47,13 @@ func TestInfluxDB2(t *testing.T) { expectedServer := []string{ `(traefik\.config\.reload\.total count=1) [\d]{19}`, - `(traefik\.config\.reload\.total\.failure count=1) [\d]{19}`, `(traefik\.config\.reload\.lastSuccessTimestamp value=1) [\d]{19}`, - `(traefik\.config\.reload\.lastFailureTimestamp value=1) [\d]{19}`, + `(traefik\.open\.connections,entrypoint=test,protocol=TCP value=1) [\d]{19}`, } influxDB2Registry.ConfigReloadsCounter().Add(1) - influxDB2Registry.ConfigReloadsFailureCounter().Add(1) influxDB2Registry.LastConfigReloadSuccessGauge().Set(1) - influxDB2Registry.LastConfigReloadFailureGauge().Set(1) + influxDB2Registry.OpenConnectionsGauge().With("entrypoint", "test", "protocol", "TCP").Set(1) msgServer := <-c assertMessage(t, *msgServer, expectedServer) @@ -73,15 +71,13 @@ func TestInfluxDB2(t *testing.T) { `(traefik\.entrypoint\.requests\.total,code=200,entrypoint=test,method=GET count=1) [\d]{19}`, `(traefik\.entrypoint\.requests\.tls\.total,entrypoint=test,tls_cipher=bar,tls_version=foo count=1) [\d]{19}`, `(traefik\.entrypoint\.request\.duration(?:,code=[\d]{3})?,entrypoint=test p50=10000,p90=10000,p95=10000,p99=10000) [\d]{19}`, - `(traefik\.entrypoint\.connections\.open,entrypoint=test value=1) [\d]{19}`, `(traefik\.entrypoint\.requests\.bytes\.total,code=200,entrypoint=test,method=GET count=1) [\d]{19}`, `(traefik\.entrypoint\.responses\.bytes\.total,code=200,entrypoint=test,method=GET count=1) [\d]{19}`, } - influxDB2Registry.EntryPointReqsCounter().With("entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + influxDB2Registry.EntryPointReqsCounter().With(nil, "entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) influxDB2Registry.EntryPointReqsTLSCounter().With("entrypoint", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) influxDB2Registry.EntryPointReqDurationHistogram().With("entrypoint", "test").Observe(10000) - influxDB2Registry.EntryPointOpenConnsGauge().With("entrypoint", "test").Set(1) influxDB2Registry.EntryPointReqsBytesCounter().With("entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) influxDB2Registry.EntryPointRespsBytesCounter().With("entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) msgEntrypoint := <-c @@ -93,16 +89,14 @@ func TestInfluxDB2(t *testing.T) { `(traefik\.router\.requests\.total,code=404,method=GET,router=demo,service=test count=1) [\d]{19}`, `(traefik\.router\.requests\.tls\.total,router=demo,service=test,tls_cipher=bar,tls_version=foo count=1) [\d]{19}`, `(traefik\.router\.request\.duration,code=200,router=demo,service=test p50=10000,p90=10000,p95=10000,p99=10000) [\d]{19}`, - `(traefik\.router\.connections\.open,router=demo,service=test value=1) [\d]{19}`, `(traefik\.router\.requests\.bytes\.total,code=200,method=GET,router=demo,service=test count=1) [\d]{19}`, `(traefik\.router\.responses\.bytes\.total,code=200,method=GET,router=demo,service=test count=1) [\d]{19}`, } - influxDB2Registry.RouterReqsCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) - influxDB2Registry.RouterReqsCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + influxDB2Registry.RouterReqsCounter().With(nil, "router", "demo", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + influxDB2Registry.RouterReqsCounter().With(nil, "router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) influxDB2Registry.RouterReqsTLSCounter().With("router", "demo", "service", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) influxDB2Registry.RouterReqDurationHistogram().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK)).Observe(10000) - influxDB2Registry.RouterOpenConnsGauge().With("router", "demo", "service", "test").Set(1) influxDB2Registry.RouterReqsBytesCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) influxDB2Registry.RouterRespsBytesCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) msgRouter := <-c @@ -119,8 +113,8 @@ func TestInfluxDB2(t *testing.T) { `(traefik\.service\.responses\.bytes\.total,code=200,method=GET,service=test count=1) [\d]{19}`, } - influxDB2Registry.ServiceReqsCounter().With("service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - influxDB2Registry.ServiceReqsCounter().With("service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + influxDB2Registry.ServiceReqsCounter().With(nil, "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + influxDB2Registry.ServiceReqsCounter().With(nil, "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) influxDB2Registry.ServiceReqsTLSCounter().With("service", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) influxDB2Registry.ServiceReqDurationHistogram().With("service", "test", "code", strconv.Itoa(http.StatusOK)).Observe(10000) influxDB2Registry.ServiceServerUpGauge().With("service", "test", "url", "http://127.0.0.1").Set(1) @@ -142,19 +136,6 @@ func TestInfluxDB2(t *testing.T) { msgServiceRetries := <-c assertMessage(t, *msgServiceRetries, expectedServiceRetries) - - expectedServiceOpenConns := []string{ - `(traefik\.service\.connections\.open,service=test value=2) [\d]{19}`, - `(traefik\.service\.connections\.open,service=foobar value=1) [\d]{19}`, - } - - influxDB2Registry.ServiceOpenConnsGauge().With("service", "test").Add(1) - influxDB2Registry.ServiceOpenConnsGauge().With("service", "test").Add(1) - influxDB2Registry.ServiceOpenConnsGauge().With("service", "foobar").Add(1) - - msgServiceOpenConns := <-c - - assertMessage(t, *msgServiceOpenConns, expectedServiceOpenConns) } func assertMessage(t *testing.T, msg string, patterns []string) { diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index ac49d389a..e87af0277 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -22,9 +22,8 @@ type Registry interface { // server metrics ConfigReloadsCounter() metrics.Counter - ConfigReloadsFailureCounter() metrics.Counter LastConfigReloadSuccessGauge() metrics.Gauge - LastConfigReloadFailureGauge() metrics.Gauge + OpenConnectionsGauge() metrics.Gauge // TLS @@ -32,28 +31,25 @@ type Registry interface { // entry point metrics - EntryPointReqsCounter() metrics.Counter + EntryPointReqsCounter() CounterWithHeaders EntryPointReqsTLSCounter() metrics.Counter EntryPointReqDurationHistogram() ScalableHistogram - EntryPointOpenConnsGauge() metrics.Gauge EntryPointReqsBytesCounter() metrics.Counter EntryPointRespsBytesCounter() metrics.Counter // router metrics - RouterReqsCounter() metrics.Counter + RouterReqsCounter() CounterWithHeaders RouterReqsTLSCounter() metrics.Counter RouterReqDurationHistogram() ScalableHistogram - RouterOpenConnsGauge() metrics.Gauge RouterReqsBytesCounter() metrics.Counter RouterRespsBytesCounter() metrics.Counter // service metrics - ServiceReqsCounter() metrics.Counter + ServiceReqsCounter() CounterWithHeaders ServiceReqsTLSCounter() metrics.Counter ServiceReqDurationHistogram() ScalableHistogram - ServiceOpenConnsGauge() metrics.Gauge ServiceRetriesCounter() metrics.Counter ServiceServerUpGauge() metrics.Gauge ServiceReqsBytesCounter() metrics.Counter @@ -71,26 +67,22 @@ func NewVoidRegistry() Registry { // This allows for feature disparity between the different metric implementations. func NewMultiRegistry(registries []Registry) Registry { var configReloadsCounter []metrics.Counter - var configReloadsFailureCounter []metrics.Counter var lastConfigReloadSuccessGauge []metrics.Gauge - var lastConfigReloadFailureGauge []metrics.Gauge + var openConnectionsGauge []metrics.Gauge var tlsCertsNotAfterTimestampGauge []metrics.Gauge - var entryPointReqsCounter []metrics.Counter + var entryPointReqsCounter []CounterWithHeaders var entryPointReqsTLSCounter []metrics.Counter var entryPointReqDurationHistogram []ScalableHistogram - var entryPointOpenConnsGauge []metrics.Gauge var entryPointReqsBytesCounter []metrics.Counter var entryPointRespsBytesCounter []metrics.Counter - var routerReqsCounter []metrics.Counter + var routerReqsCounter []CounterWithHeaders var routerReqsTLSCounter []metrics.Counter var routerReqDurationHistogram []ScalableHistogram - var routerOpenConnsGauge []metrics.Gauge var routerReqsBytesCounter []metrics.Counter var routerRespsBytesCounter []metrics.Counter - var serviceReqsCounter []metrics.Counter + var serviceReqsCounter []CounterWithHeaders var serviceReqsTLSCounter []metrics.Counter var serviceReqDurationHistogram []ScalableHistogram - var serviceOpenConnsGauge []metrics.Gauge var serviceRetriesCounter []metrics.Counter var serviceServerUpGauge []metrics.Gauge var serviceReqsBytesCounter []metrics.Counter @@ -100,14 +92,11 @@ func NewMultiRegistry(registries []Registry) Registry { if r.ConfigReloadsCounter() != nil { configReloadsCounter = append(configReloadsCounter, r.ConfigReloadsCounter()) } - if r.ConfigReloadsFailureCounter() != nil { - configReloadsFailureCounter = append(configReloadsFailureCounter, r.ConfigReloadsFailureCounter()) - } if r.LastConfigReloadSuccessGauge() != nil { lastConfigReloadSuccessGauge = append(lastConfigReloadSuccessGauge, r.LastConfigReloadSuccessGauge()) } - if r.LastConfigReloadFailureGauge() != nil { - lastConfigReloadFailureGauge = append(lastConfigReloadFailureGauge, r.LastConfigReloadFailureGauge()) + if r.OpenConnectionsGauge() != nil { + openConnectionsGauge = append(openConnectionsGauge, r.OpenConnectionsGauge()) } if r.TLSCertsNotAfterTimestampGauge() != nil { tlsCertsNotAfterTimestampGauge = append(tlsCertsNotAfterTimestampGauge, r.TLSCertsNotAfterTimestampGauge()) @@ -121,9 +110,6 @@ func NewMultiRegistry(registries []Registry) Registry { if r.EntryPointReqDurationHistogram() != nil { entryPointReqDurationHistogram = append(entryPointReqDurationHistogram, r.EntryPointReqDurationHistogram()) } - if r.EntryPointOpenConnsGauge() != nil { - entryPointOpenConnsGauge = append(entryPointOpenConnsGauge, r.EntryPointOpenConnsGauge()) - } if r.EntryPointReqsBytesCounter() != nil { entryPointReqsBytesCounter = append(entryPointReqsBytesCounter, r.EntryPointReqsBytesCounter()) } @@ -139,9 +125,6 @@ func NewMultiRegistry(registries []Registry) Registry { if r.RouterReqDurationHistogram() != nil { routerReqDurationHistogram = append(routerReqDurationHistogram, r.RouterReqDurationHistogram()) } - if r.RouterOpenConnsGauge() != nil { - routerOpenConnsGauge = append(routerOpenConnsGauge, r.RouterOpenConnsGauge()) - } if r.RouterReqsBytesCounter() != nil { routerReqsBytesCounter = append(routerReqsBytesCounter, r.RouterReqsBytesCounter()) } @@ -157,9 +140,6 @@ func NewMultiRegistry(registries []Registry) Registry { if r.ServiceReqDurationHistogram() != nil { serviceReqDurationHistogram = append(serviceReqDurationHistogram, r.ServiceReqDurationHistogram()) } - if r.ServiceOpenConnsGauge() != nil { - serviceOpenConnsGauge = append(serviceOpenConnsGauge, r.ServiceOpenConnsGauge()) - } if r.ServiceRetriesCounter() != nil { serviceRetriesCounter = append(serviceRetriesCounter, r.ServiceRetriesCounter()) } @@ -175,30 +155,26 @@ func NewMultiRegistry(registries []Registry) Registry { } return &standardRegistry{ - epEnabled: len(entryPointReqsCounter) > 0 || len(entryPointReqDurationHistogram) > 0 || len(entryPointOpenConnsGauge) > 0, - svcEnabled: len(serviceReqsCounter) > 0 || len(serviceReqDurationHistogram) > 0 || len(serviceOpenConnsGauge) > 0 || len(serviceRetriesCounter) > 0 || len(serviceServerUpGauge) > 0, - routerEnabled: len(routerReqsCounter) > 0 || len(routerReqDurationHistogram) > 0 || len(routerOpenConnsGauge) > 0, + epEnabled: len(entryPointReqsCounter) > 0 || len(entryPointReqDurationHistogram) > 0, + svcEnabled: len(serviceReqsCounter) > 0 || len(serviceReqDurationHistogram) > 0 || len(serviceRetriesCounter) > 0 || len(serviceServerUpGauge) > 0, + routerEnabled: len(routerReqsCounter) > 0 || len(routerReqDurationHistogram) > 0, configReloadsCounter: multi.NewCounter(configReloadsCounter...), - configReloadsFailureCounter: multi.NewCounter(configReloadsFailureCounter...), lastConfigReloadSuccessGauge: multi.NewGauge(lastConfigReloadSuccessGauge...), - lastConfigReloadFailureGauge: multi.NewGauge(lastConfigReloadFailureGauge...), + openConnectionsGauge: multi.NewGauge(openConnectionsGauge...), tlsCertsNotAfterTimestampGauge: multi.NewGauge(tlsCertsNotAfterTimestampGauge...), - entryPointReqsCounter: multi.NewCounter(entryPointReqsCounter...), + entryPointReqsCounter: NewMultiCounterWithHeaders(entryPointReqsCounter...), entryPointReqsTLSCounter: multi.NewCounter(entryPointReqsTLSCounter...), entryPointReqDurationHistogram: MultiHistogram(entryPointReqDurationHistogram), - entryPointOpenConnsGauge: multi.NewGauge(entryPointOpenConnsGauge...), entryPointReqsBytesCounter: multi.NewCounter(entryPointReqsBytesCounter...), entryPointRespsBytesCounter: multi.NewCounter(entryPointRespsBytesCounter...), - routerReqsCounter: multi.NewCounter(routerReqsCounter...), + routerReqsCounter: NewMultiCounterWithHeaders(routerReqsCounter...), routerReqsTLSCounter: multi.NewCounter(routerReqsTLSCounter...), routerReqDurationHistogram: MultiHistogram(routerReqDurationHistogram), - routerOpenConnsGauge: multi.NewGauge(routerOpenConnsGauge...), routerReqsBytesCounter: multi.NewCounter(routerReqsBytesCounter...), routerRespsBytesCounter: multi.NewCounter(routerRespsBytesCounter...), - serviceReqsCounter: multi.NewCounter(serviceReqsCounter...), + serviceReqsCounter: NewMultiCounterWithHeaders(serviceReqsCounter...), serviceReqsTLSCounter: multi.NewCounter(serviceReqsTLSCounter...), serviceReqDurationHistogram: MultiHistogram(serviceReqDurationHistogram), - serviceOpenConnsGauge: multi.NewGauge(serviceOpenConnsGauge...), serviceRetriesCounter: multi.NewCounter(serviceRetriesCounter...), serviceServerUpGauge: multi.NewGauge(serviceServerUpGauge...), serviceReqsBytesCounter: multi.NewCounter(serviceReqsBytesCounter...), @@ -211,26 +187,22 @@ type standardRegistry struct { routerEnabled bool svcEnabled bool configReloadsCounter metrics.Counter - configReloadsFailureCounter metrics.Counter lastConfigReloadSuccessGauge metrics.Gauge - lastConfigReloadFailureGauge metrics.Gauge + openConnectionsGauge metrics.Gauge tlsCertsNotAfterTimestampGauge metrics.Gauge - entryPointReqsCounter metrics.Counter + entryPointReqsCounter CounterWithHeaders entryPointReqsTLSCounter metrics.Counter entryPointReqDurationHistogram ScalableHistogram - entryPointOpenConnsGauge metrics.Gauge entryPointReqsBytesCounter metrics.Counter entryPointRespsBytesCounter metrics.Counter - routerReqsCounter metrics.Counter + routerReqsCounter CounterWithHeaders routerReqsTLSCounter metrics.Counter routerReqDurationHistogram ScalableHistogram - routerOpenConnsGauge metrics.Gauge routerReqsBytesCounter metrics.Counter routerRespsBytesCounter metrics.Counter - serviceReqsCounter metrics.Counter + serviceReqsCounter CounterWithHeaders serviceReqsTLSCounter metrics.Counter serviceReqDurationHistogram ScalableHistogram - serviceOpenConnsGauge metrics.Gauge serviceRetriesCounter metrics.Counter serviceServerUpGauge metrics.Gauge serviceReqsBytesCounter metrics.Counter @@ -253,23 +225,19 @@ func (r *standardRegistry) ConfigReloadsCounter() metrics.Counter { return r.configReloadsCounter } -func (r *standardRegistry) ConfigReloadsFailureCounter() metrics.Counter { - return r.configReloadsFailureCounter -} - func (r *standardRegistry) LastConfigReloadSuccessGauge() metrics.Gauge { return r.lastConfigReloadSuccessGauge } -func (r *standardRegistry) LastConfigReloadFailureGauge() metrics.Gauge { - return r.lastConfigReloadFailureGauge +func (r *standardRegistry) OpenConnectionsGauge() metrics.Gauge { + return r.openConnectionsGauge } func (r *standardRegistry) TLSCertsNotAfterTimestampGauge() metrics.Gauge { return r.tlsCertsNotAfterTimestampGauge } -func (r *standardRegistry) EntryPointReqsCounter() metrics.Counter { +func (r *standardRegistry) EntryPointReqsCounter() CounterWithHeaders { return r.entryPointReqsCounter } @@ -281,10 +249,6 @@ func (r *standardRegistry) EntryPointReqDurationHistogram() ScalableHistogram { return r.entryPointReqDurationHistogram } -func (r *standardRegistry) EntryPointOpenConnsGauge() metrics.Gauge { - return r.entryPointOpenConnsGauge -} - func (r *standardRegistry) EntryPointReqsBytesCounter() metrics.Counter { return r.entryPointReqsBytesCounter } @@ -293,7 +257,7 @@ func (r *standardRegistry) EntryPointRespsBytesCounter() metrics.Counter { return r.entryPointRespsBytesCounter } -func (r *standardRegistry) RouterReqsCounter() metrics.Counter { +func (r *standardRegistry) RouterReqsCounter() CounterWithHeaders { return r.routerReqsCounter } @@ -305,10 +269,6 @@ func (r *standardRegistry) RouterReqDurationHistogram() ScalableHistogram { return r.routerReqDurationHistogram } -func (r *standardRegistry) RouterOpenConnsGauge() metrics.Gauge { - return r.routerOpenConnsGauge -} - func (r *standardRegistry) RouterReqsBytesCounter() metrics.Counter { return r.routerReqsBytesCounter } @@ -317,7 +277,7 @@ func (r *standardRegistry) RouterRespsBytesCounter() metrics.Counter { return r.routerRespsBytesCounter } -func (r *standardRegistry) ServiceReqsCounter() metrics.Counter { +func (r *standardRegistry) ServiceReqsCounter() CounterWithHeaders { return r.serviceReqsCounter } @@ -329,10 +289,6 @@ func (r *standardRegistry) ServiceReqDurationHistogram() ScalableHistogram { return r.serviceReqDurationHistogram } -func (r *standardRegistry) ServiceOpenConnsGauge() metrics.Gauge { - return r.serviceOpenConnsGauge -} - func (r *standardRegistry) ServiceRetriesCounter() metrics.Counter { return r.serviceRetriesCounter } diff --git a/pkg/metrics/metrics_test.go b/pkg/metrics/metrics_test.go index 7036335ea..6871aa0a5 100644 --- a/pkg/metrics/metrics_test.go +++ b/pkg/metrics/metrics_test.go @@ -2,6 +2,7 @@ package metrics import ( "bytes" + "net/http" "strings" "testing" "time" @@ -37,12 +38,12 @@ func TestNewMultiRegistry(t *testing.T) { registries := []Registry{newCollectingRetryMetrics(), newCollectingRetryMetrics()} registry := NewMultiRegistry(registries) - registry.ServiceReqsCounter().With("key", "requests").Add(1) + registry.ServiceReqsCounter().With(nil, "key", "requests").Add(1) registry.ServiceReqDurationHistogram().With("key", "durations").Observe(float64(2)) registry.ServiceRetriesCounter().With("key", "retries").Add(3) for _, collectingRegistry := range registries { - cReqsCounter := collectingRegistry.ServiceReqsCounter().(*counterMock) + cReqsCounter := collectingRegistry.ServiceReqsCounter().(*counterWithHeadersMock) cReqDurationHistogram := collectingRegistry.ServiceReqDurationHistogram().(*histogramMock) cRetriesCounter := collectingRegistry.ServiceRetriesCounter().(*counterMock) @@ -67,7 +68,7 @@ func TestNewMultiRegistry(t *testing.T) { func newCollectingRetryMetrics() Registry { return &standardRegistry{ - serviceReqsCounter: &counterMock{}, + serviceReqsCounter: &counterWithHeadersMock{}, serviceReqDurationHistogram: &histogramMock{}, serviceRetriesCounter: &counterMock{}, } @@ -87,6 +88,20 @@ func (c *counterMock) Add(delta float64) { c.counterValue += delta } +type counterWithHeadersMock struct { + counterValue float64 + lastLabelValues []string +} + +func (c *counterWithHeadersMock) With(_ http.Header, labelValues ...string) CounterWithHeaders { + c.lastLabelValues = labelValues + return c +} + +func (c *counterWithHeadersMock) Add(delta float64) { + c.counterValue += delta +} + type histogramMock struct { lastHistogramValue float64 lastLabelValues []string diff --git a/pkg/metrics/opentelemetry.go b/pkg/metrics/opentelemetry.go index 1a8dd4d6c..5dda1d5d0 100644 --- a/pkg/metrics/opentelemetry.go +++ b/pkg/metrics/opentelemetry.go @@ -57,49 +57,39 @@ func RegisterOpenTelemetry(ctx context.Context, config *types.OpenTelemetry) Reg routerEnabled: config.AddRoutersLabels, svcEnabled: config.AddServicesLabels, configReloadsCounter: newOTLPCounterFrom(meter, configReloadsTotalName, "Config reloads"), - configReloadsFailureCounter: newOTLPCounterFrom(meter, configReloadsFailuresTotalName, "Config reload failures"), lastConfigReloadSuccessGauge: newOTLPGaugeFrom(meter, configLastReloadSuccessName, "Last config reload success", unit.Milliseconds), - lastConfigReloadFailureGauge: newOTLPGaugeFrom(meter, configLastReloadFailureName, "Last config reload failure", unit.Milliseconds), - tlsCertsNotAfterTimestampGauge: newOTLPGaugeFrom(meter, tlsCertsNotAfterTimestamp, "Certificate expiration timestamp", unit.Milliseconds), + openConnectionsGauge: newOTLPGaugeFrom(meter, openConnectionsName, "How many open connections exist, by entryPoint and protocol", unit.Dimensionless), + tlsCertsNotAfterTimestampGauge: newOTLPGaugeFrom(meter, tlsCertsNotAfterTimestampName, "Certificate expiration timestamp", unit.Milliseconds), } if config.AddEntryPointsLabels { - reg.entryPointReqsCounter = newOTLPCounterFrom(meter, entryPointReqsTotalName, - "How many HTTP requests processed on an entrypoint, partitioned by status code, protocol, and method.") + reg.entryPointReqsCounter = NewCounterWithNoopHeaders(newOTLPCounterFrom(meter, entryPointReqsTotalName, + "How many HTTP requests processed on an entrypoint, partitioned by status code, protocol, and method.")) reg.entryPointReqsTLSCounter = newOTLPCounterFrom(meter, entryPointReqsTLSTotalName, "How many HTTP requests with TLS processed on an entrypoint, partitioned by TLS Version and TLS cipher Used.") 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.entryPointOpenConnsGauge = newOTLPGaugeFrom(meter, entryPointOpenConnsName, - "How many open connections exist on an entrypoint, partitioned by method and protocol.", - unit.Dimensionless) } if config.AddRoutersLabels { - reg.routerReqsCounter = newOTLPCounterFrom(meter, routerReqsTotalName, - "How many HTTP requests are processed on a router, partitioned by service, status code, protocol, and method.") + reg.routerReqsCounter = NewCounterWithNoopHeaders(newOTLPCounterFrom(meter, routerReqsTotalName, + "How many HTTP requests are processed on a router, partitioned by service, status code, protocol, and method.")) reg.routerReqsTLSCounter = newOTLPCounterFrom(meter, routerReqsTLSTotalName, "How many HTTP requests with TLS are processed on a router, partitioned by service, TLS Version, and TLS cipher Used.") 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.routerOpenConnsGauge = newOTLPGaugeFrom(meter, routerOpenConnsName, - "How many open connections exist on a router, partitioned by service, method, and protocol.", - unit.Dimensionless) } if config.AddServicesLabels { - reg.serviceReqsCounter = newOTLPCounterFrom(meter, serviceReqsTotalName, - "How many HTTP requests processed on a service, partitioned by status code, protocol, and method.") + reg.serviceReqsCounter = NewCounterWithNoopHeaders(newOTLPCounterFrom(meter, serviceReqsTotalName, + "How many HTTP requests processed on a service, partitioned by status code, protocol, and method.")) reg.serviceReqsTLSCounter = newOTLPCounterFrom(meter, serviceReqsTLSTotalName, "How many HTTP requests with TLS processed on a service, partitioned by TLS version and TLS cipher.") reg.serviceReqDurationHistogram, _ = NewHistogramWithScale(newOTLPHistogramFrom(meter, serviceReqDurationName, "How long it took to process the request on a service, partitioned by status code, protocol, and method.", unit.Milliseconds), time.Second) - reg.serviceOpenConnsGauge = newOTLPGaugeFrom(meter, serviceOpenConnsName, - "How many open connections exist on a service, partitioned by method and protocol.", - unit.Dimensionless) reg.serviceRetriesCounter = newOTLPCounterFrom(meter, serviceRetriesTotalName, "How many request retries happened on a service.") reg.serviceServerUpGauge = newOTLPGaugeFrom(meter, serviceServerUpName, diff --git a/pkg/metrics/opentelemetry_test.go b/pkg/metrics/opentelemetry_test.go index 8cf4d070b..4f174700c 100644 --- a/pkg/metrics/opentelemetry_test.go +++ b/pkg/metrics/opentelemetry_test.go @@ -340,15 +340,13 @@ func TestOpenTelemetry(t *testing.T) { // TODO: the len of startUnixNano is no supposed to be 20, it should be 19 expected = append(expected, `({"name":"traefik_config_reloads_total","description":"Config reloads","unit":"1","sum":{"dataPoints":\[{"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, - `({"name":"traefik_config_reloads_failure_total","description":"Config reload failures","unit":"1","sum":{"dataPoints":\[{"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\],"aggregationTemporality":2,"isMonotonic":true}})`, `({"name":"traefik_config_last_reload_success","description":"Last config reload success","unit":"ms","gauge":{"dataPoints":\[{"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, - `({"name":"traefik_config_last_reload_failure","description":"Last config reload failure","unit":"ms","gauge":{"dataPoints":\[{"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, + `({"name":"traefik_open_connections","description":"How many open connections exist, by entryPoint and protocol","unit":"1","gauge":{"dataPoints":\[{"attributes":\[{"key":"entrypoint","value":{"stringValue":"test"}},{"key":"protocol","value":{"stringValue":"TCP"}}\],"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, ) registry.ConfigReloadsCounter().Add(1) - registry.ConfigReloadsFailureCounter().Add(1) registry.LastConfigReloadSuccessGauge().Set(1) - registry.LastConfigReloadFailureGauge().Set(1) + registry.OpenConnectionsGauge().With("entrypoint", "test", "protocol", "TCP").Set(1) msgServer := <-c assertMessage(t, *msgServer, expected) @@ -366,13 +364,11 @@ 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_open_connections","description":"How many open connections exist on an entrypoint, partitioned by method and protocol.","unit":"1","gauge":{"dataPoints":\[{"attributes":\[{"key":"entrypoint","value":{"stringValue":"test4"}}\],"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, ) - registry.EntryPointReqsCounter().With("entrypoint", "test1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + 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.EntryPointOpenConnsGauge().With("entrypoint", "test4").Set(1) msgEntrypoint := <-c assertMessage(t, *msgEntrypoint, expected) @@ -381,14 +377,12 @@ 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_open_connections","description":"How many open connections exist on a router, partitioned by service, method, and protocol.","unit":"1","gauge":{"dataPoints":\[{"attributes":\[{"key":"router","value":{"stringValue":"demo"}},{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, ) - registry.RouterReqsCounter().With("router", "RouterReqsCounter", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) - registry.RouterReqsCounter().With("router", "RouterReqsCounter", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + 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.RouterOpenConnsGauge().With("router", "demo", "service", "test").Set(1) msgRouter := <-c assertMessage(t, *msgRouter, expected) @@ -400,8 +394,8 @@ func TestOpenTelemetry(t *testing.T) { `({"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}\]}})`, ) - registry.ServiceReqsCounter().With("service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - registry.ServiceReqsCounter().With("service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + registry.ServiceReqsCounter().With(nil, "service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + registry.ServiceReqsCounter().With(nil, "service", "ServiceReqsCounter", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) 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) @@ -421,19 +415,6 @@ func TestOpenTelemetry(t *testing.T) { assertMessage(t, *msgServiceRetries, expected) - expected = append(expected, - `({"attributes":\[{"key":"service","value":{"stringValue":"test"}}\],"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":3})`, - `({"attributes":\[{"key":"service","value":{"stringValue":"foobar"}}\],"startTimeUnixNano":"[\d]{20}","timeUnixNano":"[\d]{19}","asDouble":1})`, - ) - - registry.ServiceOpenConnsGauge().With("service", "test").Set(1) - registry.ServiceOpenConnsGauge().With("service", "test").Add(1) - registry.ServiceOpenConnsGauge().With("service", "test").Add(1) - registry.ServiceOpenConnsGauge().With("service", "foobar").Add(1) - msgServiceOpenConns := <-c - - assertMessage(t, *msgServiceOpenConns, expected) - // We cannot rely on the previous expected pattern, // because this pattern was for matching only one dataPoint in the histogram, // and as soon as the EntryPointReqDurationHistogram.Observe is called, diff --git a/pkg/metrics/prometheus.go b/pkg/metrics/prometheus.go index 7be5d504b..608acf16a 100644 --- a/pkg/metrics/prometheus.go +++ b/pkg/metrics/prometheus.go @@ -21,22 +21,20 @@ const ( MetricNamePrefix = "traefik_" // server meta information. - metricConfigPrefix = MetricNamePrefix + "config_" - configReloadsTotalName = metricConfigPrefix + "reloads_total" - configReloadsFailuresTotalName = metricConfigPrefix + "reloads_failure_total" - configLastReloadSuccessName = metricConfigPrefix + "last_reload_success" - configLastReloadFailureName = metricConfigPrefix + "last_reload_failure" + metricConfigPrefix = MetricNamePrefix + "config_" + configReloadsTotalName = metricConfigPrefix + "reloads_total" + configLastReloadSuccessName = metricConfigPrefix + "last_reload_success" + openConnectionsName = MetricNamePrefix + "open_connections" // TLS. - metricsTLSPrefix = MetricNamePrefix + "tls_" - tlsCertsNotAfterTimestamp = metricsTLSPrefix + "certs_not_after" + metricsTLSPrefix = MetricNamePrefix + "tls_" + tlsCertsNotAfterTimestampName = metricsTLSPrefix + "certs_not_after" // entry point. metricEntryPointPrefix = MetricNamePrefix + "entrypoint_" entryPointReqsTotalName = metricEntryPointPrefix + "requests_total" entryPointReqsTLSTotalName = metricEntryPointPrefix + "requests_tls_total" entryPointReqDurationName = metricEntryPointPrefix + "request_duration_seconds" - entryPointOpenConnsName = metricEntryPointPrefix + "open_connections" entryPointReqsBytesTotalName = metricEntryPointPrefix + "requests_bytes_total" entryPointRespsBytesTotalName = metricEntryPointPrefix + "responses_bytes_total" @@ -45,7 +43,6 @@ const ( routerReqsTotalName = metricRouterPrefix + "requests_total" routerReqsTLSTotalName = metricRouterPrefix + "requests_tls_total" routerReqDurationName = metricRouterPrefix + "request_duration_seconds" - routerOpenConnsName = metricRouterPrefix + "open_connections" routerReqsBytesTotalName = metricRouterPrefix + "requests_bytes_total" routerRespsBytesTotalName = metricRouterPrefix + "responses_bytes_total" @@ -54,7 +51,6 @@ const ( serviceReqsTotalName = metricServicePrefix + "requests_total" serviceReqsTLSTotalName = metricServicePrefix + "requests_tls_total" serviceReqDurationName = metricServicePrefix + "request_duration_seconds" - serviceOpenConnsName = metricServicePrefix + "open_connections" serviceRetriesTotalName = metricServicePrefix + "retries_total" serviceServerUpName = metricServicePrefix + "server_up" serviceReqsBytesTotalName = metricServicePrefix + "requests_bytes_total" @@ -118,29 +114,24 @@ func initStandardRegistry(config *types.Prometheus) Registry { Name: configReloadsTotalName, Help: "Config reloads", }, []string{}) - configReloadsFailures := newCounterFrom(stdprometheus.CounterOpts{ - Name: configReloadsFailuresTotalName, - Help: "Config failure reloads", - }, []string{}) lastConfigReloadSuccess := newGaugeFrom(stdprometheus.GaugeOpts{ Name: configLastReloadSuccessName, Help: "Last config reload success", }, []string{}) - lastConfigReloadFailure := newGaugeFrom(stdprometheus.GaugeOpts{ - Name: configLastReloadFailureName, - Help: "Last config reload failure", - }, []string{}) tlsCertsNotAfterTimestamp := newGaugeFrom(stdprometheus.GaugeOpts{ - Name: tlsCertsNotAfterTimestamp, + Name: tlsCertsNotAfterTimestampName, Help: "Certificate expiration timestamp", }, []string{"cn", "serial", "sans"}) + openConnections := newGaugeFrom(stdprometheus.GaugeOpts{ + Name: openConnectionsName, + Help: "How many open connections exist, by entryPoint and protocol", + }, []string{"entrypoint", "protocol"}) promState.vectors = []vector{ configReloads.cv, - configReloadsFailures.cv, lastConfigReloadSuccess.gv, - lastConfigReloadFailure.gv, tlsCertsNotAfterTimestamp.gv, + openConnections.gv, } reg := &standardRegistry{ @@ -148,17 +139,16 @@ func initStandardRegistry(config *types.Prometheus) Registry { routerEnabled: config.AddRoutersLabels, svcEnabled: config.AddServicesLabels, configReloadsCounter: configReloads, - configReloadsFailureCounter: configReloadsFailures, lastConfigReloadSuccessGauge: lastConfigReloadSuccess, - lastConfigReloadFailureGauge: lastConfigReloadFailure, tlsCertsNotAfterTimestampGauge: tlsCertsNotAfterTimestamp, + openConnectionsGauge: openConnections, } if config.AddEntryPointsLabels { - entryPointReqs := newCounterFrom(stdprometheus.CounterOpts{ + entryPointReqs := newCounterWithHeadersFrom(stdprometheus.CounterOpts{ Name: entryPointReqsTotalName, Help: "How many HTTP requests processed on an entrypoint, partitioned by status code, protocol, and method.", - }, []string{"code", "method", "protocol", "entrypoint"}) + }, config.HeaderLabels, []string{"code", "method", "protocol", "entrypoint"}) entryPointReqsTLS := newCounterFrom(stdprometheus.CounterOpts{ Name: entryPointReqsTLSTotalName, Help: "How many HTTP requests with TLS processed on an entrypoint, partitioned by TLS Version and TLS cipher Used.", @@ -168,10 +158,6 @@ func initStandardRegistry(config *types.Prometheus) Registry { Help: "How long it took to process the request on an entrypoint, partitioned by status code, protocol, and method.", Buckets: buckets, }, []string{"code", "method", "protocol", "entrypoint"}) - entryPointOpenConns := newGaugeFrom(stdprometheus.GaugeOpts{ - Name: entryPointOpenConnsName, - Help: "How many open connections exist on an entrypoint, partitioned by method and protocol.", - }, []string{"method", "protocol", "entrypoint"}) entryPointReqsBytesTotal := newCounterFrom(stdprometheus.CounterOpts{ Name: entryPointReqsBytesTotalName, Help: "The total size of requests in bytes handled by an entrypoint, partitioned by status code, protocol, and method.", @@ -185,7 +171,6 @@ func initStandardRegistry(config *types.Prometheus) Registry { entryPointReqs.cv, entryPointReqsTLS.cv, entryPointReqDurations.hv, - entryPointOpenConns.gv, entryPointReqsBytesTotal.cv, entryPointRespsBytesTotal.cv, ) @@ -193,16 +178,15 @@ func initStandardRegistry(config *types.Prometheus) Registry { reg.entryPointReqsCounter = entryPointReqs reg.entryPointReqsTLSCounter = entryPointReqsTLS reg.entryPointReqDurationHistogram, _ = NewHistogramWithScale(entryPointReqDurations, time.Second) - reg.entryPointOpenConnsGauge = entryPointOpenConns reg.entryPointReqsBytesCounter = entryPointReqsBytesTotal reg.entryPointRespsBytesCounter = entryPointRespsBytesTotal } if config.AddRoutersLabels { - routerReqs := newCounterFrom(stdprometheus.CounterOpts{ + routerReqs := newCounterWithHeadersFrom(stdprometheus.CounterOpts{ Name: routerReqsTotalName, Help: "How many HTTP requests are processed on a router, partitioned by service, status code, protocol, and method.", - }, []string{"code", "method", "protocol", "router", "service"}) + }, config.HeaderLabels, []string{"code", "method", "protocol", "router", "service"}) routerReqsTLS := newCounterFrom(stdprometheus.CounterOpts{ Name: routerReqsTLSTotalName, Help: "How many HTTP requests with TLS are processed on a router, partitioned by service, TLS Version, and TLS cipher Used.", @@ -212,10 +196,6 @@ func initStandardRegistry(config *types.Prometheus) Registry { Help: "How long it took to process the request on a router, partitioned by service, status code, protocol, and method.", Buckets: buckets, }, []string{"code", "method", "protocol", "router", "service"}) - routerOpenConns := newGaugeFrom(stdprometheus.GaugeOpts{ - Name: routerOpenConnsName, - Help: "How many open connections exist on a router, partitioned by service, method, and protocol.", - }, []string{"method", "protocol", "router", "service"}) routerReqsBytesTotal := newCounterFrom(stdprometheus.CounterOpts{ Name: routerReqsBytesTotalName, Help: "The total size of requests in bytes handled by a router, partitioned by service, status code, protocol, and method.", @@ -229,23 +209,21 @@ func initStandardRegistry(config *types.Prometheus) Registry { routerReqs.cv, routerReqsTLS.cv, routerReqDurations.hv, - routerOpenConns.gv, routerReqsBytesTotal.cv, routerRespsBytesTotal.cv, ) reg.routerReqsCounter = routerReqs reg.routerReqsTLSCounter = routerReqsTLS reg.routerReqDurationHistogram, _ = NewHistogramWithScale(routerReqDurations, time.Second) - reg.routerOpenConnsGauge = routerOpenConns reg.routerReqsBytesCounter = routerReqsBytesTotal reg.routerRespsBytesCounter = routerRespsBytesTotal } if config.AddServicesLabels { - serviceReqs := newCounterFrom(stdprometheus.CounterOpts{ + serviceReqs := newCounterWithHeadersFrom(stdprometheus.CounterOpts{ Name: serviceReqsTotalName, Help: "How many HTTP requests processed on a service, partitioned by status code, protocol, and method.", - }, []string{"code", "method", "protocol", "service"}) + }, config.HeaderLabels, []string{"code", "method", "protocol", "service"}) serviceReqsTLS := newCounterFrom(stdprometheus.CounterOpts{ Name: serviceReqsTLSTotalName, Help: "How many HTTP requests with TLS processed on a service, partitioned by TLS version and TLS cipher.", @@ -255,10 +233,6 @@ func initStandardRegistry(config *types.Prometheus) Registry { Help: "How long it took to process the request on a service, partitioned by status code, protocol, and method.", Buckets: buckets, }, []string{"code", "method", "protocol", "service"}) - serviceOpenConns := newGaugeFrom(stdprometheus.GaugeOpts{ - Name: serviceOpenConnsName, - Help: "How many open connections exist on a service, partitioned by method and protocol.", - }, []string{"method", "protocol", "service"}) serviceRetries := newCounterFrom(stdprometheus.CounterOpts{ Name: serviceRetriesTotalName, Help: "How many request retries happened on a service.", @@ -280,7 +254,6 @@ func initStandardRegistry(config *types.Prometheus) Registry { serviceReqs.cv, serviceReqsTLS.cv, serviceReqDurations.hv, - serviceOpenConns.gv, serviceRetries.cv, serviceServerUp.gv, serviceReqsBytesTotal.cv, @@ -290,7 +263,6 @@ func initStandardRegistry(config *types.Prometheus) Registry { reg.serviceReqsCounter = serviceReqs reg.serviceReqsTLSCounter = serviceReqsTLS reg.serviceReqDurationHistogram, _ = NewHistogramWithScale(serviceReqDurations, time.Second) - reg.serviceOpenConnsGauge = serviceOpenConns reg.serviceRetriesCounter = serviceRetries reg.serviceServerUpGauge = serviceServerUp reg.serviceReqsBytesCounter = serviceReqsBytesTotal @@ -508,6 +480,55 @@ func (d *dynamicConfig) hasServerURL(serviceName, serverURL string) bool { return false } +func newCounterWithHeadersFrom(opts stdprometheus.CounterOpts, headers map[string]string, labelNames []string) *counterWithHeaders { + var headerLabels []string + for k := range headers { + headerLabels = append(headerLabels, k) + } + + cv := stdprometheus.NewCounterVec(opts, append(labelNames, headerLabels...)) + c := &counterWithHeaders{ + name: opts.Name, + headers: headers, + cv: cv, + } + if len(labelNames) == 0 && len(headerLabels) == 0 { + c.collector = cv.WithLabelValues() + c.Add(0) + } + return c +} + +type counterWithHeaders struct { + name string + cv *stdprometheus.CounterVec + labelNamesValues labelNamesValues + headers map[string]string + collector stdprometheus.Counter +} + +func (c *counterWithHeaders) With(headers http.Header, labelValues ...string) CounterWithHeaders { + for headerLabel, headerKey := range c.headers { + labelValues = append(labelValues, headerLabel, headers.Get(headerKey)) + } + lnv := c.labelNamesValues.With(labelValues...) + return &counterWithHeaders{ + name: c.name, + headers: c.headers, + cv: c.cv, + labelNamesValues: lnv, + collector: c.cv.With(lnv.ToLabels()), + } +} + +func (c *counterWithHeaders) Add(delta float64) { + c.collector.Add(delta) +} + +func (c *counterWithHeaders) Describe(ch chan<- *stdprometheus.Desc) { + c.cv.Describe(ch) +} + func newCounterFrom(opts stdprometheus.CounterOpts, labelNames []string) *counter { cv := stdprometheus.NewCounterVec(opts, labelNames) c := &counter{ diff --git a/pkg/metrics/prometheus_test.go b/pkg/metrics/prometheus_test.go index 468bbc898..9a5bfeba7 100644 --- a/pkg/metrics/prometheus_test.go +++ b/pkg/metrics/prometheus_test.go @@ -92,7 +92,12 @@ func TestPrometheus(t *testing.T) { promRegistry = prometheus.NewRegistry() t.Cleanup(promState.reset) - prometheusRegistry := RegisterPrometheus(context.Background(), &types.Prometheus{AddEntryPointsLabels: true, AddRoutersLabels: true, AddServicesLabels: true}) + prometheusRegistry := RegisterPrometheus(context.Background(), &types.Prometheus{ + AddEntryPointsLabels: true, + AddRoutersLabels: true, + AddServicesLabels: true, + HeaderLabels: map[string]string{"useragent": "User-Agent"}, + }) defer promRegistry.Unregister(promState) if !prometheusRegistry.IsEpEnabled() || !prometheusRegistry.IsRouterEnabled() || !prometheusRegistry.IsSvcEnabled() { @@ -100,9 +105,11 @@ func TestPrometheus(t *testing.T) { } prometheusRegistry.ConfigReloadsCounter().Add(1) - prometheusRegistry.ConfigReloadsFailureCounter().Add(1) prometheusRegistry.LastConfigReloadSuccessGauge().Set(float64(time.Now().Unix())) - prometheusRegistry.LastConfigReloadFailureGauge().Set(float64(time.Now().Unix())) + prometheusRegistry. + OpenConnectionsGauge(). + With("entrypoint", "test", "protocol", "TCP"). + Set(1) prometheusRegistry. TLSCertsNotAfterTimestampGauge(). @@ -111,16 +118,12 @@ func TestPrometheus(t *testing.T) { prometheusRegistry. EntryPointReqsCounter(). - With("code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http", "entrypoint", "http"). + With(map[string][]string{"User-Agent": {"foobar"}}, "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http", "entrypoint", "http"). Add(1) prometheusRegistry. EntryPointReqDurationHistogram(). With("code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http", "entrypoint", "http"). Observe(1) - prometheusRegistry. - EntryPointOpenConnsGauge(). - With("method", http.MethodGet, "protocol", "http", "entrypoint", "http"). - Set(1) prometheusRegistry. EntryPointRespsBytesCounter(). With("code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http", "entrypoint", "http"). @@ -132,7 +135,7 @@ func TestPrometheus(t *testing.T) { prometheusRegistry. RouterReqsCounter(). - With("router", "demo", "service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "router", "demo", "service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. RouterReqsTLSCounter(). @@ -142,10 +145,6 @@ func TestPrometheus(t *testing.T) { RouterReqDurationHistogram(). With("router", "demo", "service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Observe(10000) - prometheusRegistry. - RouterOpenConnsGauge(). - With("router", "demo", "service", "service1", "method", http.MethodGet, "protocol", "http"). - Set(1) prometheusRegistry. RouterRespsBytesCounter(). With("router", "demo", "service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). @@ -157,7 +156,7 @@ func TestPrometheus(t *testing.T) { prometheusRegistry. ServiceReqsCounter(). - With("service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(map[string][]string{"User-Agent": {"foobar"}}, "service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. ServiceReqsTLSCounter(). @@ -167,10 +166,6 @@ func TestPrometheus(t *testing.T) { ServiceReqDurationHistogram(). With("service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Observe(10000) - prometheusRegistry. - ServiceOpenConnsGauge(). - With("service", "service1", "method", http.MethodGet, "protocol", "http"). - Set(1) prometheusRegistry. ServiceRetriesCounter(). With("service", "service1"). @@ -201,26 +196,26 @@ func TestPrometheus(t *testing.T) { name: configReloadsTotalName, assert: buildCounterAssert(t, configReloadsTotalName, 1), }, - { - name: configReloadsFailuresTotalName, - assert: buildCounterAssert(t, configReloadsFailuresTotalName, 1), - }, { name: configLastReloadSuccessName, assert: buildTimestampAssert(t, configLastReloadSuccessName), }, { - name: configLastReloadFailureName, - assert: buildTimestampAssert(t, configLastReloadFailureName), + name: openConnectionsName, + labels: map[string]string{ + "protocol": "TCP", + "entrypoint": "test", + }, + assert: buildGaugeAssert(t, openConnectionsName, 1), }, { - name: tlsCertsNotAfterTimestamp, + name: tlsCertsNotAfterTimestampName, labels: map[string]string{ "cn": "value", "serial": "value", "sans": "value", }, - assert: buildTimestampAssert(t, tlsCertsNotAfterTimestamp), + assert: buildTimestampAssert(t, tlsCertsNotAfterTimestampName), }, { name: entryPointReqsTotalName, @@ -229,6 +224,7 @@ func TestPrometheus(t *testing.T) { "method": http.MethodGet, "protocol": "http", "entrypoint": "http", + "useragent": "foobar", }, assert: buildCounterAssert(t, entryPointReqsTotalName, 1), }, @@ -242,15 +238,6 @@ func TestPrometheus(t *testing.T) { }, assert: buildHistogramAssert(t, entryPointReqDurationName, 1), }, - { - name: entryPointOpenConnsName, - labels: map[string]string{ - "method": http.MethodGet, - "protocol": "http", - "entrypoint": "http", - }, - assert: buildGaugeAssert(t, entryPointOpenConnsName, 1), - }, { name: entryPointReqsBytesTotalName, labels: map[string]string{ @@ -274,11 +261,12 @@ func TestPrometheus(t *testing.T) { { name: routerReqsTotalName, labels: map[string]string{ - "code": "200", - "method": http.MethodGet, - "protocol": "http", - "service": "service1", - "router": "demo", + "code": "200", + "method": http.MethodGet, + "protocol": "http", + "service": "service1", + "router": "demo", + "useragent": "", }, assert: buildCounterAssert(t, routerReqsTotalName, 1), }, @@ -303,16 +291,6 @@ func TestPrometheus(t *testing.T) { }, assert: buildHistogramAssert(t, routerReqDurationName, 1), }, - { - name: routerOpenConnsName, - labels: map[string]string{ - "method": http.MethodGet, - "protocol": "http", - "service": "service1", - "router": "demo", - }, - assert: buildGaugeAssert(t, routerOpenConnsName, 1), - }, { name: routerReqsBytesTotalName, labels: map[string]string{ @@ -338,10 +316,11 @@ func TestPrometheus(t *testing.T) { { name: serviceReqsTotalName, labels: map[string]string{ - "code": "200", - "method": http.MethodGet, - "protocol": "http", - "service": "service1", + "code": "200", + "method": http.MethodGet, + "protocol": "http", + "service": "service1", + "useragent": "foobar", }, assert: buildCounterAssert(t, serviceReqsTotalName, 1), }, @@ -364,15 +343,6 @@ func TestPrometheus(t *testing.T) { }, assert: buildHistogramAssert(t, serviceReqDurationName, 1), }, - { - name: serviceOpenConnsName, - labels: map[string]string{ - "method": http.MethodGet, - "protocol": "http", - "service": "service1", - }, - assert: buildGaugeAssert(t, serviceOpenConnsName, 1), - }, { name: serviceRetriesTotalName, labels: map[string]string{ @@ -476,15 +446,15 @@ func TestPrometheusMetricRemoval(t *testing.T) { // should be removed after that scrape. prometheusRegistry. EntryPointReqsCounter(). - With("entrypoint", "entrypoint2", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "entrypoint", "entrypoint2", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. RouterReqsCounter(). - With("router", "router2", "service", "bar@providerName", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "router", "router2", "service", "bar@providerName", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. ServiceReqsCounter(). - With("service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "service", "service1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. ServiceServerUpGauge(). @@ -502,15 +472,15 @@ func TestPrometheusMetricRemoval(t *testing.T) { // here the counter examples. prometheusRegistry. EntryPointReqsCounter(). - With("entrypoint", "entrypoint1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "entrypoint", "entrypoint1", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. RouterReqsCounter(). - With("router", "foo@providerName", "service", "bar", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "router", "foo@providerName", "service", "bar", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. ServiceReqsCounter(). - With("service", "bar@providerName", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). + With(nil, "service", "bar@providerName", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet, "protocol", "http"). Add(1) prometheusRegistry. ServiceServerUpGauge(). @@ -588,7 +558,7 @@ func TestPrometheusRemovedMetricsReset(t *testing.T) { } prometheusRegistry. ServiceReqsCounter(). - With(labelNamesValues...). + With(nil, labelNamesValues...). Add(3) delayForTrackingCompletion() @@ -602,7 +572,7 @@ func TestPrometheusRemovedMetricsReset(t *testing.T) { prometheusRegistry. ServiceReqsCounter(). - With(labelNamesValues...). + With(nil, labelNamesValues...). Add(1) delayForTrackingCompletion() diff --git a/pkg/metrics/statsd.go b/pkg/metrics/statsd.go index c2e1027ab..871300ef6 100644 --- a/pkg/metrics/statsd.go +++ b/pkg/metrics/statsd.go @@ -18,23 +18,20 @@ var ( const ( statsdConfigReloadsName = "config.reload.total" - statsdConfigReloadsFailureName = statsdConfigReloadsName + ".failure" statsdLastConfigReloadSuccessName = "config.reload.lastSuccessTimestamp" - statsdLastConfigReloadFailureName = "config.reload.lastFailureTimestamp" + statsdOpenConnectionsName = "open.connections" statsdTLSCertsNotAfterTimestampName = "tls.certs.notAfterTimestamp" statsdEntryPointReqsName = "entrypoint.request.total" statsdEntryPointReqsTLSName = "entrypoint.request.tls.total" statsdEntryPointReqDurationName = "entrypoint.request.duration" - statsdEntryPointOpenConnsName = "entrypoint.connections.open" statsdEntryPointReqsBytesName = "entrypoint.requests.bytes.total" statsdEntryPointRespsBytesName = "entrypoint.responses.bytes.total" statsdRouterReqsName = "router.request.total" statsdRouterReqsTLSName = "router.request.tls.total" statsdRouterReqsDurationName = "router.request.duration" - statsdRouterOpenConnsName = "router.connections.open" statsdRouterReqsBytesName = "router.requests.bytes.total" statsdRouterRespsBytesName = "router.responses.bytes.total" @@ -43,7 +40,6 @@ const ( statsdServiceReqsDurationName = "service.request.duration" statsdServiceRetriesTotalName = "service.retries.total" statsdServiceServerUpName = "service.server.up" - statsdServiceOpenConnsName = "service.connections.open" statsdServiceReqsBytesName = "service.requests.bytes.total" statsdServiceRespsBytesName = "service.responses.bytes.total" ) @@ -63,39 +59,35 @@ func RegisterStatsd(ctx context.Context, config *types.Statsd) Registry { registry := &standardRegistry{ configReloadsCounter: statsdClient.NewCounter(statsdConfigReloadsName, 1.0), - configReloadsFailureCounter: statsdClient.NewCounter(statsdConfigReloadsFailureName, 1.0), lastConfigReloadSuccessGauge: statsdClient.NewGauge(statsdLastConfigReloadSuccessName), - lastConfigReloadFailureGauge: statsdClient.NewGauge(statsdLastConfigReloadFailureName), tlsCertsNotAfterTimestampGauge: statsdClient.NewGauge(statsdTLSCertsNotAfterTimestampName), + openConnectionsGauge: statsdClient.NewGauge(statsdOpenConnectionsName), } if config.AddEntryPointsLabels { registry.epEnabled = config.AddEntryPointsLabels - registry.entryPointReqsCounter = statsdClient.NewCounter(statsdEntryPointReqsName, 1.0) + registry.entryPointReqsCounter = NewCounterWithNoopHeaders(statsdClient.NewCounter(statsdEntryPointReqsName, 1.0)) registry.entryPointReqsTLSCounter = statsdClient.NewCounter(statsdEntryPointReqsTLSName, 1.0) registry.entryPointReqDurationHistogram, _ = NewHistogramWithScale(statsdClient.NewTiming(statsdEntryPointReqDurationName, 1.0), time.Millisecond) - registry.entryPointOpenConnsGauge = statsdClient.NewGauge(statsdEntryPointOpenConnsName) registry.entryPointReqsBytesCounter = statsdClient.NewCounter(statsdEntryPointReqsBytesName, 1.0) registry.entryPointRespsBytesCounter = statsdClient.NewCounter(statsdEntryPointRespsBytesName, 1.0) } if config.AddRoutersLabels { registry.routerEnabled = config.AddRoutersLabels - registry.routerReqsCounter = statsdClient.NewCounter(statsdRouterReqsName, 1.0) + registry.routerReqsCounter = NewCounterWithNoopHeaders(statsdClient.NewCounter(statsdRouterReqsName, 1.0)) registry.routerReqsTLSCounter = statsdClient.NewCounter(statsdRouterReqsTLSName, 1.0) registry.routerReqDurationHistogram, _ = NewHistogramWithScale(statsdClient.NewTiming(statsdRouterReqsDurationName, 1.0), time.Millisecond) - registry.routerOpenConnsGauge = statsdClient.NewGauge(statsdRouterOpenConnsName) registry.routerReqsBytesCounter = statsdClient.NewCounter(statsdRouterReqsBytesName, 1.0) registry.routerRespsBytesCounter = statsdClient.NewCounter(statsdRouterRespsBytesName, 1.0) } if config.AddServicesLabels { registry.svcEnabled = config.AddServicesLabels - registry.serviceReqsCounter = statsdClient.NewCounter(statsdServiceReqsName, 1.0) + registry.serviceReqsCounter = NewCounterWithNoopHeaders(statsdClient.NewCounter(statsdServiceReqsName, 1.0)) registry.serviceReqsTLSCounter = statsdClient.NewCounter(statsdServiceReqsTLSName, 1.0) registry.serviceReqDurationHistogram, _ = NewHistogramWithScale(statsdClient.NewTiming(statsdServiceReqsDurationName, 1.0), time.Millisecond) registry.serviceRetriesCounter = statsdClient.NewCounter(statsdServiceRetriesTotalName, 1.0) - registry.serviceOpenConnsGauge = statsdClient.NewGauge(statsdServiceOpenConnsName) registry.serviceServerUpGauge = statsdClient.NewGauge(statsdServiceServerUpName) registry.serviceReqsBytesCounter = statsdClient.NewCounter(statsdServiceReqsBytesName, 1.0) registry.serviceRespsBytesCounter = statsdClient.NewCounter(statsdServiceRespsBytesName, 1.0) diff --git a/pkg/metrics/statsd_test.go b/pkg/metrics/statsd_test.go index 73aeb0af9..174081db4 100644 --- a/pkg/metrics/statsd_test.go +++ b/pkg/metrics/statsd_test.go @@ -49,30 +49,26 @@ func testRegistry(t *testing.T, metricsPrefix string, registry Registry) { expected := []string{ metricsPrefix + ".config.reload.total:1.000000|c\n", - metricsPrefix + ".config.reload.total.failure:1.000000|c\n", metricsPrefix + ".config.reload.lastSuccessTimestamp:1.000000|g\n", - metricsPrefix + ".config.reload.lastFailureTimestamp:1.000000|g\n", + metricsPrefix + ".open.connections:1.000000|g\n", metricsPrefix + ".tls.certs.notAfterTimestamp:1.000000|g\n", metricsPrefix + ".entrypoint.request.total:1.000000|c\n", metricsPrefix + ".entrypoint.request.tls.total:1.000000|c\n", metricsPrefix + ".entrypoint.request.duration:10000.000000|ms", - metricsPrefix + ".entrypoint.connections.open:1.000000|g\n", metricsPrefix + ".entrypoint.requests.bytes.total:1.000000|c\n", metricsPrefix + ".entrypoint.responses.bytes.total:1.000000|c\n", metricsPrefix + ".router.request.total:2.000000|c\n", metricsPrefix + ".router.request.tls.total:1.000000|c\n", metricsPrefix + ".router.request.duration:10000.000000|ms", - metricsPrefix + ".router.connections.open:1.000000|g\n", metricsPrefix + ".router.requests.bytes.total:1.000000|c\n", metricsPrefix + ".router.responses.bytes.total:1.000000|c\n", metricsPrefix + ".service.request.total:2.000000|c\n", metricsPrefix + ".service.request.tls.total:1.000000|c\n", metricsPrefix + ".service.request.duration:10000.000000|ms", - metricsPrefix + ".service.connections.open:1.000000|g\n", metricsPrefix + ".service.retries.total:2.000000|c\n", metricsPrefix + ".service.server.up:1.000000|g\n", metricsPrefix + ".service.requests.bytes.total:1.000000|c\n", @@ -81,32 +77,28 @@ func testRegistry(t *testing.T, metricsPrefix string, registry Registry) { udp.ShouldReceiveAll(t, expected, func() { registry.ConfigReloadsCounter().Add(1) - registry.ConfigReloadsFailureCounter().Add(1) registry.LastConfigReloadSuccessGauge().Set(1) - registry.LastConfigReloadFailureGauge().Set(1) + registry.OpenConnectionsGauge().With("entrypoint", "test", "protocol", "TCP").Set(1) registry.TLSCertsNotAfterTimestampGauge().With("key", "value").Set(1) - registry.EntryPointReqsCounter().With("entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + registry.EntryPointReqsCounter().With(nil, "entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) registry.EntryPointReqsTLSCounter().With("entrypoint", "test", "tls_version", "foo", "tls_cipher", "bar").Add(1) registry.EntryPointReqDurationHistogram().With("entrypoint", "test").Observe(10000) - registry.EntryPointOpenConnsGauge().With("entrypoint", "test").Set(1) registry.EntryPointReqsBytesCounter().With("entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) registry.EntryPointRespsBytesCounter().With("entrypoint", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - registry.RouterReqsCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) - registry.RouterReqsCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + registry.RouterReqsCounter().With(nil, "router", "demo", "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + registry.RouterReqsCounter().With(nil, "router", "demo", "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.RouterOpenConnsGauge().With("router", "demo", "service", "test").Set(1) registry.RouterReqsBytesCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) registry.RouterRespsBytesCounter().With("router", "demo", "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - registry.ServiceReqsCounter().With("service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) - registry.ServiceReqsCounter().With("service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) + registry.ServiceReqsCounter().With(nil, "service", "test", "code", strconv.Itoa(http.StatusOK), "method", http.MethodGet).Add(1) + registry.ServiceReqsCounter().With(nil, "service", "test", "code", strconv.Itoa(http.StatusNotFound), "method", http.MethodGet).Add(1) 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.ServiceOpenConnsGauge().With("service", "test").Set(1) registry.ServiceRetriesCounter().With("service", "test").Add(1) registry.ServiceRetriesCounter().With("service", "test").Add(1) registry.ServiceServerUpGauge().With("service:test", "url", "http://127.0.0.1").Set(1) diff --git a/pkg/middlewares/buffering/buffering_test.go b/pkg/middlewares/buffering/buffering_test.go index 857d0abde..3d40aee5f 100644 --- a/pkg/middlewares/buffering/buffering_test.go +++ b/pkg/middlewares/buffering/buffering_test.go @@ -3,8 +3,8 @@ package buffering import ( "bytes" "context" + "crypto/rand" "math" - "math/rand" "net/http" "net/http/httptest" "testing" @@ -16,7 +16,7 @@ import ( func TestBuffering(t *testing.T) { payload := make([]byte, math.MaxInt8) - rand.Read(payload) + _, _ = rand.Read(payload) testCases := []struct { desc string diff --git a/pkg/middlewares/metrics/metrics.go b/pkg/middlewares/metrics/metrics.go index 816c453f6..64a09db17 100644 --- a/pkg/middlewares/metrics/metrics.go +++ b/pkg/middlewares/metrics/metrics.go @@ -33,10 +33,9 @@ const ( type metricsMiddleware struct { next http.Handler - reqsCounter gokitmetrics.Counter + reqsCounter metrics.CounterWithHeaders reqsTLSCounter gokitmetrics.Counter reqDurationHistogram metrics.ScalableHistogram - openConnsGauge gokitmetrics.Gauge reqsBytesCounter gokitmetrics.Counter respsBytesCounter gokitmetrics.Counter baseLabels []string @@ -51,7 +50,6 @@ func NewEntryPointMiddleware(ctx context.Context, next http.Handler, registry me reqsCounter: registry.EntryPointReqsCounter(), reqsTLSCounter: registry.EntryPointReqsTLSCounter(), reqDurationHistogram: registry.EntryPointReqDurationHistogram(), - openConnsGauge: registry.EntryPointOpenConnsGauge(), reqsBytesCounter: registry.EntryPointReqsBytesCounter(), respsBytesCounter: registry.EntryPointRespsBytesCounter(), baseLabels: []string{"entrypoint", entryPointName}, @@ -67,7 +65,6 @@ func NewRouterMiddleware(ctx context.Context, next http.Handler, registry metric reqsCounter: registry.RouterReqsCounter(), reqsTLSCounter: registry.RouterReqsTLSCounter(), reqDurationHistogram: registry.RouterReqDurationHistogram(), - openConnsGauge: registry.RouterOpenConnsGauge(), reqsBytesCounter: registry.RouterReqsBytesCounter(), respsBytesCounter: registry.RouterRespsBytesCounter(), baseLabels: []string{"router", routerName, "service", serviceName}, @@ -83,7 +80,6 @@ func NewServiceMiddleware(ctx context.Context, next http.Handler, registry metri reqsCounter: registry.ServiceReqsCounter(), reqsTLSCounter: registry.ServiceReqsTLSCounter(), reqDurationHistogram: registry.ServiceReqDurationHistogram(), - openConnsGauge: registry.ServiceOpenConnsGauge(), reqsBytesCounter: registry.ServiceReqsBytesCounter(), respsBytesCounter: registry.ServiceRespsBytesCounter(), baseLabels: []string{"service", serviceName}, @@ -112,10 +108,6 @@ func (m *metricsMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request) labels = append(labels, "method", getMethod(req)) labels = append(labels, "protocol", proto) - openConnsGauge := m.openConnsGauge.With(labels...) - openConnsGauge.Add(1) - defer openConnsGauge.Add(-1) - // TLS metrics if req.TLS != nil { var tlsLabels []string @@ -153,7 +145,7 @@ func (m *metricsMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request) labels = append(labels, "code", strconv.Itoa(code)) m.reqDurationHistogram.With(labels...).ObserveFromStart(start) - m.reqsCounter.With(labels...).Add(1) + m.reqsCounter.With(req.Header, labels...).Add(1) m.respsBytesCounter.With(labels...).Add(float64(capt.ResponseSize())) m.reqsBytesCounter.With(labels...).Add(float64(capt.RequestSize())) } diff --git a/pkg/provider/docker/config.go b/pkg/provider/docker/config.go index 3075786e7..53ff07fe1 100644 --- a/pkg/provider/docker/config.go +++ b/pkg/provider/docker/config.go @@ -75,11 +75,13 @@ func (p *Provider) buildConfiguration(ctx context.Context, containersInspected [ serviceName := getServiceName(container) model := struct { - Name string - Labels map[string]string + Name string + ContainerName string + Labels map[string]string }{ - Name: serviceName, - Labels: container.Labels, + Name: serviceName, + ContainerName: strings.TrimPrefix(container.Name, "/"), + Labels: container.Labels, } provider.BuildRouterConfiguration(ctx, confFromLabel.HTTP, serviceName, p.defaultRuleTpl, model) diff --git a/pkg/provider/kubernetes/crd/client.go b/pkg/provider/kubernetes/crd/client.go index 86c221dd3..44e0cb29c 100644 --- a/pkg/provider/kubernetes/crd/client.go +++ b/pkg/provider/kubernetes/crd/client.go @@ -11,7 +11,7 @@ import ( "github.com/rs/zerolog/log" "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/provider/kubernetes/k8s" "github.com/traefik/traefik/v3/pkg/version" corev1 "k8s.io/api/core/v1" @@ -302,11 +302,11 @@ func (c *clientWrapper) GetTraefikServices() []*v1alpha1.TraefikService { var result []*v1alpha1.TraefikService for ns, factory := range c.factoriesCrd { - ings, err := factory.Traefik().V1alpha1().TraefikServices().Lister().List(labels.Everything()) + traefikServices, err := factory.Traefik().V1alpha1().TraefikServices().Lister().List(labels.Everything()) if err != nil { log.Error().Err(err).Msgf("Failed to list Traefik services in namespace %s", ns) } - result = append(result, ings...) + result = append(result, traefikServices...) } return result @@ -319,7 +319,7 @@ func (c *clientWrapper) GetServersTransports() []*v1alpha1.ServersTransport { for ns, factory := range c.factoriesCrd { serversTransports, err := factory.Traefik().V1alpha1().ServersTransports().Lister().List(labels.Everything()) if err != nil { - log.Error().Err(err).Msgf("Failed to list servers transport in namespace %s", ns) + log.Error().Err(err).Str("namespace", ns).Msg("Failed to list servers transport in namespace") } result = append(result, serversTransports...) } @@ -334,10 +334,7 @@ func (c *clientWrapper) GetServersTransportTCPs() []*v1alpha1.ServersTransportTC for ns, factory := range c.factoriesCrd { serversTransports, err := factory.Traefik().V1alpha1().ServersTransportTCPs().Lister().List(labels.Everything()) if err != nil { - log.Error(). - Err(err). - Str("namespace", ns). - Msg("Failed to list servers transport TCP in namespace") + log.Error().Err(err).Str("namespace", ns).Msg("Failed to list servers transport TCP in namespace") } result = append(result, serversTransports...) } @@ -421,15 +418,6 @@ func (c *clientWrapper) lookupNamespace(ns string) string { return ns } -// 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) { - if kubeerror.IsNotFound(err) { - return false, nil - } - return err == nil, err -} - // isWatchedNamespace checks to ensure that the namespace is being watched before we request // it to ensure we don't panic by requesting an out-of-watch object. func (c *clientWrapper) isWatchedNamespace(ns string) bool { @@ -443,3 +431,12 @@ func (c *clientWrapper) isWatchedNamespace(ns string) bool { } return false } + +// 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) { + if kubeerror.IsNotFound(err) { + return false, nil + } + return err == nil, err +} diff --git a/pkg/provider/kubernetes/crd/client_mock_test.go b/pkg/provider/kubernetes/crd/client_mock_test.go index 9d9d0beb4..7509fc2ef 100644 --- a/pkg/provider/kubernetes/crd/client_mock_test.go +++ b/pkg/provider/kubernetes/crd/client_mock_test.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/provider/kubernetes/k8s" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" diff --git a/pkg/provider/kubernetes/crd/fixtures/services.yml b/pkg/provider/kubernetes/crd/fixtures/services.yml index 8de8ff369..818a5bd3d 100644 --- a/pkg/provider/kubernetes/crd/fixtures/services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/services.yml @@ -252,3 +252,17 @@ apiVersion: v1 metadata: name: whoami-without-endpoints-subsets namespace: default + +--- +apiVersion: v1 +kind: Service +metadata: + name: native-svc + namespace: default + +spec: + ports: + - name: web + port: 80 + type: ClusterIP + clusterIP: 10.10.0.1 diff --git a/pkg/provider/kubernetes/crd/fixtures/simple.yml b/pkg/provider/kubernetes/crd/fixtures/simple.yml index 15e20535c..36d431338 100644 --- a/pkg/provider/kubernetes/crd/fixtures/simple.yml +++ b/pkg/provider/kubernetes/crd/fixtures/simple.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/services.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/services.yml index 9b5cfd973..8c18ffdc8 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/services.yml @@ -261,3 +261,17 @@ apiVersion: v1 metadata: name: whoamitcp-without-endpoints-subsets namespace: default + +--- +apiVersion: v1 +kind: Service +metadata: + name: native-svc + namespace: default + +spec: + ports: + - name: myapp + port: 8000 + type: ClusterIP + clusterIP: 10.10.0.1 diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/simple.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/simple.yml index 141cf6cb4..170b05a09 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/simple.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/simple.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_bad_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_bad_tls_options.yml index 5bb19f259..8b44aecb3 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_bad_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_bad_tls_options.yml @@ -18,7 +18,7 @@ data: tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -49,7 +49,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_cross_namespace.yml index c7ba22f19..da7dcb4f4 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_different_services_ns.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_different_services_ns.yml index 02af98254..9d129badb 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_different_services_ns.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_different_services_ns.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_empty_services.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_empty_services.yml index cf5853736..55202d867 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_empty_services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_empty_services.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname.yml index 43226be28..34a105c34 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_with_port.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_with_port.yml index 3645601c5..f31764a3e 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_with_port.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_with_port.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_without_ports.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_without_ports.yml index 376d82469..1065d1380 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_without_ports.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_without_ports.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_ipv6.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_ipv6.yml index 777915c18..dd6f23bea 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_ipv6.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_ipv6.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware.yml index 19f83bd76..8c54dc2ef 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -9,7 +9,7 @@ spec: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -19,7 +19,7 @@ spec: sourceRange: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_crossprovider.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_crossprovider.yml index 731d8aaba..375cf7c40 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_crossprovider.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_crossprovider.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -9,7 +9,7 @@ spec: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -19,7 +19,7 @@ spec: sourceRange: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_multiple_hyphens.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_multiple_hyphens.yml index ba7aed1c0..3523c780b 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_multiple_hyphens.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_multiple_hyphens.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: multiple---hyphens @@ -9,7 +9,7 @@ spec: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_with_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_with_cross_namespace.yml index 8b631fc98..c504d8f24 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_with_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_middleware_with_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -9,7 +9,7 @@ spec: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: MiddlewareTCP metadata: name: ipallowlist @@ -19,7 +19,7 @@ spec: sourceRange: - 127.0.0.1/32 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_native_service_lb.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_native_service_lb.yml new file mode 100644 index 000000000..f95202ec0 --- /dev/null +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_native_service_lb.yml @@ -0,0 +1,16 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRouteTCP +metadata: + name: test.route + namespace: default + +spec: + entryPoints: + - foo + + routes: + - match: HostSNI(`foo.com`) + services: + - name: native-svc + port: 8000 + nativeLB: true diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_no_rule_value.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_no_rule_value.yml index e78a0bfec..2c3d57803 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_no_rule_value.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_no_rule_value.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_proxyprotocol.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_proxyprotocol.yml index 843f13a71..af9c53b9f 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_proxyprotocol.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_proxyprotocol.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport.yml index f6653146d..f0fb21f5d 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport.yml @@ -83,7 +83,7 @@ data: tls.key: VEVTVEtFWTM= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: test @@ -115,7 +115,7 @@ spec: terminationDelay: 42 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: test @@ -126,7 +126,7 @@ spec: serverName: "test" --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport_cross_namespace.yml index 7100fe95e..2f64f0e2b 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_servers_transport_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route @@ -17,7 +17,7 @@ spec: serversTransport: cross-ns-st-cross-ns@kubernetescrd --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransportTCP metadata: name: st-cross-ns diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_termination_delay.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_termination_delay.yml index 1d942ab6a..7b0076dfe 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_termination_delay.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_termination_delay.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls.yml index 17548e2b3..4bb90073a 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls.yml @@ -9,7 +9,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_acme.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_acme.yml index f7e334513..8d22a46e4 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_acme.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_acme.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options.yml index 1b45d9953..123abc113 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options.yml @@ -18,7 +18,7 @@ data: tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -47,7 +47,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_and_specific_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_and_specific_namespace.yml index 27e34fcaf..0861644d0 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_and_specific_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_and_specific_namespace.yml @@ -18,7 +18,7 @@ data: tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -48,7 +48,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_cross_namespace.yml index 13958f95d..2d6687e5c 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_options_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route @@ -20,7 +20,7 @@ spec: namespace: cross-ns --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: tls-options-cn diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_passthrough.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_passthrough.yml index 5cfac32f5..4f84b0280 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_passthrough.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_passthrough.yml @@ -9,7 +9,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_store.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_store.yml index 24894e300..16918e314 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_store.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_store.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -20,7 +20,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_identical_rules.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_identical_rules.yml index b6e6108cd..99aabf28b 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_identical_rules.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_identical_rules.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_rules.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_rules.yml index dd068d0c3..3b148ec31 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_rules.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_rules.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_services.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_services.yml index 73f60f037..d45527039 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_two_services.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options.yml index 5798a0719..3df4fdae3 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options.yml @@ -1,5 +1,5 @@ --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -9,7 +9,7 @@ spec: minVersion: VersionTLS12 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options_namespace.yml index ed34abdf6..6a9eb2ecd 100644 --- a/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/tcp/with_unknown_tls_options_namespace.yml @@ -1,5 +1,5 @@ --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -9,7 +9,7 @@ spec: minVersion: VersionTLS12 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteTCP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/services.yml b/pkg/provider/kubernetes/crd/fixtures/udp/services.yml index d58973c82..adaa7272e 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/services.yml @@ -220,3 +220,17 @@ apiVersion: v1 metadata: name: whoamiudp-without-endpoints-subsets namespace: default + +--- +apiVersion: v1 +kind: Service +metadata: + name: native-svc + namespace: default + +spec: + ports: + - name: myapp + port: 8000 + type: ClusterIP + clusterIP: 10.10.0.1 diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/simple.yml b/pkg/provider/kubernetes/crd/fixtures/udp/simple.yml index f514d78a5..60da5fa88 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/simple.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/simple.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_cross_namespace.yml index 8df091d70..5b54397d7 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_different_services_ns.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_different_services_ns.yml index d5c6cc728..c6518c62c 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_different_services_ns.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_different_services_ns.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_empty_services.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_empty_services.yml index 98aeb2bd6..dc588d5e9 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_empty_services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_empty_services.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname.yml index 14c3ab658..dbd919422 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_service.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_service.yml index 962178ed5..302332c0c 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_service.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_service.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_with_port.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_with_port.yml index 962178ed5..302332c0c 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_with_port.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_with_port.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_without_ports.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_without_ports.yml index 6478e6aa4..2a30279bb 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_without_ports.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_without_ports.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_ipv6.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_ipv6.yml index 2acc8bdc7..dfdbe512f 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_ipv6.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_ipv6.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_native_service_lb.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_native_service_lb.yml new file mode 100644 index 000000000..6942f106b --- /dev/null +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_native_service_lb.yml @@ -0,0 +1,15 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRouteUDP +metadata: + name: test.route + namespace: default + +spec: + entryPoints: + - foo + + routes: + - services: + - name: native-svc + port: 8000 + nativeLB: true diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_two_routes.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_two_routes.yml index 9abffc0d8..762a17178 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_two_routes.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_two_routes.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/udp/with_two_services.yml b/pkg/provider/kubernetes/crd/fixtures/udp/with_two_services.yml index 46bae5d8c..0cee38f9e 100644 --- a/pkg/provider/kubernetes/crd/fixtures/udp/with_two_services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/udp/with_two_services.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRouteUDP metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_auth.yml b/pkg/provider/kubernetes/crd/fixtures/with_auth.yml index b03b82b64..6da695b12 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_auth.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_auth.yml @@ -30,7 +30,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: basicauth @@ -41,7 +41,7 @@ spec: secret: authsecret --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: digestauth @@ -51,7 +51,7 @@ spec: digestAuth: secret: authsecret --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: forwardauth diff --git a/pkg/provider/kubernetes/crd/fixtures/with_bad_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/with_bad_tls_options.yml index 2df4c3a67..2dd766bfe 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_bad_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_bad_tls_options.yml @@ -18,7 +18,7 @@ data: tls.ca: --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -38,7 +38,7 @@ spec: clientAuthType: VerifyClientCertIfGiven --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_cross_namespace.yml index 543c5696c..e66307a71 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: cross-ns-route @@ -36,7 +36,7 @@ spec: serversTransport: foo-test@kubernetescrd --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: tr-svc-wrr1 @@ -51,7 +51,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: tr-svc-wrr2 @@ -65,7 +65,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: tr-svc-mirror1 @@ -82,7 +82,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: tr-svc-mirror2 @@ -99,7 +99,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: test diff --git a/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options.yml index 3646d9522..494fb2369 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options.yml @@ -18,7 +18,7 @@ data: tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -37,7 +37,7 @@ spec: clientAuthType: VerifyClientCertIfGiven --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options_default_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options_default_namespace.yml index 49e128983..ec84b589d 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options_default_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_default_tls_options_default_namespace.yml @@ -18,7 +18,7 @@ data: tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: default @@ -37,7 +37,7 @@ spec: clientAuthType: VerifyClientCertIfGiven --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_default_tls_store.yml b/pkg/provider/kubernetes/crd/fixtures/with_default_tls_store.yml index 07f1f982c..36de8bd50 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_default_tls_store.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_default_tls_store.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -20,7 +20,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_empty_services.yml b/pkg/provider/kubernetes/crd/fixtures/with_empty_services.yml index f6ebb84c0..b3ff215d1 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_empty_services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_empty_services.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_empty_services_ts.yml b/pkg/provider/kubernetes/crd/fixtures/with_empty_services_ts.yml index 92500f3fd..bc4f9626c 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_empty_services_ts.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_empty_services_ts.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route @@ -21,7 +21,7 @@ spec: - name: test-errorpage --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: test-weighted @@ -35,7 +35,7 @@ spec: port: 80 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: test-mirror @@ -52,7 +52,7 @@ spec: kind: TraefikService --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-errorpage diff --git a/pkg/provider/kubernetes/crd/fixtures/with_error_page.yml b/pkg/provider/kubernetes/crd/fixtures/with_error_page.yml index 3eea37acd..e352d596b 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_error_page.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_error_page.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: errorpage diff --git a/pkg/provider/kubernetes/crd/fixtures/with_externalname.yml b/pkg/provider/kubernetes/crd/fixtures/with_externalname.yml index b70ec012e..8a1426211 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_externalname.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_externalname.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_http.yml b/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_http.yml index 1f3e3a3f7..af1c37d38 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_http.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_http.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_https.yml b/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_https.yml index 21c39a1c3..51a7bb3e2 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_https.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_externalname_with_https.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_externalname_without_ports.yml b/pkg/provider/kubernetes/crd/fixtures/with_externalname_without_ports.yml index 25f230574..15b45c3df 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_externalname_without_ports.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_externalname_without_ports.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_https_default.yml b/pkg/provider/kubernetes/crd/fixtures/with_https_default.yml index c022a6cde..2df7e0079 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_https_default.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_https_default.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_https_scheme.yml b/pkg/provider/kubernetes/crd/fixtures/with_https_scheme.yml index 4a9bb8b46..1a0ff7d77 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_https_scheme.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_https_scheme.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_ipv6.yml b/pkg/provider/kubernetes/crd/fixtures/with_ipv6.yml index 23af879ac..27a67bc4a 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_ipv6.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_ipv6.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_middleware.yml b/pkg/provider/kubernetes/crd/fixtures/with_middleware.yml index 45b2dcd49..3837a507b 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_middleware.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_middleware.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -10,7 +10,7 @@ spec: - /tobestripped --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: ratelimit @@ -28,7 +28,7 @@ spec: - 192.168.1.7 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: addprefix @@ -39,7 +39,7 @@ spec: prefix: /tobeadded --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test2.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_middleware_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_middleware_cross_namespace.yml index 25a2ac448..3c1e89956 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_middleware_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_middleware_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test-crossnamespace.route @@ -39,7 +39,7 @@ spec: - name: cross-ns-stripprefix@kubernetescrd --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -51,7 +51,7 @@ spec: - /stripit --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-errorpage diff --git a/pkg/provider/kubernetes/crd/fixtures/with_middleware_crossprovider.yml b/pkg/provider/kubernetes/crd/fixtures/with_middleware_crossprovider.yml index 915000329..0607ea066 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_middleware_crossprovider.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_middleware_crossprovider.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: stripprefix @@ -10,7 +10,7 @@ spec: - /tobestripped --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: addprefix @@ -21,7 +21,7 @@ spec: prefix: /tobeadded --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test2.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_middleware_multiple_hyphens.yml b/pkg/provider/kubernetes/crd/fixtures/with_middleware_multiple_hyphens.yml index cee835136..648137c6e 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_middleware_multiple_hyphens.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_middleware_multiple_hyphens.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: multiple---hyphens @@ -10,7 +10,7 @@ spec: - /tobestripped --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test2.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_mirroring.yml b/pkg/provider/kubernetes/crd/fixtures/with_mirroring.yml index 7a9fb49c9..a1ead36d8 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_mirroring.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_mirroring.yml @@ -59,7 +59,7 @@ spec: task: whoami5 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -77,7 +77,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_mirroring2.yml b/pkg/provider/kubernetes/crd/fixtures/with_mirroring2.yml index b43b33c1c..5f498a296 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_mirroring2.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_mirroring2.yml @@ -59,7 +59,7 @@ spec: task: whoami5 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -73,7 +73,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -87,7 +87,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -103,7 +103,7 @@ spec: percent: 30 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_namespaces.yml b/pkg/provider/kubernetes/crd/fixtures/with_namespaces.yml index 9bdf1a004..d8d4867e9 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_namespaces.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_namespaces.yml @@ -89,7 +89,7 @@ spec: task: whoami4 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -111,7 +111,7 @@ spec: namespace: bar --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -126,7 +126,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror2 @@ -150,7 +150,7 @@ spec: namespace: foo --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror3 @@ -176,7 +176,7 @@ spec: --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror4 @@ -200,7 +200,7 @@ spec: namespace: foo --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirrored @@ -218,7 +218,7 @@ spec: namespace: foo --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -239,7 +239,7 @@ spec: namespace: bar --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_native_service_lb.yml b/pkg/provider/kubernetes/crd/fixtures/with_native_service_lb.yml new file mode 100644 index 000000000..259ea216c --- /dev/null +++ b/pkg/provider/kubernetes/crd/fixtures/with_native_service_lb.yml @@ -0,0 +1,17 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: test.route + namespace: default + +spec: + entryPoints: + - foo + + routes: + - match: Host(`foo.com`) + kind: Rule + services: + - name: native-svc + port: 80 + nativeLB: true diff --git a/pkg/provider/kubernetes/crd/fixtures/with_no_rule_value.yml b/pkg/provider/kubernetes/crd/fixtures/with_no_rule_value.yml index 35a2df6d3..a1f3ed335 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_no_rule_value.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_no_rule_value.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_options.yml b/pkg/provider/kubernetes/crd/fixtures/with_options.yml index 1c945829d..281975a71 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_options.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_plugin_deep_read_secret.yml b/pkg/provider/kubernetes/crd/fixtures/with_plugin_deep_read_secret.yml index f99bde07c..fcd10d6bd 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_plugin_deep_read_secret.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_plugin_deep_read_secret.yml @@ -8,7 +8,7 @@ data: key: dGhpc19pc190aGVfdmVyeV9kZWVwX3NlY3JldA== --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-secret diff --git a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_map_contain_secret.yml b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_map_contain_secret.yml index 36042fe57..c45873cbf 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_map_contain_secret.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_map_contain_secret.yml @@ -9,7 +9,7 @@ data: key2: dXNlcl9wYXNzd29yZA== --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-secret diff --git a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_secret.yml b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_secret.yml index 7b88c1c42..7544b2e6d 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_secret.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_secret.yml @@ -9,7 +9,7 @@ data: key2: c2VjcmV0X2RhdGEy --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-secret diff --git a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_not_exist_secret.yml b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_not_exist_secret.yml index c9923d1d8..8430ca600 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_not_exist_secret.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_not_exist_secret.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-secret diff --git a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_secret.yml b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_secret.yml index bcd368619..e7f9a70dd 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_secret.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_plugin_read_secret.yml @@ -8,7 +8,7 @@ data: key: dGhpc19pc190aGVfc2VjcmV0 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: test-secret diff --git a/pkg/provider/kubernetes/crd/fixtures/with_servers_transport.yml b/pkg/provider/kubernetes/crd/fixtures/with_servers_transport.yml index fdbf7b930..8515039f4 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_servers_transport.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_servers_transport.yml @@ -83,7 +83,7 @@ data: tls.key: VEVTVEtFWTM= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: test @@ -119,7 +119,7 @@ spec: trustDomain: spiffe://lol --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: test @@ -129,7 +129,7 @@ spec: serverName: "test" --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_servers_transport_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_servers_transport_cross_namespace.yml index 7b9ab8891..7aa2e6fb3 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_servers_transport_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_servers_transport_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route @@ -18,7 +18,7 @@ spec: serversTransport: cross-ns-st-cross-ns@kubernetescrd --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: st-cross-ns diff --git a/pkg/provider/kubernetes/crd/fixtures/with_services_lb0.yml b/pkg/provider/kubernetes/crd/fixtures/with_services_lb0.yml index 7a1456498..d4f7b7d94 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_services_lb0.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_services_lb0.yml @@ -29,7 +29,7 @@ spec: task: whoami5 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -44,7 +44,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_services_lb1.yml b/pkg/provider/kubernetes/crd/fixtures/with_services_lb1.yml index 078b261dc..d863c3f1f 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_services_lb1.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_services_lb1.yml @@ -119,7 +119,7 @@ spec: task: whoami7 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -136,7 +136,7 @@ spec: weight: 1 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -153,7 +153,7 @@ spec: weight: 1 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_services_lb2.yml b/pkg/provider/kubernetes/crd/fixtures/with_services_lb2.yml index 4d99705e9..c1732c18b 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_services_lb2.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_services_lb2.yml @@ -14,7 +14,7 @@ subsets: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -43,7 +43,7 @@ spec: task: whoami5 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -60,7 +60,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_services_lb3.yml b/pkg/provider/kubernetes/crd/fixtures/with_services_lb3.yml index 939cf7c7b..8b15d9fd9 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_services_lb3.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_services_lb3.yml @@ -59,7 +59,7 @@ spec: task: whoami4 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr2 @@ -73,7 +73,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: mirror1 @@ -89,7 +89,7 @@ spec: port: 8080 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 @@ -109,7 +109,7 @@ spec: weight: 1 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_services_only.yml b/pkg/provider/kubernetes/crd/fixtures/with_services_only.yml index 9dabe6147..c98462ee9 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_services_only.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_services_only.yml @@ -29,7 +29,7 @@ spec: task: whoami5 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: wrr1 diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls.yml index 8f78a318d..224164d36 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls.yml @@ -9,7 +9,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls_acme.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls_acme.yml index 170c7a94d..22ef09000 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls_acme.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls_acme.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls_options.yml index f49aab66e..f4bb0850a 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls_options.yml @@ -18,7 +18,7 @@ data: ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -37,7 +37,7 @@ spec: clientAuthType: VerifyClientCertIfGiven --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls_options_and_specific_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls_options_and_specific_namespace.yml index eec9d6fd1..976cd8821 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls_options_and_specific_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls_options_and_specific_namespace.yml @@ -18,7 +18,7 @@ data: tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -37,7 +37,7 @@ spec: clientAuthType: VerifyClientCertIfGiven --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls_options_cross_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls_options_cross_namespace.yml index 57228278b..ac8a90297 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls_options_cross_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls_options_cross_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route @@ -21,7 +21,7 @@ spec: namespace: cross-ns --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: tls-options-cn diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls_store.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls_store.yml index ba1acc4cd..84a892fee 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls_store.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls_store.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -20,7 +20,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_tls_store_certificates.yml b/pkg/provider/kubernetes/crd/fixtures/with_tls_store_certificates.yml index 2691ac79b..01127dcd1 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_tls_store_certificates.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_tls_store_certificates.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSStore metadata: name: default @@ -20,7 +20,7 @@ data: tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_two_rules.yml b/pkg/provider/kubernetes/crd/fixtures/with_two_rules.yml index f307b797d..a3ea7a5d1 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_two_rules.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_two_rules.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_two_services.yml b/pkg/provider/kubernetes/crd/fixtures/with_two_services.yml index 8a6a17e24..4a971280a 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_two_services.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_two_services.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_two_services_weight.yml b/pkg/provider/kubernetes/crd/fixtures/with_two_services_weight.yml index 76a5c7c3e..e9bb74c21 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_two_services_weight.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_two_services_weight.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options.yml b/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options.yml index 543851e37..8f4a0d0c8 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -8,7 +8,7 @@ spec: minVersion: VersionTLS12 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options_namespace.yml b/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options_namespace.yml index 133561482..2ebfc2e62 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options_namespace.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_unknown_tls_options_namespace.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: TLSOption metadata: name: foo @@ -8,7 +8,7 @@ spec: minVersion: VersionTLS12 --- -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/fixtures/with_wrong_rule_kind.yml b/pkg/provider/kubernetes/crd/fixtures/with_wrong_rule_kind.yml index 6c649295a..1cb62e1a9 100644 --- a/pkg/provider/kubernetes/crd/fixtures/with_wrong_rule_kind.yml +++ b/pkg/provider/kubernetes/crd/fixtures/with_wrong_rule_kind.yml @@ -1,4 +1,4 @@ -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: test.route diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/clientset.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/clientset.go index 09d251ad9..ec71200a7 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/clientset.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/clientset.go @@ -29,7 +29,7 @@ package versioned import ( "fmt" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1" + traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/clientset_generated.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/clientset_generated.go index e7c34c51a..55b5edcb2 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/clientset_generated.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/clientset_generated.go @@ -28,8 +28,8 @@ package fake import ( clientset "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1" - faketraefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake" + traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1" + faketraefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/register.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/register.go index 8e0489128..c25b16318 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/register.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake/register.go @@ -27,7 +27,7 @@ THE SOFTWARE. package fake import ( - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme/register.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme/register.go index 3aab7e690..cb048b154 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme/register.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme/register.go @@ -27,7 +27,7 @@ THE SOFTWARE. package scheme import ( - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/doc.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/doc.go similarity index 100% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/doc.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/doc.go diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/doc.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/doc.go similarity index 100% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/doc.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/doc.go diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressroute.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroute.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressroute.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroute.go index c3daac5d0..b01905713 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressroute.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroute.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeIngressRoutes struct { ns string } -var ingressroutesResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "ingressroutes"} +var ingressroutesResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "ingressroutes"} -var ingressroutesKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "IngressRoute"} +var ingressroutesKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "IngressRoute"} // Get takes name of the ingressRoute, and returns the corresponding ingressRoute object, and an error if there is any. func (c *FakeIngressRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRoute, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressroutetcp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroutetcp.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressroutetcp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroutetcp.go index d2d8299a4..394b1ff55 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressroutetcp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroutetcp.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeIngressRouteTCPs struct { ns string } -var ingressroutetcpsResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "ingressroutetcps"} +var ingressroutetcpsResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "ingressroutetcps"} -var ingressroutetcpsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "IngressRouteTCP"} +var ingressroutetcpsKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "IngressRouteTCP"} // Get takes name of the ingressRouteTCP, and returns the corresponding ingressRouteTCP object, and an error if there is any. func (c *FakeIngressRouteTCPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRouteTCP, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressrouteudp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressrouteudp.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressrouteudp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressrouteudp.go index 6f9f41303..f67d889de 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_ingressrouteudp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressrouteudp.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeIngressRouteUDPs struct { ns string } -var ingressrouteudpsResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "ingressrouteudps"} +var ingressrouteudpsResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "ingressrouteudps"} -var ingressrouteudpsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "IngressRouteUDP"} +var ingressrouteudpsKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "IngressRouteUDP"} // Get takes name of the ingressRouteUDP, and returns the corresponding ingressRouteUDP object, and an error if there is any. func (c *FakeIngressRouteUDPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRouteUDP, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_middleware.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middleware.go similarity index 96% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_middleware.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middleware.go index 3f8dac618..efef604fd 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_middleware.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middleware.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeMiddlewares struct { ns string } -var middlewaresResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "middlewares"} +var middlewaresResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "middlewares"} -var middlewaresKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "Middleware"} +var middlewaresKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "Middleware"} // Get takes name of the middleware, and returns the corresponding middleware object, and an error if there is any. func (c *FakeMiddlewares) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Middleware, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_middlewaretcp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middlewaretcp.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_middlewaretcp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middlewaretcp.go index b4f7586ac..767405b0e 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_middlewaretcp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middlewaretcp.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeMiddlewareTCPs struct { ns string } -var middlewaretcpsResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "middlewaretcps"} +var middlewaretcpsResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "middlewaretcps"} -var middlewaretcpsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "MiddlewareTCP"} +var middlewaretcpsKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "MiddlewareTCP"} // Get takes name of the middlewareTCP, and returns the corresponding middlewareTCP object, and an error if there is any. func (c *FakeMiddlewareTCPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MiddlewareTCP, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_serverstransport.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_serverstransport.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_serverstransport.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_serverstransport.go index 293ddfeec..3666bb4a5 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_serverstransport.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_serverstransport.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeServersTransports struct { ns string } -var serverstransportsResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "serverstransports"} +var serverstransportsResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "serverstransports"} -var serverstransportsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "ServersTransport"} +var serverstransportsKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "ServersTransport"} // Get takes name of the serversTransport, and returns the corresponding serversTransport object, and an error if there is any. func (c *FakeServersTransports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ServersTransport, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_serverstransporttcp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_serverstransporttcp.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_serverstransporttcp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_serverstransporttcp.go index e26cec68f..e18ae4db1 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_serverstransporttcp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_serverstransporttcp.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeServersTransportTCPs struct { ns string } -var serverstransporttcpsResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "serverstransporttcps"} +var serverstransporttcpsResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "serverstransporttcps"} -var serverstransporttcpsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "ServersTransportTCP"} +var serverstransporttcpsKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "ServersTransportTCP"} // Get takes name of the serversTransportTCP, and returns the corresponding serversTransportTCP object, and an error if there is any. func (c *FakeServersTransportTCPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ServersTransportTCP, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_tlsoption.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_tlsoption.go similarity index 96% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_tlsoption.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_tlsoption.go index 5e44da0ac..182812ff9 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_tlsoption.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_tlsoption.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeTLSOptions struct { ns string } -var tlsoptionsResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "tlsoptions"} +var tlsoptionsResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "tlsoptions"} -var tlsoptionsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TLSOption"} +var tlsoptionsKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "TLSOption"} // Get takes name of the tLSOption, and returns the corresponding tLSOption object, and an error if there is any. func (c *FakeTLSOptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TLSOption, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_tlsstore.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_tlsstore.go similarity index 96% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_tlsstore.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_tlsstore.go index 3da87fb3c..09bd1f827 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_tlsstore.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_tlsstore.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeTLSStores struct { ns string } -var tlsstoresResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "tlsstores"} +var tlsstoresResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "tlsstores"} -var tlsstoresKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TLSStore"} +var tlsstoresKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "TLSStore"} // Get takes name of the tLSStore, and returns the corresponding tLSStore object, and an error if there is any. func (c *FakeTLSStores) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TLSStore, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefik_client.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_traefikio_client.go similarity index 98% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefik_client.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_traefikio_client.go index 8f6bae75e..6e6ca7d86 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefik_client.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_traefikio_client.go @@ -27,7 +27,7 @@ THE SOFTWARE. package fake import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_traefikservice.go similarity index 97% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_traefikservice.go index 061fe4dad..ef3cf30f3 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_traefikservice.go @@ -29,7 +29,7 @@ package fake import ( "context" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -44,9 +44,9 @@ type FakeTraefikServices struct { ns string } -var traefikservicesResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "traefikservices"} +var traefikservicesResource = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "traefikservices"} -var traefikservicesKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TraefikService"} +var traefikservicesKind = schema.GroupVersionKind{Group: "traefik.io", Version: "v1alpha1", Kind: "TraefikService"} // Get takes name of the traefikService, and returns the corresponding traefikService object, and an error if there is any. func (c *FakeTraefikServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) { diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/generated_expansion.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/generated_expansion.go similarity index 100% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/generated_expansion.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/generated_expansion.go diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressroute.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressroute.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressroute.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressroute.go index 6f097d9ba..6ec921760 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressroute.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressroute.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressroutetcp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressroutetcp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressroutetcp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressroutetcp.go index 9ef0c9772..93caa16aa 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressroutetcp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressroutetcp.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressrouteudp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressrouteudp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressrouteudp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressrouteudp.go index d2563bcb6..74dab24ac 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/ingressrouteudp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/ingressrouteudp.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/middleware.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/middleware.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/middleware.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/middleware.go index a40141761..615f8d200 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/middleware.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/middleware.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/middlewaretcp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/middlewaretcp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/middlewaretcp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/middlewaretcp.go index 7b751862b..ca4c596f9 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/middlewaretcp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/middlewaretcp.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/serverstransport.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/serverstransport.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/serverstransport.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/serverstransport.go index fa8883aba..cc1b467fa 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/serverstransport.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/serverstransport.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/serverstransporttcp.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/serverstransporttcp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/serverstransporttcp.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/serverstransporttcp.go index d6c01c365..ba1c1bd07 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/serverstransporttcp.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/serverstransporttcp.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/tlsoption.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/tlsoption.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/tlsoption.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/tlsoption.go index b9848f430..24ba147f1 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/tlsoption.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/tlsoption.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/tlsstore.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/tlsstore.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/tlsstore.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/tlsstore.go index 1c0e1a23a..1f66fb482 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/tlsstore.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/tlsstore.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/traefik_client.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/traefikio_client.go similarity index 98% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/traefik_client.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/traefikio_client.go index 862a167c7..6de07c33c 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/traefik_client.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/traefikio_client.go @@ -28,7 +28,7 @@ package v1alpha1 import ( "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" rest "k8s.io/client-go/rest" ) @@ -46,7 +46,7 @@ type TraefikV1alpha1Interface interface { TraefikServicesGetter } -// TraefikV1alpha1Client is used to interact with features provided by the traefik.containo.us group. +// TraefikV1alpha1Client is used to interact with features provided by the traefik.io group. type TraefikV1alpha1Client struct { restClient rest.Interface } diff --git a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/traefikservice.go b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/traefikservice.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/traefikservice.go rename to pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/traefikservice.go index 89f3954b2..e83889472 100644 --- a/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefik/v1alpha1/traefikservice.go +++ b/pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/traefikservice.go @@ -31,7 +31,7 @@ import ( "time" scheme "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/factory.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/factory.go index a4f4cc5a9..75b79d658 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/factory.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/factory.go @@ -33,7 +33,7 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - traefik "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik" + traefikio "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -180,9 +180,9 @@ type SharedInformerFactory interface { ForResource(resource schema.GroupVersionResource) (GenericInformer, error) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - Traefik() traefik.Interface + Traefik() traefikio.Interface } -func (f *sharedInformerFactory) Traefik() traefik.Interface { - return traefik.New(f, f.namespace, f.tweakListOptions) +func (f *sharedInformerFactory) Traefik() traefikio.Interface { + return traefikio.New(f, f.namespace, f.tweakListOptions) } diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/generic.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/generic.go index ba1fa583a..93ba25251 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/generic.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/generic.go @@ -29,7 +29,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -60,7 +60,7 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=traefik.containo.us, Version=v1alpha1 + // Group=traefik.io, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("ingressroutes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Traefik().V1alpha1().IngressRoutes().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("ingressroutetcps"): diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/interface.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/interface.go similarity index 96% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/interface.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/interface.go index a58492577..22009c56e 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/interface.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/interface.go @@ -24,11 +24,11 @@ THE SOFTWARE. // Code generated by informer-gen. DO NOT EDIT. -package traefik +package traefikio import ( internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1" ) // Interface provides access to each of this group's versions. diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressroute.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressroute.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressroute.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressroute.go index 4da1e53c8..c2293518f 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressroute.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressroute.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredIngressRouteInformer(client versioned.Interface, namespace strin return client.TraefikV1alpha1().IngressRoutes(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.IngressRoute{}, + &traefikiov1alpha1.IngressRoute{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *ingressRouteInformer) defaultInformer(client versioned.Interface, resyn } func (f *ingressRouteInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.IngressRoute{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.IngressRoute{}, f.defaultInformer) } func (f *ingressRouteInformer) Lister() v1alpha1.IngressRouteLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressroutetcp.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressroutetcp.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressroutetcp.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressroutetcp.go index 9a1f0c8e4..0ed00501a 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressroutetcp.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressroutetcp.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredIngressRouteTCPInformer(client versioned.Interface, namespace st return client.TraefikV1alpha1().IngressRouteTCPs(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.IngressRouteTCP{}, + &traefikiov1alpha1.IngressRouteTCP{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *ingressRouteTCPInformer) defaultInformer(client versioned.Interface, re } func (f *ingressRouteTCPInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.IngressRouteTCP{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.IngressRouteTCP{}, f.defaultInformer) } func (f *ingressRouteTCPInformer) Lister() v1alpha1.IngressRouteTCPLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressrouteudp.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressrouteudp.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressrouteudp.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressrouteudp.go index 31798dfc6..68787c969 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/ingressrouteudp.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/ingressrouteudp.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredIngressRouteUDPInformer(client versioned.Interface, namespace st return client.TraefikV1alpha1().IngressRouteUDPs(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.IngressRouteUDP{}, + &traefikiov1alpha1.IngressRouteUDP{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *ingressRouteUDPInformer) defaultInformer(client versioned.Interface, re } func (f *ingressRouteUDPInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.IngressRouteUDP{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.IngressRouteUDP{}, f.defaultInformer) } func (f *ingressRouteUDPInformer) Lister() v1alpha1.IngressRouteUDPLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/interface.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/interface.go similarity index 100% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/interface.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/interface.go diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/middleware.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/middleware.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/middleware.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/middleware.go index fa9ff771c..9a00c146b 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/middleware.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/middleware.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredMiddlewareInformer(client versioned.Interface, namespace string, return client.TraefikV1alpha1().Middlewares(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.Middleware{}, + &traefikiov1alpha1.Middleware{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *middlewareInformer) defaultInformer(client versioned.Interface, resyncP } func (f *middlewareInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.Middleware{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.Middleware{}, f.defaultInformer) } func (f *middlewareInformer) Lister() v1alpha1.MiddlewareLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/middlewaretcp.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/middlewaretcp.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/middlewaretcp.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/middlewaretcp.go index 2bd54d23a..8b547fc45 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/middlewaretcp.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/middlewaretcp.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredMiddlewareTCPInformer(client versioned.Interface, namespace stri return client.TraefikV1alpha1().MiddlewareTCPs(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.MiddlewareTCP{}, + &traefikiov1alpha1.MiddlewareTCP{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *middlewareTCPInformer) defaultInformer(client versioned.Interface, resy } func (f *middlewareTCPInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.MiddlewareTCP{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.MiddlewareTCP{}, f.defaultInformer) } func (f *middlewareTCPInformer) Lister() v1alpha1.MiddlewareTCPLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/serverstransport.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/serverstransport.go similarity index 93% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/serverstransport.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/serverstransport.go index 22f9607f3..cd76b4457 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/serverstransport.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/serverstransport.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredServersTransportInformer(client versioned.Interface, namespace s return client.TraefikV1alpha1().ServersTransports(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.ServersTransport{}, + &traefikiov1alpha1.ServersTransport{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *serversTransportInformer) defaultInformer(client versioned.Interface, r } func (f *serversTransportInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.ServersTransport{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.ServersTransport{}, f.defaultInformer) } func (f *serversTransportInformer) Lister() v1alpha1.ServersTransportLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/serverstransporttcp.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/serverstransporttcp.go similarity index 93% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/serverstransporttcp.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/serverstransporttcp.go index 7b07e2ba5..467e2fad1 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/serverstransporttcp.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/serverstransporttcp.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredServersTransportTCPInformer(client versioned.Interface, namespac return client.TraefikV1alpha1().ServersTransportTCPs(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.ServersTransportTCP{}, + &traefikiov1alpha1.ServersTransportTCP{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *serversTransportTCPInformer) defaultInformer(client versioned.Interface } func (f *serversTransportTCPInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.ServersTransportTCP{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.ServersTransportTCP{}, f.defaultInformer) } func (f *serversTransportTCPInformer) Lister() v1alpha1.ServersTransportTCPLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/tlsoption.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/tlsoption.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/tlsoption.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/tlsoption.go index d31a6959c..34336133b 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/tlsoption.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/tlsoption.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredTLSOptionInformer(client versioned.Interface, namespace string, return client.TraefikV1alpha1().TLSOptions(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.TLSOption{}, + &traefikiov1alpha1.TLSOption{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *tLSOptionInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *tLSOptionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.TLSOption{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.TLSOption{}, f.defaultInformer) } func (f *tLSOptionInformer) Lister() v1alpha1.TLSOptionLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/tlsstore.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/tlsstore.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/tlsstore.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/tlsstore.go index 783f459c9..56314fa20 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/tlsstore.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/tlsstore.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredTLSStoreInformer(client versioned.Interface, namespace string, r return client.TraefikV1alpha1().TLSStores(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.TLSStore{}, + &traefikiov1alpha1.TLSStore{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *tLSStoreInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *tLSStoreInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.TLSStore{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.TLSStore{}, f.defaultInformer) } func (f *tLSStoreInformer) Lister() v1alpha1.TLSStoreLister { diff --git a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/traefikservice.go b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/traefikservice.go similarity index 94% rename from pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/traefikservice.go rename to pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/traefikservice.go index bc1390d52..59dd21c71 100644 --- a/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefik/v1alpha1/traefikservice.go +++ b/pkg/provider/kubernetes/crd/generated/informers/externalversions/traefikio/v1alpha1/traefikservice.go @@ -32,8 +32,8 @@ import ( versioned "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned" internalinterfaces "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1" + traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -79,7 +79,7 @@ func NewFilteredTraefikServiceInformer(client versioned.Interface, namespace str return client.TraefikV1alpha1().TraefikServices(namespace).Watch(context.TODO(), options) }, }, - &traefikv1alpha1.TraefikService{}, + &traefikiov1alpha1.TraefikService{}, resyncPeriod, indexers, ) @@ -90,7 +90,7 @@ func (f *traefikServiceInformer) defaultInformer(client versioned.Interface, res } func (f *traefikServiceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&traefikv1alpha1.TraefikService{}, f.defaultInformer) + return f.factory.InformerFor(&traefikiov1alpha1.TraefikService{}, f.defaultInformer) } func (f *traefikServiceInformer) Lister() v1alpha1.TraefikServiceLister { diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/expansion_generated.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/expansion_generated.go similarity index 100% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/expansion_generated.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/expansion_generated.go diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressroute.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressroute.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressroute.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressroute.go index 78093fe16..dbbcd28fe 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressroute.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressroute.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressroutetcp.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressroutetcp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressroutetcp.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressroutetcp.go index aada15c84..63ffc06b1 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressroutetcp.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressroutetcp.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressrouteudp.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressrouteudp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressrouteudp.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressrouteudp.go index 5e00c0942..7156f8bf9 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/ingressrouteudp.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/ingressrouteudp.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/middleware.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/middleware.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/middleware.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/middleware.go index f227ea242..c69ef6bea 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/middleware.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/middleware.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/middlewaretcp.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/middlewaretcp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/middlewaretcp.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/middlewaretcp.go index 4a4fa3ab0..388537233 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/middlewaretcp.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/middlewaretcp.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/serverstransport.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/serverstransport.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/serverstransport.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/serverstransport.go index 0f9930787..2532091fa 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/serverstransport.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/serverstransport.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/serverstransporttcp.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/serverstransporttcp.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/serverstransporttcp.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/serverstransporttcp.go index 3bc63b329..2b2354e1a 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/serverstransporttcp.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/serverstransporttcp.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/tlsoption.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/tlsoption.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/tlsoption.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/tlsoption.go index 8a52c79df..520c95da1 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/tlsoption.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/tlsoption.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/tlsstore.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/tlsstore.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/tlsstore.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/tlsstore.go index 673a690ba..9687ba492 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/tlsstore.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/tlsstore.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/traefikservice.go b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/traefikservice.go similarity index 99% rename from pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/traefikservice.go rename to pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/traefikservice.go index e9636e46c..cb4331c10 100644 --- a/pkg/provider/kubernetes/crd/generated/listers/traefik/v1alpha1/traefikservice.go +++ b/pkg/provider/kubernetes/crd/generated/listers/traefikio/v1alpha1/traefikservice.go @@ -27,7 +27,7 @@ THE SOFTWARE. package v1alpha1 import ( - v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + v1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/provider/kubernetes/crd/kubernetes.go b/pkg/provider/kubernetes/crd/kubernetes.go index 8e594e8ae..0cc0649cc 100644 --- a/pkg/provider/kubernetes/crd/kubernetes.go +++ b/pkg/provider/kubernetes/crd/kubernetes.go @@ -10,8 +10,10 @@ import ( "encoding/json" "errors" "fmt" + "net" "os" "sort" + "strconv" "strings" "time" @@ -23,7 +25,7 @@ import ( "github.com/traefik/traefik/v3/pkg/job" "github.com/traefik/traefik/v3/pkg/logs" "github.com/traefik/traefik/v3/pkg/provider" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/safe" "github.com/traefik/traefik/v3/pkg/tls" "github.com/traefik/traefik/v3/pkg/types" @@ -102,6 +104,8 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe. logger := log.With().Str(logs.ProviderName, providerName).Logger() ctxLog := logger.WithContext(context.Background()) + logger.Warn().Msg("CRDs API Version \"traefik.io/v1alpha1\" will not be supported in Traefik v3 itself. However, an automatic migration path to the next version will be available.") + k8sClient, err := p.newK8sClient(ctxLog) if err != nil { return err @@ -473,6 +477,7 @@ func (p *Provider) loadConfigurationFromCRD(ctx context.Context, client Client) return conf } +// getServicePort always returns a valid port, an error otherwise. func getServicePort(svc *corev1.Service, port intstr.IntOrString) (*corev1.ServicePort, error) { if svc == nil { return nil, errors.New("service is not defined") @@ -505,6 +510,18 @@ func getServicePort(svc *corev1.Service, port intstr.IntOrString) (*corev1.Servi return &corev1.ServicePort{Port: port.IntVal}, nil } +func getNativeServiceAddress(service corev1.Service, svcPort corev1.ServicePort) (string, error) { + if service.Spec.ClusterIP == "None" { + return "", fmt.Errorf("no clusterIP on headless service: %s/%s", service.Namespace, service.Name) + } + + if service.Spec.ClusterIP == "" { + return "", fmt.Errorf("no clusterIP found for service: %s/%s", service.Namespace, service.Name) + } + + return net.JoinHostPort(service.Spec.ClusterIP, strconv.Itoa(int(svcPort.Port))), nil +} + func createPluginMiddleware(k8sClient Client, ns string, plugins map[string]apiextensionv1.JSON) (map[string]dynamic.PluginConf, error) { if plugins == nil { return nil, nil diff --git a/pkg/provider/kubernetes/crd/kubernetes_http.go b/pkg/provider/kubernetes/crd/kubernetes_http.go index 02e0f44d4..66eb87dcd 100644 --- a/pkg/provider/kubernetes/crd/kubernetes_http.go +++ b/pkg/provider/kubernetes/crd/kubernetes_http.go @@ -12,7 +12,7 @@ import ( "github.com/traefik/traefik/v3/pkg/config/dynamic" "github.com/traefik/traefik/v3/pkg/logs" "github.com/traefik/traefik/v3/pkg/provider" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/tls" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -374,6 +374,20 @@ func (c configBuilder) loadServers(parentNamespace string, svc v1alpha1.LoadBala return nil, err } + if svc.NativeLB { + address, err := getNativeServiceAddress(*service, *svcPort) + if err != nil { + return nil, fmt.Errorf("getting native Kubernetes Service address: %w", err) + } + + protocol, err := parseServiceProtocol(svc.Scheme, svcPort.Name, svcPort.Port) + if err != nil { + return nil, err + } + + return []dynamic.Server{{URL: fmt.Sprintf("%s://%s", protocol, address)}}, nil + } + var servers []dynamic.Server if service.Spec.Type == corev1.ServiceTypeExternalName { if !c.allowExternalNameServices { diff --git a/pkg/provider/kubernetes/crd/kubernetes_tcp.go b/pkg/provider/kubernetes/crd/kubernetes_tcp.go index 0b2d3b147..374a2a7ab 100644 --- a/pkg/provider/kubernetes/crd/kubernetes_tcp.go +++ b/pkg/provider/kubernetes/crd/kubernetes_tcp.go @@ -12,7 +12,7 @@ import ( "github.com/traefik/traefik/v3/pkg/config/dynamic" "github.com/traefik/traefik/v3/pkg/logs" "github.com/traefik/traefik/v3/pkg/provider" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/tls" corev1 "k8s.io/api/core/v1" ) @@ -232,6 +232,15 @@ func (p *Provider) loadTCPServers(client Client, namespace string, svc v1alpha1. return nil, err } + if svc.NativeLB { + address, err := getNativeServiceAddress(*service, *svcPort) + if err != nil { + return nil, fmt.Errorf("getting native Kubernetes Service address: %w", err) + } + + return []dynamic.TCPServer{{Address: address}}, nil + } + var servers []dynamic.TCPServer if service.Spec.Type == corev1.ServiceTypeExternalName { servers = append(servers, dynamic.TCPServer{ diff --git a/pkg/provider/kubernetes/crd/kubernetes_test.go b/pkg/provider/kubernetes/crd/kubernetes_test.go index eac24ede2..d09989ed7 100644 --- a/pkg/provider/kubernetes/crd/kubernetes_test.go +++ b/pkg/provider/kubernetes/crd/kubernetes_test.go @@ -15,7 +15,7 @@ import ( "github.com/traefik/traefik/v3/pkg/config/dynamic" "github.com/traefik/traefik/v3/pkg/provider" crdfake "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/provider/kubernetes/k8s" "github.com/traefik/traefik/v3/pkg/tls" "github.com/traefik/traefik/v3/pkg/types" @@ -6749,6 +6749,219 @@ func TestExternalNameService(t *testing.T) { } } +func TestNativeLB(t *testing.T) { + testCases := []struct { + desc string + ingressClass string + paths []string + expected *dynamic.Configuration + }{ + { + desc: "Empty", + expected: &dynamic.Configuration{ + UDP: &dynamic.UDPConfiguration{ + Routers: map[string]*dynamic.UDPRouter{}, + Services: map[string]*dynamic.UDPService{}, + }, + TCP: &dynamic.TCPConfiguration{ + ServersTransports: map[string]*dynamic.TCPServersTransport{}, + Routers: map[string]*dynamic.TCPRouter{}, + Middlewares: map[string]*dynamic.TCPMiddleware{}, + Services: map[string]*dynamic.TCPService{}, + }, + HTTP: &dynamic.HTTPConfiguration{ + ServersTransports: map[string]*dynamic.ServersTransport{}, + Routers: map[string]*dynamic.Router{}, + Middlewares: map[string]*dynamic.Middleware{}, + Services: map[string]*dynamic.Service{}, + }, + TLS: &dynamic.TLSConfiguration{}, + }, + }, + { + desc: "HTTP with native Service LB", + paths: []string{"services.yml", "with_native_service_lb.yml"}, + expected: &dynamic.Configuration{ + UDP: &dynamic.UDPConfiguration{ + Routers: map[string]*dynamic.UDPRouter{}, + Services: map[string]*dynamic.UDPService{}, + }, + TCP: &dynamic.TCPConfiguration{ + ServersTransports: map[string]*dynamic.TCPServersTransport{}, + Routers: map[string]*dynamic.TCPRouter{}, + Middlewares: map[string]*dynamic.TCPMiddleware{}, + Services: map[string]*dynamic.TCPService{}, + }, + HTTP: &dynamic.HTTPConfiguration{ + ServersTransports: map[string]*dynamic.ServersTransport{}, + Routers: map[string]*dynamic.Router{ + "default-test-route-6f97418635c7e18853da": { + EntryPoints: []string{"foo"}, + Service: "default-test-route-6f97418635c7e18853da", + Rule: "Host(`foo.com`)", + Priority: 0, + }, + }, + Middlewares: map[string]*dynamic.Middleware{}, + Services: map[string]*dynamic.Service{ + "default-test-route-6f97418635c7e18853da": { + LoadBalancer: &dynamic.ServersLoadBalancer{ + ResponseForwarding: &dynamic.ResponseForwarding{FlushInterval: dynamic.DefaultFlushInterval}, + Servers: []dynamic.Server{ + { + URL: "http://10.10.0.1:80", + }, + }, + PassHostHeader: Bool(true), + }, + }, + }, + }, + TLS: &dynamic.TLSConfiguration{}, + }, + }, + { + desc: "TCP with native Service LB", + paths: []string{"tcp/services.yml", "tcp/with_native_service_lb.yml"}, + expected: &dynamic.Configuration{ + UDP: &dynamic.UDPConfiguration{ + Routers: map[string]*dynamic.UDPRouter{}, + Services: map[string]*dynamic.UDPService{}, + }, + HTTP: &dynamic.HTTPConfiguration{ + ServersTransports: map[string]*dynamic.ServersTransport{}, + Routers: map[string]*dynamic.Router{}, + Middlewares: map[string]*dynamic.Middleware{}, + Services: map[string]*dynamic.Service{}, + }, + TCP: &dynamic.TCPConfiguration{ + ServersTransports: map[string]*dynamic.TCPServersTransport{}, + Routers: map[string]*dynamic.TCPRouter{ + "default-test.route-fdd3e9338e47a45efefc": { + EntryPoints: []string{"foo"}, + Service: "default-test.route-fdd3e9338e47a45efefc", + Rule: "HostSNI(`foo.com`)", + }, + }, + Middlewares: map[string]*dynamic.TCPMiddleware{}, + Services: map[string]*dynamic.TCPService{ + "default-test.route-fdd3e9338e47a45efefc": { + LoadBalancer: &dynamic.TCPServersLoadBalancer{ + Servers: []dynamic.TCPServer{ + { + Address: "10.10.0.1:8000", + Port: "", + }, + }, + }, + }, + }, + }, + TLS: &dynamic.TLSConfiguration{}, + }, + }, + { + desc: "UDP with native Service LB", + paths: []string{"udp/services.yml", "udp/with_native_service_lb.yml"}, + expected: &dynamic.Configuration{ + UDP: &dynamic.UDPConfiguration{ + Routers: map[string]*dynamic.UDPRouter{ + "default-test.route-0": { + EntryPoints: []string{"foo"}, + Service: "default-test.route-0", + }, + }, + Services: map[string]*dynamic.UDPService{ + "default-test.route-0": { + LoadBalancer: &dynamic.UDPServersLoadBalancer{ + Servers: []dynamic.UDPServer{ + { + Address: "10.10.0.1:8000", + Port: "", + }, + }, + }, + }, + }, + }, + HTTP: &dynamic.HTTPConfiguration{ + ServersTransports: map[string]*dynamic.ServersTransport{}, + Routers: map[string]*dynamic.Router{}, + Middlewares: map[string]*dynamic.Middleware{}, + Services: map[string]*dynamic.Service{}, + }, + TCP: &dynamic.TCPConfiguration{ + ServersTransports: map[string]*dynamic.TCPServersTransport{}, + Routers: map[string]*dynamic.TCPRouter{}, + Middlewares: map[string]*dynamic.TCPMiddleware{}, + Services: map[string]*dynamic.TCPService{}, + }, + TLS: &dynamic.TLSConfiguration{}, + }, + }, + } + + for _, test := range testCases { + test := test + + t.Run(test.desc, func(t *testing.T) { + t.Parallel() + + var k8sObjects []runtime.Object + var crdObjects []runtime.Object + for _, path := range test.paths { + yamlContent, err := os.ReadFile(filepath.FromSlash("./fixtures/" + path)) + if err != nil { + panic(err) + } + + objects := k8s.MustParseYaml(yamlContent) + for _, obj := range objects { + switch o := obj.(type) { + case *corev1.Service, *corev1.Endpoints, *corev1.Secret: + k8sObjects = append(k8sObjects, o) + case *v1alpha1.IngressRoute: + crdObjects = append(crdObjects, o) + case *v1alpha1.IngressRouteTCP: + crdObjects = append(crdObjects, o) + case *v1alpha1.IngressRouteUDP: + crdObjects = append(crdObjects, o) + case *v1alpha1.Middleware: + crdObjects = append(crdObjects, o) + case *v1alpha1.TraefikService: + crdObjects = append(crdObjects, o) + case *v1alpha1.TLSOption: + crdObjects = append(crdObjects, o) + case *v1alpha1.TLSStore: + crdObjects = append(crdObjects, o) + default: + } + } + } + + kubeClient := kubefake.NewSimpleClientset(k8sObjects...) + crdClient := crdfake.NewSimpleClientset(crdObjects...) + + client := newClientImpl(kubeClient, crdClient) + + stopCh := make(chan struct{}) + + eventCh, err := client.WatchAll([]string{"default", "cross-ns"}, stopCh) + require.NoError(t, err) + + if k8sObjects != nil || crdObjects != nil { + // just wait for the first event + <-eventCh + } + + p := Provider{} + + conf := p.loadConfigurationFromCRD(context.Background(), client) + assert.Equal(t, test.expected, conf) + }) + } +} + func TestCreateBasicAuthCredentials(t *testing.T) { var k8sObjects []runtime.Object var crdObjects []runtime.Object diff --git a/pkg/provider/kubernetes/crd/kubernetes_udp.go b/pkg/provider/kubernetes/crd/kubernetes_udp.go index e9d0ef9e5..5d0d02bb9 100644 --- a/pkg/provider/kubernetes/crd/kubernetes_udp.go +++ b/pkg/provider/kubernetes/crd/kubernetes_udp.go @@ -9,7 +9,7 @@ import ( "github.com/rs/zerolog/log" "github.com/traefik/traefik/v3/pkg/config/dynamic" - "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" corev1 "k8s.io/api/core/v1" ) @@ -121,6 +121,15 @@ func (p *Provider) loadUDPServers(client Client, namespace string, svc v1alpha1. return nil, err } + if svc.NativeLB { + address, err := getNativeServiceAddress(*service, *svcPort) + if err != nil { + return nil, fmt.Errorf("getting native Kubernetes Service address: %w", err) + } + + return []dynamic.UDPServer{{Address: address}}, nil + } + var servers []dynamic.UDPServer if service.Spec.Type == corev1.ServiceTypeExternalName { servers = append(servers, dynamic.UDPServer{ diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/doc.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/doc.go similarity index 67% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/doc.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/doc.go index 71b5219b4..7004a1712 100644 --- a/pkg/provider/kubernetes/crd/traefik/v1alpha1/doc.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/doc.go @@ -1,5 +1,6 @@ // +k8s:deepcopy-gen=package // Package v1alpha1 is the v1alpha1 version of the API. -// +groupName=traefik.containo.us +// +groupName=traefik.io +// +groupGoName=Traefik package v1alpha1 diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressroute.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go similarity index 96% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressroute.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go index 0b9625d6d..6471381ae 100644 --- a/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressroute.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroute.go @@ -115,10 +115,14 @@ type LoadBalancerSpec struct { // It allows to configure the transport between Traefik and your servers. // Can only be used on a Kubernetes Service. ServersTransport string `json:"serversTransport,omitempty"` - // Weight defines the weight and should only be specified when Name references a TraefikService object // (and to be precise, one that embeds a Weighted Round Robin). Weight *int `json:"weight,omitempty"` + // NativeLB controls, when creating the load-balancer, + // whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. + // The Kubernetes Service itself does load-balance to the pods. + // By default, NativeLB is false. + NativeLB bool `json:"nativeLB,omitempty"` } type ResponseForwarding struct { diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressroutetcp.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroutetcp.go similarity index 94% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressroutetcp.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroutetcp.go index 80811e3da..5669e8f4f 100644 --- a/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressroutetcp.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressroutetcp.go @@ -78,6 +78,11 @@ type ServiceTCP struct { ServersTransport string `json:"serversTransport,omitempty"` // TLS determines whether to use TLS when dialing with the backend. TLS bool `json:"tls,omitempty"` + // NativeLB controls, when creating the load-balancer, + // whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. + // The Kubernetes Service itself does load-balance to the pods. + // By default, NativeLB is false. + NativeLB bool `json:"nativeLB,omitempty"` } // +genclient diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressrouteudp.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressrouteudp.go similarity index 87% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressrouteudp.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressrouteudp.go index 374461346..18773f437 100644 --- a/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressrouteudp.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/ingressrouteudp.go @@ -33,6 +33,11 @@ type ServiceUDP struct { Port intstr.IntOrString `json:"port"` // Weight defines the weight used when balancing requests between multiple Kubernetes Service. Weight *int `json:"weight,omitempty"` + // NativeLB controls, when creating the load-balancer, + // whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. + // The Kubernetes Service itself does load-balance to the pods. + // By default, NativeLB is false. + NativeLB bool `json:"nativeLB,omitempty"` } // +genclient diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/middleware.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/middleware.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/middleware.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/middleware.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/middlewaretcp.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/middlewaretcp.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/middlewaretcp.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/middlewaretcp.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/objectreference.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/objectreference.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/objectreference.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/objectreference.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/register.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/register.go similarity index 97% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/register.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/register.go index ce17cf418..e4c0d2c75 100644 --- a/pkg/provider/kubernetes/crd/traefik/v1alpha1/register.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/register.go @@ -7,7 +7,7 @@ import ( ) // GroupName is the group name for Traefik. -const GroupName = "traefik.containo.us" +const GroupName = "traefik.io" var ( // SchemeBuilder collects the scheme builder functions. diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/serverstransport.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/serverstransport.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/serverstransport.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/serverstransport.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/serverstransporttcp.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/serverstransporttcp.go similarity index 98% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/serverstransporttcp.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/serverstransporttcp.go index e98d8c07c..202dd39d9 100644 --- a/pkg/provider/kubernetes/crd/traefik/v1alpha1/serverstransporttcp.go +++ b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/serverstransporttcp.go @@ -13,7 +13,7 @@ import ( // ServersTransportTCP is the CRD implementation of a TCPServersTransport. // If no tcpServersTransport is specified, a default one named default@internal will be used. // The default@internal tcpServersTransport can be configured in the static configuration. -// More info: https://doc.traefik.io/traefik/v2.9/routing/services/#serverstransport_3 +// More info: https://doc.traefik.io/traefik/v3.0/routing/services/#serverstransport_3 type ServersTransportTCP struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/service.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/service.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/service.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/service.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/tlsoption.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/tlsoption.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/tlsoption.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/tlsoption.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/tlsstore.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/tlsstore.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/tlsstore.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/tlsstore.go diff --git a/pkg/provider/kubernetes/crd/traefik/v1alpha1/zz_generated.deepcopy.go b/pkg/provider/kubernetes/crd/traefikio/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from pkg/provider/kubernetes/crd/traefik/v1alpha1/zz_generated.deepcopy.go rename to pkg/provider/kubernetes/crd/traefikio/v1alpha1/zz_generated.deepcopy.go diff --git a/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_cross_provider.yml b/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_cross_provider.yml index 3010f3a59..ff90c82d0 100644 --- a/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_cross_provider.yml +++ b/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_cross_provider.yml @@ -42,7 +42,7 @@ spec: value: /bar backendRefs: - weight: 1 - group: traefik.containo.us + group: traefik.io kind: TraefikService name: service@file port: 80 diff --git a/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_to_api_internal.yml b/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_to_api_internal.yml index 6fe6d48b6..6426736f6 100644 --- a/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_to_api_internal.yml +++ b/pkg/provider/kubernetes/gateway/fixtures/httproute/simple_to_api_internal.yml @@ -42,7 +42,7 @@ spec: value: /bar backendRefs: - weight: 1 - group: traefik.containo.us + group: traefik.io kind: TraefikService name: api@internal port: 80 diff --git a/pkg/provider/kubernetes/gateway/fixtures/tcproute/simple_cross_provider.yml b/pkg/provider/kubernetes/gateway/fixtures/tcproute/simple_cross_provider.yml index a712ca739..be491cf79 100644 --- a/pkg/provider/kubernetes/gateway/fixtures/tcproute/simple_cross_provider.yml +++ b/pkg/provider/kubernetes/gateway/fixtures/tcproute/simple_cross_provider.yml @@ -39,7 +39,7 @@ spec: rules: - backendRefs: - weight: 1 - group: traefik.containo.us + group: traefik.io kind: TraefikService name: service@file port: 9000 diff --git a/pkg/provider/kubernetes/gateway/fixtures/tlsroute/simple_cross_provider.yml b/pkg/provider/kubernetes/gateway/fixtures/tlsroute/simple_cross_provider.yml index d530c3d0e..4d687b5de 100644 --- a/pkg/provider/kubernetes/gateway/fixtures/tlsroute/simple_cross_provider.yml +++ b/pkg/provider/kubernetes/gateway/fixtures/tlsroute/simple_cross_provider.yml @@ -55,7 +55,7 @@ spec: rules: - backendRefs: - weight: 1 - group: traefik.containo.us + group: traefik.io kind: TraefikService name: service@file port: 9000 diff --git a/pkg/provider/kubernetes/gateway/kubernetes.go b/pkg/provider/kubernetes/gateway/kubernetes.go index 0db48af8d..170540394 100644 --- a/pkg/provider/kubernetes/gateway/kubernetes.go +++ b/pkg/provider/kubernetes/gateway/kubernetes.go @@ -23,7 +23,7 @@ import ( "github.com/traefik/traefik/v3/pkg/job" "github.com/traefik/traefik/v3/pkg/logs" "github.com/traefik/traefik/v3/pkg/provider" - traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefik/v1alpha1" + traefikv1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1" "github.com/traefik/traefik/v3/pkg/safe" "github.com/traefik/traefik/v3/pkg/tls" corev1 "k8s.io/api/core/v1" @@ -1464,7 +1464,7 @@ func loadServices(client Client, namespace string, backendRefs []v1alpha2.HTTPBa weight := int(pointer.Int32Deref(backendRef.Weight, 1)) - if *backendRef.Group == traefikv1alpha1.GroupName && *backendRef.Kind == kindTraefikService { + if isTraefikService(backendRef.BackendRef) { wrrSvc.Weighted.Services = append(wrrSvc.Weighted.Services, dynamic.WRRService{Name: string(backendRef.Name), Weight: &weight}) continue } @@ -1587,7 +1587,7 @@ func loadTCPServices(client Client, namespace string, backendRefs []v1alpha2.Bac weight := int(pointer.Int32Deref(backendRef.Weight, 1)) - if *backendRef.Group == traefikv1alpha1.GroupName && *backendRef.Kind == kindTraefikService { + if isTraefikService(backendRef) { wrrSvc.Weighted.Services = append(wrrSvc.Weighted.Services, dynamic.TCPWRRService{Name: string(backendRef.Name), Weight: &weight}) continue } @@ -1802,14 +1802,16 @@ func throttleEvents(ctx context.Context, throttleDuration time.Duration, pool *s return eventsChanBuffered } -func isInternalService(ref v1alpha2.BackendRef) bool { +func isTraefikService(ref v1alpha2.BackendRef) bool { if ref.Kind == nil || ref.Group == nil { return false } - return *ref.Kind == kindTraefikService && - *ref.Group == traefikv1alpha1.GroupName && - strings.HasSuffix(string(ref.Name), "@internal") + return *ref.Group == traefikv1alpha1.GroupName && *ref.Kind == kindTraefikService +} + +func isInternalService(ref v1alpha2.BackendRef) bool { + return isTraefikService(ref) && strings.HasSuffix(string(ref.Name), "@internal") } // makeListenerKey joins protocol, hostname, and port of a listener into a string key. diff --git a/pkg/provider/kubernetes/ingress/annotations.go b/pkg/provider/kubernetes/ingress/annotations.go index 54d28c44e..134b2eda2 100644 --- a/pkg/provider/kubernetes/ingress/annotations.go +++ b/pkg/provider/kubernetes/ingress/annotations.go @@ -45,6 +45,7 @@ type ServiceIng struct { ServersTransport string `json:"serversTransport,omitempty"` PassHostHeader *bool `json:"passHostHeader"` Sticky *dynamic.Sticky `json:"sticky,omitempty" label:"allowEmpty"` + NativeLB bool `json:"nativeLB,omitempty"` } // SetDefaults sets the default values. diff --git a/pkg/provider/kubernetes/ingress/annotations_test.go b/pkg/provider/kubernetes/ingress/annotations_test.go index c7c6b62bc..ee77647f3 100644 --- a/pkg/provider/kubernetes/ingress/annotations_test.go +++ b/pkg/provider/kubernetes/ingress/annotations_test.go @@ -106,6 +106,7 @@ func Test_parseServiceConfig(t *testing.T) { "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.nativelb": "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", @@ -125,6 +126,7 @@ func Test_parseServiceConfig(t *testing.T) { ServersScheme: "protocol", ServersTransport: "foobar@file", PassHostHeader: Bool(true), + NativeLB: true, }, }, }, 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 new file mode 100644 index 000000000..f9645ad09 --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_ingress.yml @@ -0,0 +1,15 @@ +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 new file mode 100644 index 000000000..e394301fc --- /dev/null +++ b/pkg/provider/kubernetes/ingress/fixtures/Ingress-with-native-service-lb_service.yml @@ -0,0 +1,15 @@ +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/kubernetes.go b/pkg/provider/kubernetes/ingress/kubernetes.go index bef106940..9bab326a2 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes.go +++ b/pkg/provider/kubernetes/ingress/kubernetes.go @@ -545,6 +545,21 @@ func (p *Provider) loadService(client Client, namespace string, backend networki if svcConfig.Service.ServersTransport != "" { svc.LoadBalancer.ServersTransport = svcConfig.Service.ServersTransport } + + if svcConfig.Service.NativeLB { + address, err := getNativeServiceAddress(*service, portSpec) + if err != nil { + return nil, fmt.Errorf("getting native Kubernetes Service address: %w", err) + } + + protocol := getProtocol(portSpec, portSpec.Name, svcConfig) + + svc.LoadBalancer.Servers = []dynamic.Server{ + {URL: fmt.Sprintf("%s://%s", protocol, address)}, + } + + return svc, nil + } } if service.Spec.Type == corev1.ServiceTypeExternalName { @@ -594,6 +609,18 @@ func (p *Provider) loadService(client Client, namespace string, backend networki return svc, nil } +func getNativeServiceAddress(service corev1.Service, svcPort corev1.ServicePort) (string, error) { + if service.Spec.ClusterIP == "None" { + return "", fmt.Errorf("no clusterIP on headless service: %s/%s", service.Namespace, service.Name) + } + + if service.Spec.ClusterIP == "" { + return "", fmt.Errorf("no clusterIP found for service: %s/%s", service.Namespace, service.Name) + } + + return net.JoinHostPort(service.Spec.ClusterIP, strconv.Itoa(int(svcPort.Port))), nil +} + func getProtocol(portSpec corev1.ServicePort, portName string, svcConfig *ServiceConfig) string { if svcConfig != nil && svcConfig.Service != nil && svcConfig.Service.ServersScheme != "" { return svcConfig.Service.ServersScheme diff --git a/pkg/provider/kubernetes/ingress/kubernetes_test.go b/pkg/provider/kubernetes/ingress/kubernetes_test.go index 3c9a6bc5c..9a3e4e05f 100644 --- a/pkg/provider/kubernetes/ingress/kubernetes_test.go +++ b/pkg/provider/kubernetes/ingress/kubernetes_test.go @@ -5,6 +5,7 @@ import ( "errors" "math" "os" + "path/filepath" "strings" "testing" "time" @@ -2051,8 +2052,88 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) { } } +func TestLoadConfigurationFromIngressesWithNativeLB(t *testing.T) { + testCases := []struct { + desc string + ingressClass string + serverVersion string + expected *dynamic.Configuration + }{ + { + desc: "Ingress with native service lb", + expected: &dynamic.Configuration{ + TCP: &dynamic.TCPConfiguration{}, + HTTP: &dynamic.HTTPConfiguration{ + Middlewares: map[string]*dynamic.Middleware{}, + Routers: map[string]*dynamic.Router{ + "testing-traefik-tchouk-bar": { + Rule: "Host(`traefik.tchouk`) && PathPrefix(`/bar`)", + Service: "testing-service1-8080", + }, + }, + Services: map[string]*dynamic.Service{ + "testing-service1-8080": { + LoadBalancer: &dynamic.ServersLoadBalancer{ + ResponseForwarding: &dynamic.ResponseForwarding{FlushInterval: dynamic.DefaultFlushInterval}, + PassHostHeader: Bool(true), + Servers: []dynamic.Server{ + { + URL: "http://10.0.0.1:8080", + }, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range testCases { + test := test + + 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...) + + p := Provider{IngressClass: test.ingressClass} + conf := p.loadConfigurationFromIngresses(context.Background(), clientMock) + + assert.Equal(t, test.expected, conf) + }) + } +} + func generateTestFilename(suffix, desc string) string { - return "./fixtures/" + strings.ReplaceAll(desc, " ", "-") + suffix + ".yml" + return filepath.Join("fixtures", strings.ReplaceAll(desc, " ", "-")+suffix+".yml") } func TestGetCertificates(t *testing.T) { diff --git a/pkg/provider/nomad/nomad.go b/pkg/provider/nomad/nomad.go index 9ed5c660f..b836707eb 100644 --- a/pkg/provider/nomad/nomad.go +++ b/pkg/provider/nomad/nomad.go @@ -48,6 +48,13 @@ type item struct { ExtraConf configuration // global options } +// configuration contains information from the service's tags that are globals +// (not specific to the dynamic configuration). +type configuration struct { + Enable bool // .enable is the corresponding label. + Canary bool // .nomad.canary is the corresponding label. +} + // ProviderBuilder is responsible for constructing namespaced instances of the Nomad provider. type ProviderBuilder struct { Configuration `yaml:",inline" export:"true"` @@ -89,13 +96,39 @@ type Configuration struct { // SetDefaults sets the default values for the Nomad Traefik Provider Configuration. func (c *Configuration) SetDefaults() { - c.Endpoint = &EndpointConfig{} + defConfig := api.DefaultConfig() + c.Endpoint = &EndpointConfig{ + Address: defConfig.Address, + Region: defConfig.Region, + Token: defConfig.SecretID, + } + + if defConfig.TLSConfig != nil && (defConfig.TLSConfig.Insecure || defConfig.TLSConfig.CACert != "" || defConfig.TLSConfig.ClientCert != "" || defConfig.TLSConfig.ClientKey != "") { + c.Endpoint.TLS = &types.ClientTLS{ + CA: defConfig.TLSConfig.CACert, + Cert: defConfig.TLSConfig.ClientCert, + Key: defConfig.TLSConfig.ClientKey, + InsecureSkipVerify: defConfig.TLSConfig.Insecure, + } + } + c.Prefix = defaultPrefix c.ExposedByDefault = true c.RefreshInterval = ptypes.Duration(15 * time.Second) c.DefaultRule = defaultTemplateRule } +type EndpointConfig struct { + // Address is the Nomad endpoint address, if empty it defaults to NOMAD_ADDR or "http://127.0.0.1:4646". + Address string `description:"The address of the Nomad server, including scheme and port." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"` + // Region is the Nomad region, if empty it defaults to NOMAD_REGION. + Region string `description:"Nomad region to use. If not provided, the local agent region is used." json:"region,omitempty" toml:"region,omitempty" yaml:"region,omitempty"` + // Token is the ACL token to connect with Nomad, if empty it defaults to NOMAD_TOKEN. + Token string `description:"Token is used to provide a per-request ACL token." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty" loggable:"false"` + TLS *types.ClientTLS `description:"Configure TLS." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"` + EndpointWaitTime ptypes.Duration `description:"WaitTime limits how long a Watch will block. If not provided, the agent default values will be used" json:"endpointWaitTime,omitempty" toml:"endpointWaitTime,omitempty" yaml:"endpointWaitTime,omitempty" export:"true"` +} + // Provider holds configuration along with the namespace it will discover services in. type Provider struct { Configuration @@ -106,15 +139,9 @@ type Provider struct { defaultRuleTpl *template.Template // default routing rule } -type EndpointConfig struct { - // Address is the Nomad endpoint address, if empty it defaults to NOMAD_ADDR or "http://localhost:4646". - Address string `description:"The address of the Nomad server, including scheme and port." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"` - // Region is the Nomad region, if empty it defaults to NOMAD_REGION or "global". - Region string `description:"Nomad region to use. If not provided, the local agent region is used." json:"region,omitempty" toml:"region,omitempty" yaml:"region,omitempty"` - // Token is the ACL token to connect with Nomad, if empty it defaults to NOMAD_TOKEN. - Token string `description:"Token is used to provide a per-request ACL token." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty" loggable:"false"` - TLS *types.ClientTLS `description:"Configure TLS." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"` - EndpointWaitTime ptypes.Duration `description:"WaitTime limits how long a Watch will block. If not provided, the agent default values will be used" json:"endpointWaitTime,omitempty" toml:"endpointWaitTime,omitempty" yaml:"endpointWaitTime,omitempty" export:"true"` +// SetDefaults sets the default values for the Nomad Traefik Provider. +func (p *Provider) SetDefaults() { + p.Configuration.SetDefaults() } // Init the Nomad Traefik Provider. @@ -207,51 +234,6 @@ func (p *Provider) loadConfiguration(ctx context.Context, configurationC chan<- return nil } -func createClient(namespace string, endpoint *EndpointConfig) (*api.Client, error) { - config := api.Config{ - Address: endpoint.Address, - Namespace: namespace, - Region: endpoint.Region, - SecretID: endpoint.Token, - WaitTime: time.Duration(endpoint.EndpointWaitTime), - } - - if endpoint.TLS != nil { - config.TLSConfig = &api.TLSConfig{ - CACert: endpoint.TLS.CA, - ClientCert: endpoint.TLS.Cert, - ClientKey: endpoint.TLS.Key, - Insecure: endpoint.TLS.InsecureSkipVerify, - } - } - - return api.NewClient(&config) -} - -// configuration contains information from the service's tags that are globals -// (not specific to the dynamic configuration). -type configuration struct { - Enable bool // .enable is the corresponding label. - Canary bool // .nomad.canary is the corresponding label. -} - -// getExtraConf returns a configuration with settings which are not part of the dynamic configuration (e.g. ".enable"). -func (p *Provider) getExtraConf(tags []string) configuration { - labels := tagsToLabels(tags, p.Prefix) - - enabled := p.ExposedByDefault - if v, exists := labels["traefik.enable"]; exists { - enabled = strings.EqualFold(v, "true") - } - - var canary bool - if v, exists := labels["traefik.nomad.canary"]; exists { - canary = strings.EqualFold(v, "true") - } - - return configuration{Enable: enabled, Canary: canary} -} - func (p *Provider) getNomadServiceData(ctx context.Context) ([]item, error) { // first, get list of service stubs opts := &api.QueryOptions{AllowStale: p.Stale} @@ -309,6 +291,23 @@ func (p *Provider) getNomadServiceData(ctx context.Context) ([]item, error) { return items, nil } +// getExtraConf returns a configuration with settings which are not part of the dynamic configuration (e.g. ".enable"). +func (p *Provider) getExtraConf(tags []string) configuration { + labels := tagsToLabels(tags, p.Prefix) + + enabled := p.ExposedByDefault + if v, exists := labels["traefik.enable"]; exists { + enabled = strings.EqualFold(v, "true") + } + + var canary bool + if v, exists := labels["traefik.nomad.canary"]; exists { + canary = strings.EqualFold(v, "true") + } + + return configuration{Enable: enabled, Canary: canary} +} + // fetchService queries Nomad API for services matching name, // that also have the .enable=true set in its tags. func (p *Provider) fetchService(ctx context.Context, name string) ([]*api.ServiceRegistration, error) { @@ -329,3 +328,24 @@ func (p *Provider) fetchService(ctx context.Context, name string) ([]*api.Servic } return services, nil } + +func createClient(namespace string, endpoint *EndpointConfig) (*api.Client, error) { + config := api.Config{ + Address: endpoint.Address, + Namespace: namespace, + Region: endpoint.Region, + SecretID: endpoint.Token, + WaitTime: time.Duration(endpoint.EndpointWaitTime), + } + + if endpoint.TLS != nil { + config.TLSConfig = &api.TLSConfig{ + CACert: endpoint.TLS.CA, + ClientCert: endpoint.TLS.Cert, + ClientKey: endpoint.TLS.Key, + Insecure: endpoint.TLS.InsecureSkipVerify, + } + } + + return api.NewClient(&config) +} diff --git a/pkg/provider/nomad/nomad_test.go b/pkg/provider/nomad/nomad_test.go index b9d2bfa39..b83c7727c 100644 --- a/pkg/provider/nomad/nomad_test.go +++ b/pkg/provider/nomad/nomad_test.go @@ -7,7 +7,9 @@ import ( "strings" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/traefik/traefik/v3/pkg/types" ) func Test_globalConfig(t *testing.T) { @@ -76,6 +78,60 @@ func Test_globalConfig(t *testing.T) { } } +func TestProvider_SetDefaults_Endpoint(t *testing.T) { + testCases := []struct { + desc string + envs map[string]string + expected *EndpointConfig + }{ + { + desc: "without env vars", + envs: map[string]string{}, + expected: &EndpointConfig{ + Address: "http://127.0.0.1:4646", + }, + }, + { + desc: "with env vars", + envs: map[string]string{ + "NOMAD_ADDR": "https://nomad.example.com", + "NOMAD_REGION": "us-west", + "NOMAD_TOKEN": "almighty_token", + "NOMAD_CACERT": "/etc/ssl/private/nomad-agent-ca.pem", + "NOMAD_CLIENT_CERT": "/etc/ssl/private/global-client-nomad.pem", + "NOMAD_CLIENT_KEY": "/etc/ssl/private/global-client-nomad-key.pem", + "NOMAD_SKIP_VERIFY": "true", + }, + expected: &EndpointConfig{ + Address: "https://nomad.example.com", + Region: "us-west", + Token: "almighty_token", + TLS: &types.ClientTLS{ + CA: "/etc/ssl/private/nomad-agent-ca.pem", + Cert: "/etc/ssl/private/global-client-nomad.pem", + Key: "/etc/ssl/private/global-client-nomad-key.pem", + InsecureSkipVerify: true, + }, + EndpointWaitTime: 0, + }, + }, + } + + for _, test := range testCases { + test := test + t.Run(test.desc, func(t *testing.T) { + for k, v := range test.envs { + t.Setenv(k, v) + } + + p := &Provider{} + p.SetDefaults() + + assert.Equal(t, test.expected, p.Endpoint) + }) + } +} + func Test_getNomadServiceData(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch { diff --git a/pkg/redactor/redactor_config_test.go b/pkg/redactor/redactor_config_test.go index c941bb848..c8836d2d0 100644 --- a/pkg/redactor/redactor_config_test.go +++ b/pkg/redactor/redactor_config_test.go @@ -851,6 +851,7 @@ func TestDo_staticConfiguration(t *testing.T) { }, Datadog: &datadog.Config{ LocalAgentHostPort: "foobar", + LocalAgentSocket: "foobar", GlobalTags: map[string]string{"foobar": "foobar"}, Debug: true, PrioritySampling: true, diff --git a/pkg/redactor/testdata/anonymized-static-config.json b/pkg/redactor/testdata/anonymized-static-config.json index 14d587559..0097aa2c2 100644 --- a/pkg/redactor/testdata/anonymized-static-config.json +++ b/pkg/redactor/testdata/anonymized-static-config.json @@ -351,6 +351,7 @@ }, "datadog": { "localAgentHostPort": "xxxx", + "localAgentSocket": "xxxx", "globalTags": { "foobar": "foobar" }, diff --git a/pkg/server/server_entrypoint_tcp.go b/pkg/server/server_entrypoint_tcp.go index 49a6bd4fc..6f8bfba02 100644 --- a/pkg/server/server_entrypoint_tcp.go +++ b/pkg/server/server_entrypoint_tcp.go @@ -15,12 +15,14 @@ import ( "time" "github.com/containous/alice" + gokitmetrics "github.com/go-kit/kit/metrics" "github.com/pires/go-proxyproto" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/traefik/traefik/v3/pkg/config/static" "github.com/traefik/traefik/v3/pkg/ip" "github.com/traefik/traefik/v3/pkg/logs" + "github.com/traefik/traefik/v3/pkg/metrics" "github.com/traefik/traefik/v3/pkg/middlewares" "github.com/traefik/traefik/v3/pkg/middlewares/contenttype" "github.com/traefik/traefik/v3/pkg/middlewares/forwardedheaders" @@ -67,7 +69,7 @@ func (h *httpForwarder) Accept() (net.Conn, error) { type TCPEntryPoints map[string]*TCPEntryPoint // NewTCPEntryPoints creates a new TCPEntryPoints. -func NewTCPEntryPoints(entryPointsConfig static.EntryPoints, hostResolverConfig *types.HostResolverConfig) (TCPEntryPoints, error) { +func NewTCPEntryPoints(entryPointsConfig static.EntryPoints, hostResolverConfig *types.HostResolverConfig, metricsRegistry metrics.Registry) (TCPEntryPoints, error) { serverEntryPointsTCP := make(TCPEntryPoints) for entryPointName, config := range entryPointsConfig { protocol, err := config.GetProtocol() @@ -81,7 +83,11 @@ func NewTCPEntryPoints(entryPointsConfig static.EntryPoints, hostResolverConfig ctx := log.With().Str(logs.EntryPointName, entryPointName).Logger().WithContext(context.Background()) - serverEntryPointsTCP[entryPointName], err = NewTCPEntryPoint(ctx, config, hostResolverConfig) + openConnectionsGauge := metricsRegistry. + OpenConnectionsGauge(). + With("entrypoint", entryPointName, "protocol", "TCP") + + serverEntryPointsTCP[entryPointName], err = NewTCPEntryPoint(ctx, config, hostResolverConfig, openConnectionsGauge) if err != nil { return nil, fmt.Errorf("error while building entryPoint %s: %w", entryPointName, err) } @@ -137,8 +143,8 @@ type TCPEntryPoint struct { } // NewTCPEntryPoint creates a new TCPEntryPoint. -func NewTCPEntryPoint(ctx context.Context, configuration *static.EntryPoint, hostResolverConfig *types.HostResolverConfig) (*TCPEntryPoint, error) { - tracker := newConnectionTracker() +func NewTCPEntryPoint(ctx context.Context, configuration *static.EntryPoint, hostResolverConfig *types.HostResolverConfig, openConnectionsGauge gokitmetrics.Gauge) (*TCPEntryPoint, error) { + tracker := newConnectionTracker(openConnectionsGauge) listener, err := buildListener(ctx, configuration) if err != nil { @@ -440,34 +446,45 @@ func buildListener(ctx context.Context, entryPoint *static.EntryPoint) (net.List return listener, nil } -func newConnectionTracker() *connectionTracker { +func newConnectionTracker(openConnectionsGauge gokitmetrics.Gauge) *connectionTracker { return &connectionTracker{ - conns: make(map[net.Conn]struct{}), + conns: make(map[net.Conn]struct{}), + openConnectionsGauge: openConnectionsGauge, } } type connectionTracker struct { - conns map[net.Conn]struct{} - lock sync.RWMutex + connsMu sync.RWMutex + conns map[net.Conn]struct{} + + openConnectionsGauge gokitmetrics.Gauge } // AddConnection add a connection in the tracked connections list. func (c *connectionTracker) AddConnection(conn net.Conn) { - c.lock.Lock() - defer c.lock.Unlock() + c.connsMu.Lock() c.conns[conn] = struct{}{} + c.connsMu.Unlock() + + if c.openConnectionsGauge != nil { + c.openConnectionsGauge.Add(1) + } } // RemoveConnection remove a connection from the tracked connections list. func (c *connectionTracker) RemoveConnection(conn net.Conn) { - c.lock.Lock() - defer c.lock.Unlock() + c.connsMu.Lock() delete(c.conns, conn) + c.connsMu.Unlock() + + if c.openConnectionsGauge != nil { + c.openConnectionsGauge.Add(-1) + } } func (c *connectionTracker) isEmpty() bool { - c.lock.RLock() - defer c.lock.RUnlock() + c.connsMu.RLock() + defer c.connsMu.RUnlock() return len(c.conns) == 0 } @@ -489,8 +506,8 @@ func (c *connectionTracker) Shutdown(ctx context.Context) error { // Close close all the connections in the tracked connections list. func (c *connectionTracker) Close() { - c.lock.Lock() - defer c.lock.Unlock() + c.connsMu.Lock() + defer c.connsMu.Unlock() for conn := range c.conns { if err := conn.Close(); err != nil { log.Error().Err(err).Msg("Error while closing connection") diff --git a/pkg/server/server_entrypoint_tcp_http3.go b/pkg/server/server_entrypoint_tcp_http3.go index 78d517e4b..188be8026 100644 --- a/pkg/server/server_entrypoint_tcp_http3.go +++ b/pkg/server/server_entrypoint_tcp_http3.go @@ -9,7 +9,7 @@ import ( "net/http" "sync" - "github.com/lucas-clemente/quic-go/http3" + "github.com/quic-go/quic-go/http3" "github.com/rs/zerolog/log" "github.com/traefik/traefik/v3/pkg/config/static" tcprouter "github.com/traefik/traefik/v3/pkg/server/router/tcp" diff --git a/pkg/server/server_entrypoint_tcp_http3_test.go b/pkg/server/server_entrypoint_tcp_http3_test.go index b4f509f95..9b440be4b 100644 --- a/pkg/server/server_entrypoint_tcp_http3_test.go +++ b/pkg/server/server_entrypoint_tcp_http3_test.go @@ -93,7 +93,7 @@ func TestHTTP3AdvertisedPort(t *testing.T) { HTTP3: &static.HTTP3Config{ AdvertisedPort: 8080, }, - }, nil) + }, nil, nil) require.NoError(t, err) router, err := tcprouter.NewRouter() diff --git a/pkg/server/server_entrypoint_tcp_test.go b/pkg/server/server_entrypoint_tcp_test.go index 8fb5f582c..3567ca47f 100644 --- a/pkg/server/server_entrypoint_tcp_test.go +++ b/pkg/server/server_entrypoint_tcp_test.go @@ -79,7 +79,7 @@ func testShutdown(t *testing.T, router *tcprouter.Router) { Transport: epConfig, ForwardedHeaders: &static.ForwardedHeaders{}, HTTP2: &static.HTTP2Config{}, - }, nil) + }, nil, nil) require.NoError(t, err) conn, err := startEntrypoint(entryPoint, router) @@ -164,7 +164,7 @@ func TestReadTimeoutWithoutFirstByte(t *testing.T) { Transport: epConfig, ForwardedHeaders: &static.ForwardedHeaders{}, HTTP2: &static.HTTP2Config{}, - }, nil) + }, nil, nil) require.NoError(t, err) router := &tcprouter.Router{} @@ -201,7 +201,7 @@ func TestReadTimeoutWithFirstByte(t *testing.T) { Transport: epConfig, ForwardedHeaders: &static.ForwardedHeaders{}, HTTP2: &static.HTTP2Config{}, - }, nil) + }, nil, nil) require.NoError(t, err) router := &tcprouter.Router{} diff --git a/pkg/server/service/proxy.go b/pkg/server/service/proxy.go index 58f5e7081..b34cc0500 100644 --- a/pkg/server/service/proxy.go +++ b/pkg/server/service/proxy.go @@ -53,11 +53,7 @@ func directorBuilder(target *url.URL, passHostHeader bool) func(req *http.Reques outReq.ProtoMajor = 1 outReq.ProtoMinor = 1 - if _, ok := outReq.Header["User-Agent"]; !ok { - outReq.Header.Set("User-Agent", "") - } - - // Do not pass client Host header unless PassHostHeader is set. + // Do not pass client Host header unless optsetter PassHostHeader is set. if !passHostHeader { outReq.Host = outReq.URL.Host } diff --git a/pkg/server/service/service_test.go b/pkg/server/service/service_test.go index 10a6f6779..8b5ff946b 100644 --- a/pkg/server/service/service_test.go +++ b/pkg/server/service/service_test.go @@ -2,8 +2,11 @@ package service import ( "context" + "io" "net/http" "net/http/httptest" + "net/http/httptrace" + "net/textproto" "strings" "testing" @@ -86,24 +89,34 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { server1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("X-From", "first") })) - defer server1.Close() + t.Cleanup(server1.Close) server2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("X-From", "second") })) - defer server2.Close() + t.Cleanup(server2.Close) serverPassHost := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("X-From", "passhost") assert.Equal(t, "callme", r.Host) })) - defer serverPassHost.Close() + t.Cleanup(serverPassHost.Close) serverPassHostFalse := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("X-From", "passhostfalse") assert.NotEqual(t, "callme", r.Host) })) - defer serverPassHostFalse.Close() + t.Cleanup(serverPassHostFalse.Close) + + hasNoUserAgent := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Empty(t, r.Header.Get("User-Agent")) + })) + t.Cleanup(hasNoUserAgent.Close) + + hasUserAgent := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, "foobar", r.Header.Get("User-Agent")) + })) + t.Cleanup(hasUserAgent.Close) type ExpectedResult struct { StatusCode int @@ -119,6 +132,7 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { service *dynamic.ServersLoadBalancer responseModifier func(*http.Response) error cookieRawValue string + userAgent string expected []ExpectedResult }{ @@ -256,6 +270,39 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { }, }, }, + { + desc: "No user-agent", + serviceName: "test", + service: &dynamic.ServersLoadBalancer{ + Servers: []dynamic.Server{ + { + URL: hasNoUserAgent.URL, + }, + }, + }, + expected: []ExpectedResult{ + { + StatusCode: http.StatusOK, + }, + }, + }, + { + desc: "Custom user-agent", + serviceName: "test", + userAgent: "foobar", + service: &dynamic.ServersLoadBalancer{ + Servers: []dynamic.Server{ + { + URL: hasUserAgent.URL, + }, + }, + }, + expected: []ExpectedResult{ + { + StatusCode: http.StatusOK, + }, + }, + }, } for _, test := range testCases { @@ -268,6 +315,12 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { assert.NotNil(t, handler) req := testhelpers.MustNewRequest(http.MethodGet, "http://callme", nil) + assert.Equal(t, "", req.Header.Get("User-Agent")) + + if test.userAgent != "" { + req.Header.Set("User-Agent", test.userAgent) + } + if test.cookieRawValue != "" { req.Header.Set("Cookie", test.cookieRawValue) } @@ -306,6 +359,101 @@ func TestGetLoadBalancerServiceHandler(t *testing.T) { } } +// This test is an adapted version of net/http/httputil.Test1xxResponses test. +func Test1xxResponses(t *testing.T) { + sm := NewManager(nil, nil, nil, &RoundTripperManager{ + roundTrippers: map[string]http.RoundTripper{ + "default@internal": http.DefaultTransport, + }, + }) + + backend := httptest.NewServer(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")) + })) + t.Cleanup(backend.Close) + + info := &runtime.ServiceInfo{ + Service: &dynamic.Service{ + LoadBalancer: &dynamic.ServersLoadBalancer{ + Servers: []dynamic.Server{ + { + URL: backend.URL, + }, + }, + }, + }, + } + + handler, err := sm.getLoadBalancerServiceHandler(context.Background(), "foobar", info) + assert.Nil(t, err) + + frontend := httptest.NewServer(handler) + t.Cleanup(frontend.Close) + frontendClient := frontend.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, frontend.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) + } +} + func TestManager_Build(t *testing.T) { testCases := []struct { desc string diff --git a/pkg/tls/tlsmanager.go b/pkg/tls/tlsmanager.go index 94ba8a81f..528834b29 100644 --- a/pkg/tls/tlsmanager.go +++ b/pkg/tls/tlsmanager.go @@ -230,24 +230,43 @@ func (m *Manager) Get(storeName, configName string) (*tls.Config, error) { return tlsConfig, err } -// GetCertificates returns all stored certificates. -func (m *Manager) GetCertificates() []*x509.Certificate { +// GetServerCertificates returns all certificates from the default store, +// as well as the user-defined default certificate (if it exists). +func (m *Manager) GetServerCertificates() []*x509.Certificate { var certificates []*x509.Certificate - // We iterate over all the certificates. - for _, store := range m.stores { - if store.DynamicCerts != nil && store.DynamicCerts.Get() != nil { - for _, cert := range store.DynamicCerts.Get().(map[string]*CertificateData) { - x509Cert, err := x509.ParseCertificate(cert.Certificate.Certificate[0]) - if err != nil { - continue - } + // The default store is the only relevant, because it is the only one configurable. + defaultStore, ok := m.stores[DefaultTLSStoreName] + if !ok || defaultStore == nil { + return certificates + } - certificates = append(certificates, x509Cert) + // We iterate over all the certificates. + if defaultStore.DynamicCerts != nil && defaultStore.DynamicCerts.Get() != nil { + for _, cert := range defaultStore.DynamicCerts.Get().(map[string]*CertificateData) { + x509Cert, err := x509.ParseCertificate(cert.Certificate.Certificate[0]) + if err != nil { + continue } + + certificates = append(certificates, x509Cert) } } + if defaultStore.DefaultCertificate != nil { + x509Cert, err := x509.ParseCertificate(defaultStore.DefaultCertificate.Certificate[0]) + if err != nil { + return certificates + } + + // Excluding the generated Traefik default certificate. + if x509Cert.Subject.CommonName == generate.DefaultDomain { + return certificates + } + + certificates = append(certificates, x509Cert) + } + return certificates } diff --git a/pkg/tracing/datadog/datadog.go b/pkg/tracing/datadog/datadog.go index be5c7c6ea..f1a334f22 100644 --- a/pkg/tracing/datadog/datadog.go +++ b/pkg/tracing/datadog/datadog.go @@ -18,6 +18,7 @@ const Name = "datadog" // Config provides configuration settings for a datadog tracer. type Config struct { LocalAgentHostPort string `description:"Sets the Datadog Agent host:port." json:"localAgentHostPort,omitempty" toml:"localAgentHostPort,omitempty" yaml:"localAgentHostPort,omitempty"` + LocalAgentSocket string `description:"Sets the socket for the Datadog Agent." json:"localAgentSocket,omitempty" toml:"localAgentSocket,omitempty" yaml:"localAgentSocket,omitempty"` GlobalTags map[string]string `description:"Sets a list of key:value tags on all spans." json:"globalTags,omitempty" toml:"globalTags,omitempty" yaml:"globalTags,omitempty" export:"true"` Debug bool `description:"Enables Datadog debug." json:"debug,omitempty" toml:"debug,omitempty" yaml:"debug,omitempty" export:"true"` PrioritySampling bool `description:"Enables priority sampling. When using distributed tracing, this option must be enabled in order to get all the parts of a distributed trace sampled." json:"prioritySampling,omitempty" toml:"prioritySampling,omitempty" yaml:"prioritySampling,omitempty" export:"true"` @@ -47,7 +48,6 @@ func (c *Config) Setup(serviceName string) (opentracing.Tracer, io.Closer, error logger := log.With().Str(logs.TracingProviderName, Name).Logger() opts := []datadog.StartOption{ - datadog.WithAgentAddr(c.LocalAgentHostPort), datadog.WithServiceName(serviceName), datadog.WithDebugMode(c.Debug), datadog.WithPropagator(datadog.NewPropagator(&datadog.PropagatorConfig{ @@ -59,6 +59,12 @@ func (c *Config) Setup(serviceName string) (opentracing.Tracer, io.Closer, error datadog.WithLogger(logs.NewDatadogLogger(logger)), } + if c.LocalAgentSocket != "" { + opts = append(opts, datadog.WithUDS(c.LocalAgentSocket)) + } else { + opts = append(opts, datadog.WithAgentAddr(c.LocalAgentHostPort)) + } + for k, v := range c.GlobalTags { opts = append(opts, datadog.WithGlobalTag(k, v)) } diff --git a/pkg/types/metrics.go b/pkg/types/metrics.go index 775dc7a16..2d8b4114d 100644 --- a/pkg/types/metrics.go +++ b/pkg/types/metrics.go @@ -19,12 +19,13 @@ type Metrics struct { // Prometheus can contain specific configuration used by the Prometheus Metrics exporter. type Prometheus struct { - Buckets []float64 `description:"Buckets for latency metrics." json:"buckets,omitempty" toml:"buckets,omitempty" yaml:"buckets,omitempty" export:"true"` - AddEntryPointsLabels bool `description:"Enable metrics on entry points." json:"addEntryPointsLabels,omitempty" toml:"addEntryPointsLabels,omitempty" yaml:"addEntryPointsLabels,omitempty" export:"true"` - AddRoutersLabels bool `description:"Enable metrics on routers." json:"addRoutersLabels,omitempty" toml:"addRoutersLabels,omitempty" yaml:"addRoutersLabels,omitempty" export:"true"` - AddServicesLabels bool `description:"Enable metrics on services." json:"addServicesLabels,omitempty" toml:"addServicesLabels,omitempty" yaml:"addServicesLabels,omitempty" export:"true"` - EntryPoint string `description:"EntryPoint" json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"` - ManualRouting bool `description:"Manual routing" json:"manualRouting,omitempty" toml:"manualRouting,omitempty" yaml:"manualRouting,omitempty" export:"true"` + Buckets []float64 `description:"Buckets for latency metrics." json:"buckets,omitempty" toml:"buckets,omitempty" yaml:"buckets,omitempty" export:"true"` + AddEntryPointsLabels bool `description:"Enable metrics on entry points." json:"addEntryPointsLabels,omitempty" toml:"addEntryPointsLabels,omitempty" yaml:"addEntryPointsLabels,omitempty" export:"true"` + AddRoutersLabels bool `description:"Enable metrics on routers." json:"addRoutersLabels,omitempty" toml:"addRoutersLabels,omitempty" yaml:"addRoutersLabels,omitempty" export:"true"` + AddServicesLabels bool `description:"Enable metrics on services." json:"addServicesLabels,omitempty" toml:"addServicesLabels,omitempty" yaml:"addServicesLabels,omitempty" export:"true"` + EntryPoint string `description:"EntryPoint" json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"` + ManualRouting bool `description:"Manual routing" json:"manualRouting,omitempty" toml:"manualRouting,omitempty" yaml:"manualRouting,omitempty" export:"true"` + HeaderLabels map[string]string `description:"Defines the extra labels for the requests_total metrics, and for each of them, the request header containing the value for this label." json:"headerLabels,omitempty" toml:"headerLabels,omitempty" yaml:"headerLabels,omitempty" export:"true"` } // SetDefaults sets the default values. diff --git a/script/code-gen.sh b/script/code-gen.sh index 6d3ca09a2..905ac67cb 100755 --- a/script/code-gen.sh +++ b/script/code-gen.sh @@ -18,28 +18,40 @@ docker build --build-arg KUBE_VERSION=v0.20.2 \ "." echo "Generating Traefik clientSet code ..." -cmd="/go/src/k8s.io/code-generator/generate-groups.sh all ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/provider/kubernetes/crd/generated ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/provider/kubernetes/crd traefik:v1alpha1 --go-header-file=/go/src/${PROJECT_MODULE}/script/boilerplate.go.tmpl" docker run --rm \ -v "${CURRENT_DIR}:/go/src/${PROJECT_MODULE}" \ -w "/go/src/${PROJECT_MODULE}" \ - "${IMAGE_NAME}" ${cmd} + "${IMAGE_NAME}" \ + /go/src/k8s.io/code-generator/generate-groups.sh all \ + ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/provider/kubernetes/crd/generated \ + ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/provider/kubernetes/crd \ + "traefikio:v1alpha1" \ + --go-header-file=/go/src/${PROJECT_MODULE}/script/boilerplate.go.tmpl echo "Generating DeepCopy code ..." -cmd="deepcopy-gen --input-dirs ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/config/dynamic --input-dirs ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/tls --input-dirs ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/types --output-package ${PROJECT_MODULE}/${MODULE_VERSION} -O zz_generated.deepcopy --go-header-file=/go/src/${PROJECT_MODULE}/script/boilerplate.go.tmpl" + docker run --rm \ -v "${CURRENT_DIR}:/go/src/${PROJECT_MODULE}" \ -w "/go/src/${PROJECT_MODULE}" \ - "${IMAGE_NAME}" ${cmd} + "${IMAGE_NAME}" \ + deepcopy-gen \ + --input-dirs ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/config/dynamic \ + --input-dirs ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/tls \ + --input-dirs ${PROJECT_MODULE}/${MODULE_VERSION}/pkg/types \ + --output-package ${PROJECT_MODULE}/${MODULE_VERSION} -O zz_generated.deepcopy \ + --go-header-file=/go/src/${PROJECT_MODULE}/script/boilerplate.go.tmpl echo "Generating the CRD definitions for the documentation ..." -cmd="controller-gen crd:crdVersions=v1 paths=./pkg/provider/kubernetes/crd/traefik/v1alpha1/... output:dir=./docs/content/reference/dynamic-configuration/" docker run --rm \ -v "${CURRENT_DIR}:/go/src/${PROJECT_MODULE}" \ -w "/go/src/${PROJECT_MODULE}" \ - "${IMAGE_NAME}" ${cmd} + "${IMAGE_NAME}" \ + controller-gen crd:crdVersions=v1 \ + paths={./pkg/provider/kubernetes/crd/traefikio/v1alpha1/...} \ + output:dir=./docs/content/reference/dynamic-configuration/ echo "Concatenate the CRD definitions for publication and integration tests ..." -cat "${CURRENT_DIR}"/docs/content/reference/dynamic-configuration/traefik.containo.us_*.yaml > "${CURRENT_DIR}"/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml +cat "${CURRENT_DIR}"/docs/content/reference/dynamic-configuration/traefik.io_*.yaml > "${CURRENT_DIR}"/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml cp -f "${CURRENT_DIR}"/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml "${CURRENT_DIR}"/integration/fixtures/k8s/01-traefik-crd.yml cp -r "${CURRENT_DIR}/${MODULE_VERSION}"/* "${CURRENT_DIR}" diff --git a/script/codegen.Dockerfile b/script/codegen.Dockerfile index ac2815fb5..d946b2e16 100644 --- a/script/codegen.Dockerfile +++ b/script/codegen.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19 +FROM golang:1.20 ARG USER=$USER ARG UID=$UID diff --git a/script/gcg/traefik-bugfix.toml b/script/gcg/traefik-bugfix.toml index 87ec86f38..189f8c451 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.9.7 +# example new bugfix v2.9.9 CurrentRef = "v2.9" -PreviousRef = "v2.9.6" +PreviousRef = "v2.9.8" BaseBranch = "v2.9" -FutureCurrentRefName = "v2.9.7" +FutureCurrentRefName = "v2.9.9" ThresholdPreviousRef = 10 ThresholdCurrentRef = 10 diff --git a/webui/package.json b/webui/package.json index 1f88c6a52..23e2be3d4 100644 --- a/webui/package.json +++ b/webui/package.json @@ -3,7 +3,7 @@ "version": "2.0.0", "description": "Traefik UI", "productName": "Traefik", - "cordovaId": "us.containo.traefik", + "cordovaId": "io.traefik.traefik", "private": true, "scripts": { "transfer": "node dev/scripts/transfer.js",