From 75c99a04910773dc7db6e93a4f496854f5282b20 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 22 Jul 2019 09:58:04 +0200 Subject: [PATCH] doc: improve examples. --- docs/content/contributing/data-collection.md | 23 ++- .../getting-started/install-traefik.md | 2 +- docs/content/https/acme.md | 2 +- docs/content/https/ref-acme.txt | 7 +- docs/content/https/tls.md | 10 +- docs/content/includes/more-on-entrypoints.md | 4 +- docs/content/middlewares/addprefix.md | 11 +- docs/content/middlewares/basicauth.md | 24 ++- docs/content/middlewares/buffering.md | 13 +- docs/content/middlewares/chain.md | 42 ++++- docs/content/middlewares/circuitbreaker.md | 11 +- docs/content/middlewares/compress.md | 10 +- docs/content/middlewares/digestauth.md | 23 ++- docs/content/middlewares/errorpages.md | 17 +- docs/content/middlewares/forwardauth.md | 20 +- docs/content/middlewares/headers.md | 64 ++++++- docs/content/middlewares/ipwhitelist.md | 42 ++++- docs/content/middlewares/maxconnection.md | 17 +- docs/content/middlewares/overview.md | 36 +++- docs/content/middlewares/passtlsclientcert.md | 41 +++- docs/content/middlewares/ratelimit.md | 27 ++- docs/content/middlewares/redirectregex.md | 12 +- docs/content/middlewares/redirectscheme.md | 11 +- docs/content/middlewares/replacepath.md | 11 +- docs/content/middlewares/replacepathregex.md | 12 +- docs/content/middlewares/retry.md | 11 +- docs/content/middlewares/stripprefix.md | 13 +- docs/content/middlewares/stripprefixregex.md | 13 +- docs/content/observability/access-logs.md | 62 +++++- docs/content/observability/logs.md | 26 ++- docs/content/observability/metrics/datadog.md | 20 +- .../content/observability/metrics/influxdb.md | 32 ++-- .../content/observability/metrics/overview.md | 4 +- .../observability/metrics/prometheus.md | 14 +- docs/content/observability/metrics/statsd.md | 17 +- docs/content/observability/tracing/datadog.md | 7 +- .../content/observability/tracing/haystack.md | 10 +- docs/content/observability/tracing/instana.md | 6 +- docs/content/observability/tracing/jaeger.md | 13 +- .../content/observability/tracing/overview.md | 4 +- docs/content/observability/tracing/zipkin.md | 8 +- docs/content/operations/api.md | 24 ++- docs/content/operations/dashboard.md | 55 +++--- docs/content/operations/ping.md | 14 +- docs/content/providers/docker.md | 6 +- docs/content/providers/kubernetes-ingress.md | 2 +- docs/content/providers/marathon.md | 2 +- docs/content/providers/rancher.md | 4 +- docs/content/providers/rancher.toml | 2 +- docs/content/providers/rancher.txt | 4 +- docs/content/providers/rancher.yml | 2 +- .../dynamic-configuration/docker-labels.yml | 177 ++++++++++++++++++ .../reference/dynamic-configuration/docker.md | 4 +- .../dynamic-configuration/docker.yml | 6 +- .../reference/dynamic-configuration/file.toml | 68 +++++-- .../reference/dynamic-configuration/file.yaml | 58 +++++- .../dynamic-configuration/labels.yml | 157 ---------------- .../marathon-labels.json | 177 ++++++++++++++++++ .../dynamic-configuration/marathon.json | 2 + .../dynamic-configuration/marathon.md | 9 +- .../dynamic-configuration/marathon.yml | 2 - .../dynamic-configuration/rancher.md | 12 ++ .../dynamic-configuration/rancher.yml | 1 + .../reference/static-configuration/file.toml | 60 +++--- .../reference/static-configuration/file.yaml | 77 ++++---- docs/content/routing/routers/index.md | 10 +- docs/content/user-guides/grpc.md | 4 +- docs/mkdocs.yml | 9 +- traefik.sample.toml | 108 ++++++----- 69 files changed, 1256 insertions(+), 552 deletions(-) create mode 100644 docs/content/reference/dynamic-configuration/docker-labels.yml delete mode 100644 docs/content/reference/dynamic-configuration/labels.yml create mode 100644 docs/content/reference/dynamic-configuration/marathon-labels.json create mode 100644 docs/content/reference/dynamic-configuration/marathon.json delete mode 100644 docs/content/reference/dynamic-configuration/marathon.yml create mode 100644 docs/content/reference/dynamic-configuration/rancher.md create mode 100644 docs/content/reference/dynamic-configuration/rancher.yml diff --git a/docs/content/contributing/data-collection.md b/docs/content/contributing/data-collection.md index 467584d7c..03a6d90bc 100644 --- a/docs/content/contributing/data-collection.md +++ b/docs/content/contributing/data-collection.md @@ -9,22 +9,27 @@ Understanding how you use Traefik is very important to us: it helps us improve t For this very reason, the sendAnonymousUsage option is mandatory: we want you to take time to consider whether or not you wish to share anonymous data with us so we can benefit from your experience and use cases. !!! warning - During the alpha stage only, leaving this option unset will not prevent Traefik from running but will generate an error log indicating that it enables data collection by default. + During the beta stage only, leaving this option unset will not prevent Traefik from running but will generate an error log indicating that it enables data collection by default. -??? example "Enabling Data Collection with TOML" - - ```toml +!!! example "Enabling Data Collection" + + ```toml tab="File (TOML)" [global] # Send anonymous usage data sendAnonymousUsage = true ``` - -??? example "Enabling Data Collection with the CLI" - - ```bash - ./traefik --sendAnonymousUsage=true + + ```yaml tab="File (YAML)" + global: + # Send anonymous usage data + sendAnonymousUsage: true ``` + ```bash tab="CLI" + # Send anonymous usage data + --global.sendAnonymousUsage + ``` + ## Collected Data This feature comes from the public proposal [here](https://github.com/containous/traefik/issues/2369). diff --git a/docs/content/getting-started/install-traefik.md b/docs/content/getting-started/install-traefik.md index b468bc6d0..a3d0b3db5 100644 --- a/docs/content/getting-started/install-traefik.md +++ b/docs/content/getting-started/install-traefik.md @@ -8,7 +8,7 @@ You can install Traefik with the following flavors: ## Use the Official Docker Image -Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with the [sample configuration file](https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml): +Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with the [sample configuration file](https://raw.githubusercontent.com/containous/traefik/v2.0/traefik.sample.toml): ```shell docker run -d -p 8080:8080 -p 80:80 \ diff --git a/docs/content/https/acme.md b/docs/content/https/acme.md index de8728372..eed817ece 100644 --- a/docs/content/https/acme.md +++ b/docs/content/https/acme.md @@ -109,7 +109,7 @@ when using the `TLS-ALPN-01` challenge, Traefik must be reachable by Let's Encry ```bash tab="CLI" # ... - --certificatesResolvers.sample.acme.tlsChallenge + --certificatesResolvers.sample.acme.tlsChallenge=true ``` ### `httpChallenge` diff --git a/docs/content/https/ref-acme.txt b/docs/content/https/ref-acme.txt index 4e9fefc3a..d71023048 100644 --- a/docs/content/https/ref-acme.txt +++ b/docs/content/https/ref-acme.txt @@ -1,5 +1,4 @@ # Enable ACME (Let's Encrypt): automatic SSL. ---certificatesResolvers.sample.acme # Email address used for registration. # @@ -35,13 +34,13 @@ # # Optional (but recommended) # ---certificatesResolvers.sample.acme.tlsChallenge +--certificatesResolvers.sample.acme.tlsChallenge=true # Use a HTTP-01 ACME challenge. # # Optional # ---certificatesResolvers.sample.acme.httpChallenge +--certificatesResolvers.sample.acme.httpChallenge=true # EntryPoint to use for the HTTP-01 challenges. # @@ -54,7 +53,7 @@ # # Optional # ---certificatesResolvers.sample.acme.dnsChallenge +--certificatesResolvers.sample.acme.dnsChallenge=true # DNS provider used. # diff --git a/docs/content/https/tls.md b/docs/content/https/tls.md index 4f3540de3..d9dd7b850 100644 --- a/docs/content/https/tls.md +++ b/docs/content/https/tls.md @@ -35,7 +35,7 @@ tls: !!! important "File Provider Only" In the above example, we've used the [file provider](../providers/file.md) to handle these definitions. - In its current alpha version, it is the only available method to configure the certificates (as well as the options and the stores). + In its current beta version, it is the only available method to configure the certificates (as well as the options and the stores). ## Certificates Stores @@ -52,9 +52,9 @@ tls: default: {} ``` -!!! important "Alpha restriction" +!!! important "Beta restriction" - During the alpha version, any store definition other than the default one (named `default`) will be ignored, + During the beta version, any store definition other than the default one (named `default`) will be ignored, and there is thefore only one globally available TLS store. In the `tls.certificates` section, a list of stores can then be specified to indicate where the certificates should be stored: @@ -85,9 +85,9 @@ tls: keyFile: /path/to/other-domain.key ``` -!!! important "Alpha restriction" +!!! important "Beta restriction" - During the alpha version, the `stores` list will actually be ignored and automatically set to `["default"]`. + During the beta version, the `stores` list will actually be ignored and automatically set to `["default"]`. ### Default Certificate diff --git a/docs/content/includes/more-on-entrypoints.md b/docs/content/includes/more-on-entrypoints.md index 65e801bd4..593b78ce8 100644 --- a/docs/content/includes/more-on-entrypoints.md +++ b/docs/content/includes/more-on-entrypoints.md @@ -1,2 +1,2 @@ -!!! info "More On Entrypoints" - Learn more about entrypoints and their configuration options in the dedicated section. \ No newline at end of file +!!! info "More On Entry Points" + Learn more about entry points and their configuration options in the dedicated section. \ No newline at end of file diff --git a/docs/content/middlewares/addprefix.md b/docs/content/middlewares/addprefix.md index 0c3ffe998..220b7dccc 100644 --- a/docs/content/middlewares/addprefix.md +++ b/docs/content/middlewares/addprefix.md @@ -38,13 +38,22 @@ labels: - "traefik.http.middlewares.add-foo.addprefix.prefix=/foo" ``` -```toml tab="File" +```toml tab="File (TOML)" # Prefixing with /foo [http.middlewares] [http.middlewares.add-foo.addPrefix] prefix = "/foo" ``` +```yaml tab="File (YAML)" +# Prefixing with /foo +http: + middlewares: + add-foo: + addPrefix: + prefix: "/foo" +``` + ## Configuration Options ### `prefix` diff --git a/docs/content/middlewares/basicauth.md b/docs/content/middlewares/basicauth.md index b132eec2c..83f97d0cb 100644 --- a/docs/content/middlewares/basicauth.md +++ b/docs/content/middlewares/basicauth.md @@ -44,7 +44,7 @@ labels: - "traefik.http.middlewares.test-auth.basicauth.users=test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/,test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0" ``` -```toml tab="File" +```toml tab="File (TOML)" # Declaring the user list [http.middlewares] [http.middlewares.test-auth.basicAuth] @@ -54,6 +54,17 @@ labels: ] ``` +```yaml tab="File (YAML)" +# Declaring the user list +http: + middlewares: + test-auth: + basicAuth: + users: + - "test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/" + - "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0" +``` + ## Configuration Options ### General @@ -119,12 +130,21 @@ spec: } ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares.my-auth.basicAuth] # ... headerField = "X-WebAuth-User" ``` +```yaml tab="File (YAML)" +http: + middlewares: + my-auth: + basicAuth: + # ... + headerField: "X-WebAuth-User" +``` + ### `removeHeader` Set the `removeHeader` option to `true` to remove the authorization header before forwarding the request to your service. (Default value is `false`.) diff --git a/docs/content/middlewares/buffering.md b/docs/content/middlewares/buffering.md index c29ec3991..28e25489f 100644 --- a/docs/content/middlewares/buffering.md +++ b/docs/content/middlewares/buffering.md @@ -42,13 +42,22 @@ labels: - "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=250000" ``` -```toml tab="File" +```toml tab="File (TOML)" # Sets the maximum request body to 2Mb [http.middlewares] [http.middlewares.limit.buffering] maxRequestBodyBytes = 250000 ``` +```yaml tab="File (YAML)" +# Sets the maximum request body to 2Mb +http: + middlewares: + limit: + buffering: + maxRequestBodyBytes: 250000 +``` + ## Configuration Options ### `maxRequestBodyBytes` @@ -77,7 +86,7 @@ You can have the Buffering middleware replay the request with the help of the `r !!! example "Retries once in case of a network error" - ``` + ```toml retryExpression = "IsNetworkError() && Attempts() < 2" ``` diff --git a/docs/content/middlewares/chain.md b/docs/content/middlewares/chain.md index 09b16ad95..8ad38f7dd 100644 --- a/docs/content/middlewares/chain.md +++ b/docs/content/middlewares/chain.md @@ -108,7 +108,7 @@ labels: - "http.services.service1.loadbalancer.server.port=80" ``` -```toml tab="File" +```toml tab="File (TOML)" # ... [http.routers] [http.routers.router1] @@ -135,3 +135,43 @@ labels: [[http.services.service1.loadBalancer.servers]] url = "http://127.0.0.1:80" ``` + +```yaml tab="File (YAML)" +# ... +http: + routers: + router1: + service: service1 + middlewares: + - secured + rule: "Host(`mydomain`)" + + middlewares: + secured: + chain: + middlewares: + - https-only + - known-ips + - auth-users + + auth-users: + basicAuth: + users: + - "test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/" + + https-only: + redirectScheme: + scheme: https + + known-ips: + ipWhiteList: + sourceRange: + - "192.168.1.7" + - "127.0.0.1/32" + + services: + service1: + loadBalancer: + servers: + - url: "http://127.0.0.1:80" +``` diff --git a/docs/content/middlewares/circuitbreaker.md b/docs/content/middlewares/circuitbreaker.md index 1d837a5ed..03f2c0c19 100644 --- a/docs/content/middlewares/circuitbreaker.md +++ b/docs/content/middlewares/circuitbreaker.md @@ -52,13 +52,22 @@ labels: - "traefik.http.middlewares.latency-check.circuitbreaker.expression=LatencyAtQuantileMS(50.0) > 100" ``` -```toml tab="File" +```toml tab="File (TOML)" # Latency Check [http.middlewares] [http.middlewares.latency-check.circuitBreaker] expression = "LatencyAtQuantileMS(50.0) > 100" ``` +```yaml tab="File (YAML)" +# Latency Check +http: + middlewares: + latency-check: + circuitBreaker: + expression: "LatencyAtQuantileMS(50.0) > 100" +``` + ## Possible States There are three possible states for your circuit breaker: diff --git a/docs/content/middlewares/compress.md b/docs/content/middlewares/compress.md index 67d0b7b08..a1b07b84e 100644 --- a/docs/content/middlewares/compress.md +++ b/docs/content/middlewares/compress.md @@ -37,12 +37,20 @@ labels: - "traefik.http.middlewares.test-compress.compress=true" ``` -```toml tab="File" +```toml tab="File (TOML)" # Enable gzip compression [http.middlewares] [http.middlewares.test-compress.compress] ``` +```yaml tab="File (YAML)" +# Enable gzip compression +http: + middlewares: + test-compress: + compress: {} +``` + ## Notes Responses are compressed when: diff --git a/docs/content/middlewares/digestauth.md b/docs/content/middlewares/digestauth.md index d0d00d22b..7af3a5390 100644 --- a/docs/content/middlewares/digestauth.md +++ b/docs/content/middlewares/digestauth.md @@ -38,7 +38,7 @@ labels: - "traefik.http.middlewares.test-auth.digestauth.users=test:traefik:a2688e031edb4be6a3797f3882655c05,test2:traefik:518845800f9e2bfb1f1f740ec24f074e" ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares] [http.middlewares.test-auth.digestAuth] users = [ @@ -47,6 +47,16 @@ labels: ] ``` +```yaml tab="File (YAML)" +http: + middlewares: + test-auth: + digestAuth: + users: + - "test:traefik:a2688e031edb4be6a3797f3882655c05" + - "test2:traefik:518845800f9e2bfb1f1f740ec24f074e" +``` + !!! tip Use `htdigest` to generate passwords. @@ -115,12 +125,21 @@ labels: } ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares.my-auth.digestAuth] # ... headerField = "X-WebAuth-User" ``` +```yaml tab="File (YAML)" +http: + middlewares: + my-auth: + digestAuth: + # ... + headerField: "X-WebAuth-User" +``` + ### `removeHeader` Set the `removeHeader` option to `true` to remove the authorization header before forwarding the request to your service. (Default value is `false`.) diff --git a/docs/content/middlewares/errorpages.md b/docs/content/middlewares/errorpages.md index 601d73b5c..29ee280ba 100644 --- a/docs/content/middlewares/errorpages.md +++ b/docs/content/middlewares/errorpages.md @@ -49,7 +49,7 @@ labels: - "traefik.http.middlewares.test-errorpage.errors.query=/{status}.html" ``` -```toml tab="File" +```toml tab="File (TOML)" # Custom Error Page for 5XX [http.middlewares] [http.middlewares.test-errorpage.errors] @@ -61,6 +61,21 @@ labels: # ... definition of error-handler-service and my-service ``` +```yaml tab="File (YAML)" +# Custom Error Page for 5XX +http: + middlewares: + test-errorpage: + errors: + status: + - "500-599" + service: serviceError + query: "/{status}.html" + +[http.services] + # ... definition of error-handler-service and my-service +``` + !!! note In this example, the error page URL is based on the status code (`query=/{status}.html)`. diff --git a/docs/content/middlewares/forwardauth.md b/docs/content/middlewares/forwardauth.md index 7c96bbd9b..29c02b7a8 100644 --- a/docs/content/middlewares/forwardauth.md +++ b/docs/content/middlewares/forwardauth.md @@ -69,7 +69,7 @@ labels: - "traefik.http.middlewares.test-auth.forwardauth.trustForwardHeader=true" ``` -```toml tab="File" +```toml tab="File (TOML)" # Forward authentication to authserver.com [http.middlewares] [http.middlewares.test-auth.forwardAuth] @@ -84,6 +84,24 @@ labels: key = "path/to/foo.key" ``` +```yaml tab="File (YAML)" +# Forward authentication to authserver.com +http: + middlewares: + test-auth: + forwardAuth: + address: "https://authserver.com/auth" + trustForwardHeader: true + authResponseHeaders: + - "X-Auth-User" + - "X-Secret" + tls: + ca: "path/to/local.crt" + caOptional: true + cert: "path/to/foo.cert" + key: "path/to/foo.key" +``` + ## Configuration Options ### `address` diff --git a/docs/content/middlewares/headers.md b/docs/content/middlewares/headers.md index 716d49525..47b1e0305 100644 --- a/docs/content/middlewares/headers.md +++ b/docs/content/middlewares/headers.md @@ -16,7 +16,7 @@ Add the `X-Script-Name` header to the proxied request and the `X-Custom-Response ```yaml tab="Docker" labels: - "traefik.http.middlewares.testHeader.headers.customrequestheaders.X-Script-Name=test" -- "traefik.http.middlewares.testHeader.headers.customresponseheaders.X-Custom-Response-Header=True" +- "traefik.http.middlewares.testHeader.headers.customresponseheaders.X-Custom-Response-Header=value" ``` ```yaml tab="Kubernetes" @@ -29,29 +29,40 @@ spec: customRequestHeaders: X-Script-Name: "test" customResponseHeaders: - X-Custom-Response-Header: "True" + X-Custom-Response-Header: "value" ``` ```json tab="Marathon" "labels": { "traefik.http.middlewares.testheader.headers.customrequestheaders.X-Script-Name": "test", - "traefik.http.middlewares.testheader.headers.customresponseheaders.X-Custom-Response-Header": "True" + "traefik.http.middlewares.testheader.headers.customresponseheaders.X-Custom-Response-Header": "value" } ``` ```yaml tab="Rancher" labels: - "traefik.http.middlewares.testheader.headers.customrequestheaders.X-Script-Name=test" -- "traefik.http.middlewares.testheader.headers.customresponseheaders.X-Custom-Response-Header=True" +- "traefik.http.middlewares.testheader.headers.customresponseheaders.X-Custom-Response-Header=value" ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares] [http.middlewares.testHeader.headers] [http.middlewares.testHeader.headers.customRequestHeaders] X-Script-Name = "test" [http.middlewares.testHeader.headers.customResponseHeaders] - X-Custom-Response-Header = "True" + X-Custom-Response-Header = "value" +``` + +```yaml tab="File (YAML)" +http: + middlewares: + testHeader: + headers: + customRequestHeaders: + X-Script-Name: "test" + customResponseHeaders: + X-Custom-Response-Header: "value" ``` ### Adding and Removing Headers @@ -86,7 +97,7 @@ labels: } ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares] [http.middlewares.testHeader.headers] [http.middlewares.testHeader.headers.customRequestHeaders] @@ -96,6 +107,18 @@ labels: X-Custom-Response-Header = "" # Removes ``` +```yaml tab="File (YAML)" +http: + middlewares: + testHeader: + headers: + customRequestHeaders: + X-Script-Name: "test" # Adds + X-Custom-Request-Header: "" # Removes + customResponseHeaders: + X-Custom-Response-Header: "" # Removes +``` + ### Using Security Headers Security related headers (HSTS headers, SSL redirection, Browser XSS filter, etc) can be added and configured per frontend in a similar manner to the custom headers above. @@ -131,13 +154,22 @@ labels: } ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares] [http.middlewares.testHeader.headers] FrameDeny = true SSLRedirect = true ``` +```yaml tab="File (YAML)" +http: + middlewares: + testHeader: + headers: + FrameDeny: true + SSLRedirect: true +``` + ### CORS Headers CORS (Cross-Origin Resource Sharing) headers can be added and configured per frontend in a similar manner to the custom headers above. @@ -184,7 +216,7 @@ labels: } ``` -```toml tab="File" +```toml tab="File (TOML)" [http.middlewares] [http.middlewares.testHeader.headers] accessControlAllowMethods= ["GET", "OPTIONS", "PUT"] @@ -193,6 +225,20 @@ labels: addVaryHeader = true ``` +```yaml tab="File (YAML)" +http: + middlewares: + testHeader: + headers: + accessControlAllowMethod: + - GET + - OPTIONS + - PUT + accessControlAllowOrigin: "origin-list-or-null" + accessControlMaxAge: 100 + addVaryHeader: true +``` + ## Configuration Options ### General diff --git a/docs/content/middlewares/ipwhitelist.md b/docs/content/middlewares/ipwhitelist.md index c39e42b54..869ba0af8 100644 --- a/docs/content/middlewares/ipwhitelist.md +++ b/docs/content/middlewares/ipwhitelist.md @@ -39,13 +39,24 @@ labels: - "traefik.http.middlewares.test-ipwhitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7" ``` -```toml tab="File" +```toml tab="File (TOML)" # Accepts request from defined IP [http.middlewares] [http.middlewares.test-ipwhitelist.ipWhiteList] sourceRange = ["127.0.0.1/32", "192.168.1.7"] ``` +```yaml tab="File (YAML)" +# Accepts request from defined IP +http: + middlewares: + test-ipwhitelist: + ipWhiteList: + sourceRange: + - "127.0.0.1/32" + - "192.168.1.7" +``` + ## Configuration Options ### `sourceRange` @@ -108,7 +119,7 @@ The `depth` option tells Traefik to use the `X-Forwarded-For` header and take th } ``` - ```toml tab="File" + ```toml tab="File (TOML)" # Whitelisting Based on `X-Forwarded-For` with `depth=2` [http.middlewares] [http.middlewares.test-ipwhitelist.ipWhiteList] @@ -116,6 +127,19 @@ The `depth` option tells Traefik to use the `X-Forwarded-For` header and take th [http.middlewares.test-ipwhitelist.ipWhiteList.ipStrategy] depth = 2 ``` + + ```yaml tab="File (YAML)" + # Whitelisting Based on `X-Forwarded-For` with `depth=2` + http: + middlewares: + test-ipwhitelist: + ipWhiteList: + sourceRange: + - "127.0.0.1/32" + - "192.168.1.7" + ipStrategy: + depth: 2 + ``` !!! note @@ -171,10 +195,22 @@ labels: } ``` -```toml tab="File" +```toml tab="File (TOML)" # Exclude from `X-Forwarded-For` [http.middlewares] [http.middlewares.test-ipwhitelist.ipWhiteList] [http.middlewares.test-ipwhitelist.ipWhiteList.ipStrategy] excludedIPs = ["127.0.0.1/32", "192.168.1.7"] ``` + +```yaml tab="File (YAML)" +# Exclude from `X-Forwarded-For` +http: + middlewares: + test-ipwhitelist: + ipWhiteList: + ipStrategy: + excludedIPs: + - "127.0.0.1/32" + - "192.168.1.7" +``` diff --git a/docs/content/middlewares/maxconnection.md b/docs/content/middlewares/maxconnection.md index b0523d790..bfddf30d9 100644 --- a/docs/content/middlewares/maxconnection.md +++ b/docs/content/middlewares/maxconnection.md @@ -37,23 +37,32 @@ labels: - "traefik.http.middlewares.test-maxconn.maxconn.amount=10" ``` -```toml tab="File" +```toml tab="File (TOML)" # Limiting to 10 simultaneous connections [http.middlewares] [http.middlewares.test-maxconn.maxConn] amount = 10 ``` +```yaml tab="File (YAML)" +# Limiting to 10 simultaneous connections +http: + middlewares: + test-maxconn: + maxConn: + amount: 10 +``` + ## Configuration Options ### `amount` The `amount` option defines the maximum amount of allowed simultaneous connections. -The middleware will return an `HTTP 429 Too Many Requests` if there are already `amount` requests in progress (based on the same `extractorfunc` strategy). +The middleware will return an `HTTP 429 Too Many Requests` if there are already `amount` requests in progress (based on the same `extractorFunc` strategy). -### extractorfunc +### `extractorFunc` -The `extractorfunc` defines the strategy used to categorize requests. +The `extractorFunc` defines the strategy used to categorize requests. The possible values are: diff --git a/docs/content/middlewares/overview.md b/docs/content/middlewares/overview.md index e520e2b29..91740e41f 100644 --- a/docs/content/middlewares/overview.md +++ b/docs/content/middlewares/overview.md @@ -79,8 +79,8 @@ labels: - "traefik.http.router.router1.middlewares=foo-add-prefix@rancher" ``` -```toml tab="File" -# As Toml Configuration File +```toml tab="File (TOML)" +# As TOML Configuration File [http.routers] [http.routers.router1] service = "myService" @@ -99,6 +99,28 @@ labels: url = "http://127.0.0.1:80" ``` +```yaml tab="File (YAML)" +# As YAML Configuration File +http: + routers: + router1: + service: myService + middlewares: + - "foo-add-prefix" + rule: "Host(`example.com`)" + + middlewares: + foo-add-prefix: + addPrefix: + prefix: "/foo" + + services: + service1: + loadBalancer: + servers: + - url: "http://127.0.0.1:80" +``` + ## Provider Namespace When you declare a middleware, it lives in its provider namespace. @@ -124,11 +146,19 @@ and therefore this specification would be ignored even if present. Declaring the add-foo-prefix in the file provider. - ```toml + ```toml tab="File (TOML)" [http.middlewares] [http.middlewares.add-foo-prefix.addPrefix] prefix = "/foo" ``` + + ```yaml tab="File (YAML)" + http: + middlewares: + add-foo-prefix: + addPrefix: + prefix: "/foo" + ``` Using the add-foo-prefix middleware from other providers: diff --git a/docs/content/middlewares/passtlsclientcert.md b/docs/content/middlewares/passtlsclientcert.md index 4824845b5..46b6aec36 100644 --- a/docs/content/middlewares/passtlsclientcert.md +++ b/docs/content/middlewares/passtlsclientcert.md @@ -39,13 +39,22 @@ labels: - "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.pem=true" ``` -```toml tab="File" +```toml tab="File (TOML)" # Pass the escaped pem in the `X-Forwarded-Tls-Client-Cert` header. [http.middlewares] [http.middlewares.test-passtlsclientcert.passTLSClientCert] pem = true ``` +```yaml tab="File (YAML)" +# Pass the escaped pem in the `X-Forwarded-Tls-Client-Cert` header. +http: + middlewares: + test-passtlsclientcert: + passTLSClientCert: + pem: true +``` + ??? example "Pass the escaped pem in the `X-Forwarded-Tls-Client-Cert` header" ```yaml tab="Docker" @@ -144,7 +153,7 @@ labels: } ``` - ```toml tab="File" + ```toml tab="File (TOML)" # Pass all the available info in the `X-Forwarded-Tls-Client-Cert-Info` header [http.middlewares] [http.middlewares.test-passtlsclientcert.passTLSClientCert] @@ -170,6 +179,34 @@ labels: domainComponent = true ``` + ```yaml tab="File (YAML)" + # Pass all the available info in the `X-Forwarded-Tls-Client-Cert-Info` header + http: + middlewares: + test-passtlsclientcert: + passTLSClientCert: + info: + notAfter: true + notBefore: true + sans: true + subject: + country: true + province: true + locality: true + organization: true + commonName: true + serialNumber: true + domainComponent: true + issuer: + country: true + province: true + locality: true + organization: true + commonName: true + serialNumber: true + domainComponent: true + ``` + ## Configuration Options ### General diff --git a/docs/content/middlewares/ratelimit.md b/docs/content/middlewares/ratelimit.md index 2194a6f71..fa3856df5 100644 --- a/docs/content/middlewares/ratelimit.md +++ b/docs/content/middlewares/ratelimit.md @@ -73,12 +73,12 @@ labels: ``` -```toml tab="File" +```toml tab="File (TOML)" # Here, an average of 5 requests every 3 seconds is allowed and an average of 100 requests every 10 seconds. # These can "burst" up to 10 and 200 in each period, respectively. [http.middlewares] [http.middlewares.test-ratelimit.rateLimit] - extractorfunc = "client.ip" + extractorFunc = "client.ip" [http.middlewares.test-ratelimit.rateLimit.rateSet.rate0] period = "10s" @@ -91,11 +91,30 @@ labels: burst = 10 ``` +```yaml tab="File (YAML)" +# Here, an average of 5 requests every 3 seconds is allowed and an average of 100 requests every 10 seconds. +# These can "burst" up to 10 and 200 in each period, respectively. +http: + middlewares: + test-ratelimit: + rateLimit: + extractorFunc: "client.ip" + rateSet: + rate0: + period: "10s" + average: 100 + burst: 200 + rate1: + period: "3s" + average: 5 + burst: 10 +``` + ## Configuration Options -### `extractorfunc` +### `extractorFunc` -The `extractorfunc` option defines the strategy used to categorize requests. +The `extractorFunc` option defines the strategy used to categorize requests. The possible values are: diff --git a/docs/content/middlewares/redirectregex.md b/docs/content/middlewares/redirectregex.md index 6a1d89255..68b9343db 100644 --- a/docs/content/middlewares/redirectregex.md +++ b/docs/content/middlewares/redirectregex.md @@ -42,7 +42,7 @@ labels: - "traefik.http.middlewares.test-redirectregex.redirectregex.replacement=http://mydomain/$1" ``` -```toml tab="File" +```toml tab="File (TOML)" # Redirect with domain replacement [http.middlewares] [http.middlewares.test-redirectregex.redirectRegex] @@ -50,6 +50,16 @@ labels: replacement = "http://mydomain/$1" ``` +```yaml tab="File (YAML)" +# Redirect with domain replacement +http: + middlewares: + test-redirectregex: + redirectRegex: + regex: "^http://localhost/(.*)" + replacement: "http://mydomain/$1" +``` + ## Configuration Options ### `permanent` diff --git a/docs/content/middlewares/redirectscheme.md b/docs/content/middlewares/redirectscheme.md index d658e3c7b..65a01c823 100644 --- a/docs/content/middlewares/redirectscheme.md +++ b/docs/content/middlewares/redirectscheme.md @@ -38,13 +38,22 @@ labels: - "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https" ``` -```toml tab="File" +```toml tab="File (TOML)" # Redirect to https [http.middlewares] [http.middlewares.test-redirectscheme.redirectScheme] scheme = "https" ``` +```yaml tab="File (YAML)" +# Redirect to https +http: + middlewares: + test-redirectscheme: + redirectScheme: + scheme: https +``` + ## Configuration Options ### `permanent` diff --git a/docs/content/middlewares/replacepath.md b/docs/content/middlewares/replacepath.md index d8c1a771f..b491c8033 100644 --- a/docs/content/middlewares/replacepath.md +++ b/docs/content/middlewares/replacepath.md @@ -38,13 +38,22 @@ labels: - "traefik.http.middlewares.test-replacepath.replacepath.path=/foo" ``` -```toml tab="File" +```toml tab="File (TOML)" # Replace the path by /foo [http.middlewares] [http.middlewares.test-replacepath.replacePath] path = "/foo" ``` +```yaml tab="File (YAML)" +# Replace the path by /foo +http: + middlewares: + test-replacepath: + replacePath: + path: "/foo" +``` + ## Configuration Options ### General diff --git a/docs/content/middlewares/replacepathregex.md b/docs/content/middlewares/replacepathregex.md index 3c8e242d9..fbdb47f0d 100644 --- a/docs/content/middlewares/replacepathregex.md +++ b/docs/content/middlewares/replacepathregex.md @@ -42,7 +42,7 @@ labels: - "traefik.http.middlewares.test-replacepathregex.replacepathregex.replacement=/bar/$1" ``` -```toml tab="File" +```toml tab="File (TOML)" # Redirect with domain replacement [http.middlewares] [http.middlewares.test-replacepathregex.replacePathRegex] @@ -50,6 +50,16 @@ labels: replacement = "/bar/$1" ``` +```yaml tab="File (YAML)" +# Redirect with domain replacement +http: + middlewares: + test-replacepathregex: + replacePathRegex: + regex: "^/foo/(.*)" + replacement: "/bar/$1" +``` + ## Configuration Options ### General diff --git a/docs/content/middlewares/retry.md b/docs/content/middlewares/retry.md index d07c0aebf..439cb9cbf 100644 --- a/docs/content/middlewares/retry.md +++ b/docs/content/middlewares/retry.md @@ -38,13 +38,22 @@ labels: - "traefik.http.middlewares.test-retry.retry.attempts=4" ``` -```toml tab="File" +```toml tab="File (TOML)" # Retry to send request 4 times [http.middlewares] [http.middlewares.test-retry.retry] attempts = 4 ``` +```yaml tab="File (YAML)" +# Retry to send request 4 times +http: + middlewares: + test-retry: + retry: + attempts: 4 +``` + ## Configuration Options ### `attempts` diff --git a/docs/content/middlewares/stripprefix.md b/docs/content/middlewares/stripprefix.md index 0b7ff50f7..8b2fe0ab2 100644 --- a/docs/content/middlewares/stripprefix.md +++ b/docs/content/middlewares/stripprefix.md @@ -40,13 +40,24 @@ labels: - "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=/foobar, /fiibar" ``` -```toml tab="File" +```toml tab="File (TOML)" # Strip prefix /foobar and /fiibar [http.middlewares] [http.middlewares.test-stripprefix.stripPrefix] prefixes = ["/foobar", "/fiibar"] ``` +```yaml tab="File (YAML)" +# Strip prefix /foobar and /fiibar +http: + middlewares: + test-stripprefix: + stripPrefix: + prefixes: + - "/foobar" + - "/fiibar" +``` + ## Configuration Options ### General diff --git a/docs/content/middlewares/stripprefixregex.md b/docs/content/middlewares/stripprefixregex.md index e51e4ccdc..f6a6451aa 100644 --- a/docs/content/middlewares/stripprefixregex.md +++ b/docs/content/middlewares/stripprefixregex.md @@ -38,11 +38,20 @@ labels: - "traefik.http.middlewares.test-stripprefixregex.stripprefixregex.regex=^/foo/(.*)", ``` -```toml tab="File" +```toml tab="File (TOML)" # Replace the path by /foo [http.middlewares] [http.middlewares.test-stripprefixregex.stripPrefixRegex] - regex: "^/foo/(.*)" + regex = "^/foo/(.*)" +``` + +```yaml tab="File (YAML)" +# Replace the path by /foo +http: + middlewares: + test-stripprefixregex: + stripPrefixRegex: + regex: "^/foo/(.*)" ``` ## Configuration Options diff --git a/docs/content/observability/access-logs.md b/docs/content/observability/access-logs.md index d3e8dfe4a..00a29cf79 100644 --- a/docs/content/observability/access-logs.md +++ b/docs/content/observability/access-logs.md @@ -9,12 +9,16 @@ By default, logs are written to stdout, in text format. To enable the access logs: -```toml tab="File" +```toml tab="File (TOML)" [accessLog] ``` +```yaml tab="File (YAML)" +accessLog: {} +``` + ```bash tab="CLI" ---accesslog +--accesslog=true ``` ### `filePath` @@ -41,16 +45,23 @@ To write the logs in an asynchronous fashion, specify a `bufferingSize` option. This option represents the number of log lines Traefik will keep in memory before writing them to the selected output. In some cases, this option can greatly help performances. -```toml tab="File" +```toml tab="File (TOML)" # Configuring a buffer of 100 lines [accessLog] filePath = "/path/to/access.log" bufferingSize = 100 ``` +```yaml tab="File (YAML)" +# Configuring a buffer of 100 lines +accessLog: + filePath: "/path/to/access.log" + bufferingSize: 100 +``` + ```bash tab="CLI" # Configuring a buffer of 100 lines ---accesslog +--accesslog=true --accesslog.filepath="/path/to/access.log" --accesslog.bufferingsize=100 ``` @@ -66,11 +77,11 @@ The available filters are: - `retryAttempts`, to keep the access logs when at least one retry has happened - `minDuration`, to keep access logs when requests take longer than the specified duration -```toml tab="File" +```toml tab="File (TOML)" # Configuring Multiple Filters [accessLog] -filePath = "/path/to/access.log" -format = "json" + filePath = "/path/to/access.log" + format = "json" [accessLog.filters] statusCodes = ["200", "300-302"] @@ -78,9 +89,22 @@ format = "json" minDuration = "10ms" ``` +```yaml tab="File (YAML)" +# Configuring Multiple Filters +accessLog: + filePath: "/path/to/access.log" + format: json + filters: + statusCodes: + - "200" + - "300-302" + retryAttempts: true + minDuration: "10ms" +``` + ```bash tab="CLI" # Configuring Multiple Filters ---accesslog +--accesslog=true --accesslog.filepath="/path/to/access.log" --accesslog.format="json" --accesslog.filters.statuscodes="200, 300-302" @@ -100,7 +124,7 @@ Each field can be set to: The `defaultMode` for `fields.header` is `drop`. -```toml tab="File" +```toml tab="File (TOML)" # Limiting the Logs to Specific Fields [accessLog] filePath = "/path/to/access.log" @@ -121,9 +145,27 @@ The `defaultMode` for `fields.header` is `drop`. "Content-Type" = "keep" ``` +```yaml tab="File (YAML)" +# Limiting the Logs to Specific Fields +accessLog: + filePath: "/path/to/access.log" + format: json + fields: + defaultMode: keep + fields: + names: + ClientUsername: drop + headers: + defaultMode: keep + names: + - User-Agent: redact + - Authorization: drop + - Content-Type: keep +``` + ```bash tab="CLI" # Limiting the Logs to Specific Fields ---accesslog +--accesslog=true --accesslog.filepath="/path/to/access.log" --accesslog.format="json" --accesslog.fields.defaultmode="keep" diff --git a/docs/content/observability/logs.md b/docs/content/observability/logs.md index 6d8027676..712052de9 100644 --- a/docs/content/observability/logs.md +++ b/docs/content/observability/logs.md @@ -16,12 +16,18 @@ Traefik logs concern everything that happens to Traefik itself (startup, configu By default, the logs are written to the standard output. You can configure a file path instead using the `filePath` option. -```toml tab="File" +```toml tab="File (TOML)" # Writing Logs to a File [log] filePath = "/path/to/traefik.log" ``` +```yaml tab="File (YAML)" +# Writing Logs to a File +log: + filePath: "/path/to/traefik.log" +``` + ```bash tab="CLI" # Writing Logs to a File --log.filePath="/path/to/traefik.log" @@ -31,11 +37,18 @@ You can configure a file path instead using the `filePath` option. By default, the logs use a text format (`common`), but you can also ask for the `json` format in the `format` option. -```toml tab="File" +```toml tab="File (TOML)" # Writing Logs to a File, in JSON [log] filePath = "/path/to/log-file.log" - format = "json" + format = "json" +``` + +```yaml tab="File (YAML)" +# Writing Logs to a File, in JSON +log: + filePath: "/path/to/log-file.log" + format: json ``` ```bash tab="CLI" @@ -48,11 +61,16 @@ By default, the logs use a text format (`common`), but you can also ask for the By default, the `level` is set to `ERROR`. Alternative logging levels are `DEBUG`, `PANIC`, `FATAL`, `ERROR`, `WARN`, and `INFO`. -```toml tab="File" +```toml tab="File (TOML)" [log] level = "DEBUG" ``` +```yaml tab="File (YAML)" +log: + level: DEBUG +``` + ```bash tab="CLI" --log.level="DEBUG" ``` diff --git a/docs/content/observability/metrics/datadog.md b/docs/content/observability/metrics/datadog.md index 242103d3b..00af98c58 100644 --- a/docs/content/observability/metrics/datadog.md +++ b/docs/content/observability/metrics/datadog.md @@ -7,9 +7,13 @@ To enable the DataDog: [metrics.dataDog] ``` +```yaml tab="File (YAML)" +metrics: + dataDog: {} +``` + ```bash tab="CLI" ---metrics ---metrics.datadog +--metrics.datadog=true ``` #### `address` @@ -24,14 +28,13 @@ Address instructs exporter to send metrics to datadog-agent at this address. address = "127.0.0.1:8125" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: dataDog: address: 127.0.0.1:8125 ``` ```bash tab="CLI" ---metrics --metrics.datadog.address="127.0.0.1:8125" ``` @@ -47,14 +50,13 @@ Enable metrics on entry points. addEntryPointsLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: dataDog: addEntryPointsLabels: true ``` ```bash tab="CLI" ---metrics --metrics.datadog.addEntryPointsLabels=true ``` @@ -70,14 +72,13 @@ Enable metrics on services. addServicesLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: dataDog: addServicesLabels: true ``` ```bash tab="CLI" ---metrics --metrics.datadog.addServicesLabels=true ``` @@ -93,14 +94,13 @@ The interval used by the exporter to push metrics to datadog-agent. pushInterval = 10s ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: dataDog: pushInterval: 10s ``` ```bash tab="CLI" ---metrics --metrics.datadog.pushInterval=10s ``` diff --git a/docs/content/observability/metrics/influxdb.md b/docs/content/observability/metrics/influxdb.md index 7fa367630..c7e0a93c0 100644 --- a/docs/content/observability/metrics/influxdb.md +++ b/docs/content/observability/metrics/influxdb.md @@ -7,14 +7,13 @@ To enable the InfluxDB: [metrics.influxdb] ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: {} ``` ```bash tab="CLI" ---metrics ---metrics.influxdb +--metrics.influxdb=true ``` #### `address` @@ -29,14 +28,13 @@ Address instructs exporter to send metrics to influxdb at this address. address = "localhost:8089" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: address: localhost:8089 ``` ```bash tab="CLI" ---metrics --metrics.influxdb.address="localhost:8089" ``` @@ -52,14 +50,13 @@ InfluxDB's address protocol (udp or http). protocol = "upd" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: protocol: udp ``` ```bash tab="CLI" ---metrics --metrics.influxdb.protocol="udp" ``` @@ -75,14 +72,13 @@ InfluxDB database used when protocol is http. database = "" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: database: "" ``` ```bash tab="CLI" ---metrics --metrics.influxdb.database="" ``` @@ -98,14 +94,13 @@ InfluxDB retention policy used when protocol is http. retentionPolicy = "" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: retentionPolicy: "" ``` ```bash tab="CLI" ---metrics --metrics.influxdb.retentionPolicy="" ``` @@ -121,14 +116,13 @@ InfluxDB username (only with http). username = "" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: username: "" ``` ```bash tab="CLI" ---metrics --metrics.influxdb.username="" ``` @@ -144,14 +138,13 @@ InfluxDB password (only with http). password = "" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: password: "" ``` ```bash tab="CLI" ---metrics --metrics.influxdb.password="" ``` @@ -167,14 +160,13 @@ Enable metrics on entry points. addEntryPointsLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: addEntryPointsLabels: true ``` ```bash tab="CLI" ---metrics --metrics.influxdb.addEntryPointsLabels=true ``` @@ -190,14 +182,13 @@ Enable metrics on services. addServicesLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: addServicesLabels: true ``` ```bash tab="CLI" ---metrics --metrics.influxdb.addServicesLabels=true ``` @@ -213,13 +204,12 @@ The interval used by the exporter to push metrics to influxdb. pushInterval = 10s ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: influxdb: pushInterval: 10s ``` ```bash tab="CLI" ---metrics --metrics.influxdb.pushInterval=10s ``` diff --git a/docs/content/observability/metrics/overview.md b/docs/content/observability/metrics/overview.md index f266c6b8c..f7d148fbf 100644 --- a/docs/content/observability/metrics/overview.md +++ b/docs/content/observability/metrics/overview.md @@ -17,10 +17,10 @@ To enable metrics: [metrics] ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: {} ``` ```bash tab="CLI" ---metrics +--metrics=true ``` diff --git a/docs/content/observability/metrics/prometheus.md b/docs/content/observability/metrics/prometheus.md index 8ffd46cf1..ac8a43dc3 100644 --- a/docs/content/observability/metrics/prometheus.md +++ b/docs/content/observability/metrics/prometheus.md @@ -7,14 +7,13 @@ To enable the Prometheus: [metrics.prometheus] ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: prometheus: {} ``` ```bash tab="CLI" ---metrics ---metrics.prometheus +--metrics.prometheus=true ``` #### `buckets` @@ -29,7 +28,7 @@ Buckets for latency metrics. buckets = [0.1,0.3,1.2,5.0] ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: prometheus: buckets: @@ -40,7 +39,6 @@ metrics: ``` ```bash tab="CLI" ---metrics --metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000 ``` @@ -56,14 +54,13 @@ Enable metrics on entry points. addEntryPointsLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: prometheus: addEntryPointsLabels: true ``` ```bash tab="CLI" ---metrics --metrics.prometheus.addEntryPointsLabels=true ``` @@ -79,13 +76,12 @@ Enable metrics on services. addServicesLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: prometheus: addServicesLabels: true ``` ```bash tab="CLI" ---metrics --metrics.prometheus.addServicesLabels=true ``` diff --git a/docs/content/observability/metrics/statsd.md b/docs/content/observability/metrics/statsd.md index f4160878d..b7624101b 100644 --- a/docs/content/observability/metrics/statsd.md +++ b/docs/content/observability/metrics/statsd.md @@ -7,14 +7,13 @@ To enable the Statsd: [metrics.statsd] ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: statsd: {} ``` ```bash tab="CLI" ---metrics ---metrics.statsd +--metrics.statsd=true ``` #### `address` @@ -29,14 +28,13 @@ Address instructs exporter to send metrics to statsd at this address. address = "localhost:8125" ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: statsd: address: localhost:8125 ``` ```bash tab="CLI" ---metrics --metrics.statsd.address="localhost:8125" ``` @@ -52,14 +50,13 @@ Enable metrics on entry points. addEntryPointsLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: statsd: addEntryPointsLabels: true ``` ```bash tab="CLI" ---metrics --metrics.statsd.addEntryPointsLabels=true ``` @@ -75,14 +72,13 @@ Enable metrics on services. addServicesLabels = true ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: statsd: addServicesLabels: true ``` ```bash tab="CLI" ---metrics --metrics.statsd.addServicesLabels=true ``` @@ -98,13 +94,12 @@ The interval used by the exporter to push metrics to statsD. pushInterval = 10s ``` -```yaml tab="File (TOML)" +```yaml tab="File (YAML)" metrics: statsd: pushInterval: 10s ``` ```bash tab="CLI" ---metrics --metrics.statsd.pushInterval=10s ``` diff --git a/docs/content/observability/tracing/datadog.md b/docs/content/observability/tracing/datadog.md index 92da66d7b..5f3ed46b5 100644 --- a/docs/content/observability/tracing/datadog.md +++ b/docs/content/observability/tracing/datadog.md @@ -13,8 +13,7 @@ tracing: ``` ```bash tab="CLI" ---tracing ---tracing.datadog +--tracing.datadog=true ``` #### `localAgentHostPort` @@ -36,7 +35,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.datadog.localAgentHostPort="127.0.0.1:8126" ``` @@ -59,7 +57,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.datadog.debug=true ``` @@ -82,7 +79,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.datadog.globalTag="sample" ``` @@ -106,6 +102,5 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.datadog.prioritySampling=true ``` diff --git a/docs/content/observability/tracing/haystack.md b/docs/content/observability/tracing/haystack.md index 86557c220..eb32bea21 100644 --- a/docs/content/observability/tracing/haystack.md +++ b/docs/content/observability/tracing/haystack.md @@ -13,8 +13,7 @@ tracing: ``` ```bash tab="CLI" ---tracing ---tracing.haystack +--tracing.haystack=true ``` #### `localAgentHost` @@ -36,7 +35,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.haystack.localAgentHost="127.0.0.1" ``` @@ -59,7 +57,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.haystack.localAgentPort=42699 ``` @@ -82,7 +79,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.haystack.globalTag="sample:test" ``` @@ -105,7 +101,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.haystack.traceIDHeaderName="sample" ``` @@ -128,7 +123,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.haystack.parentIDHeaderName="sample" ``` @@ -151,7 +145,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.haystack.spanIDHeaderName=sample:test ``` @@ -175,6 +168,5 @@ tracing: ```bash tab="CLI" ---tracing --tracing.haystack.baggagePrefixHeaderName="sample" ``` diff --git a/docs/content/observability/tracing/instana.md b/docs/content/observability/tracing/instana.md index 27daa3304..b4e5d78e1 100644 --- a/docs/content/observability/tracing/instana.md +++ b/docs/content/observability/tracing/instana.md @@ -13,8 +13,7 @@ tracing: ``` ```bash tab="CLI" ---tracing ---tracing.instana +--tracing.instana=true ``` #### `localAgentHost` @@ -36,7 +35,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.instana.localAgentHost="127.0.0.1" ``` @@ -59,7 +57,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.instana.localAgentPort=42699 ``` @@ -89,6 +86,5 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.instana.logLevel="info" ``` diff --git a/docs/content/observability/tracing/jaeger.md b/docs/content/observability/tracing/jaeger.md index 0979ff6e1..a95975db1 100644 --- a/docs/content/observability/tracing/jaeger.md +++ b/docs/content/observability/tracing/jaeger.md @@ -13,8 +13,7 @@ tracing: ``` ```bash tab="CLI" ---tracing ---tracing.jaeger +--tracing.jaeger=true ``` !!! warning @@ -40,7 +39,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.samplingServerURL="http://localhost:5778/sampling" ``` @@ -63,7 +61,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.samplingType="const" ``` @@ -92,7 +89,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.samplingParam="1.0" ``` @@ -115,7 +111,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.localAgentHostPort="127.0.0.1:6831" ``` @@ -138,7 +133,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.gen128Bit ``` @@ -165,7 +159,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.propagation="jaeger" ``` @@ -189,7 +182,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.traceContextHeaderName="uber-trace-id" ``` @@ -214,7 +206,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.collector.endpoint="http://127.0.0.1:14268/api/traces?format=jaeger.thrift" ``` @@ -238,7 +229,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.collector.user="my-user" ``` @@ -262,6 +252,5 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.jaeger.collector.password="my-password" ``` diff --git a/docs/content/observability/tracing/overview.md b/docs/content/observability/tracing/overview.md index 4b0ad2cba..543f0a354 100644 --- a/docs/content/observability/tracing/overview.md +++ b/docs/content/observability/tracing/overview.md @@ -30,7 +30,7 @@ tracing: {} ``` ```bash tab="CLI" ---tracing +--tracing=true ``` ### Common Options @@ -52,7 +52,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.serviceName="traefik" ``` @@ -76,6 +75,5 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.spanNameLimit=150 ``` diff --git a/docs/content/observability/tracing/zipkin.md b/docs/content/observability/tracing/zipkin.md index dc2665e85..101040566 100644 --- a/docs/content/observability/tracing/zipkin.md +++ b/docs/content/observability/tracing/zipkin.md @@ -13,8 +13,7 @@ tracing: ``` ```bash tab="CLI" ---tracing ---tracing.zipkin +--tracing.zipkin=true ``` #### `httpEndpoint` @@ -36,7 +35,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.zipkin.httpEndpoint="http://localhost:9411/api/v1/spans" ``` @@ -59,7 +57,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.zipkin.debug=true ``` @@ -82,7 +79,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.zipkin.sameSpan=true ``` @@ -105,7 +101,6 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.zipkin.id128Bit=false ``` @@ -128,6 +123,5 @@ tracing: ``` ```bash tab="CLI" ---tracing --tracing.zipkin.sampleRate="0.2" ``` \ No newline at end of file diff --git a/docs/content/operations/api.md b/docs/content/operations/api.md index 2cbba5862..1cae400b5 100644 --- a/docs/content/operations/api.md +++ b/docs/content/operations/api.md @@ -29,12 +29,16 @@ would be to apply the following protection mechanisms: To enable the API handler: -```toml tab="File" +```toml tab="File (TOML)" [api] ``` +```yaml tab="File (YAML)" +api: {} +``` + ```bash tab="CLI" ---api +--api=true ``` ### `dashboard` @@ -43,13 +47,18 @@ _Optional, Default=true_ Enable the dashboard. More about the dashboard features [here](./dashboard.md). -```toml tab="File" +```toml tab="File (TOML)" [api] dashboard = true ``` +```yaml tab="File (YAML)" +api: + dashboard: true +``` + ```bash tab="CLI" ---api.dashboard +--api.dashboard=true ``` ### `debug` @@ -58,11 +67,16 @@ _Optional, Default=false_ Enable additional endpoints for debugging and profiling, served under `/debug/`. -```toml tab="File" +```toml tab="File (TOML)" [api] debug = true ``` +```yaml tab="File (YAML)" +api: + debug: true +``` + ```bash tab="CLI" --api.debug=true ``` diff --git a/docs/content/operations/dashboard.md b/docs/content/operations/dashboard.md index a867c1976..c0443c199 100644 --- a/docs/content/operations/dashboard.md +++ b/docs/content/operations/dashboard.md @@ -29,38 +29,39 @@ By default, the dashboard is available on `/` on port `:8080`. To enable the dashboard, you need to enable Traefik's API. -??? example "Using the Command Line" +```toml tab="File (TOML)" +[api] + # Dashboard + # + # Optional + # Default: true + # + dashboard = true +``` - | Option | Values | Default Value | - | --------------- | --------------- | --------------------: | - | --api | \[true\|false\] | false | - | --api.dashboard | \[true\|false\] | true when api is true | - - {!more-on-command-line.md!} +```yaml tab="File (YAML)" +api: + # Dashboard + # + # Optional + # Default: true + # + dashboard: true +``` -??? example "Using the Configuration File" +```bash tab="CLI" +# Dashboard +# +# Optional +# Default: true +# +--api.dashboard=true +``` - ```toml - [api] - # Dashboard - # - # Optional - # Default: true - # - dashboard = true - ``` - - {!more-on-configuration-file.md!} +{!more-on-command-line.md!} -??? example "Using a Key/Value Store" +{!more-on-configuration-file.md!} - | Key | Values | Default Value | - | ------------- | --------------- | --------------------: | - | api | \[true\|false\] | false | - | api.dashboard | \[true\|false\] | true when api is true | - - {!more-on-key-value-store.md!} - !!! tip "Did You Know?" The API provides more features than the Dashboard. To learn more about it, refer to the `Traefik's API documentation`(TODO: add doc and link). diff --git a/docs/content/operations/ping.md b/docs/content/operations/ping.md index 6200f2739..deee3d641 100644 --- a/docs/content/operations/ping.md +++ b/docs/content/operations/ping.md @@ -7,9 +7,17 @@ Checking the Health of Your Traefik Instances ??? example "Enabling /ping" - ```toml - [ping] - ``` +```toml tab="File (TOML)" +[ping] +``` + +```yaml tab="File (YAML)" +ping: {} +``` + +```bash tab="CLI" +--ping=true +``` | Path | Method | Description | |---------|---------------|-----------------------------------------------------------------------------------------------------| diff --git a/docs/content/providers/docker.md b/docs/content/providers/docker.md index e532496ff..6e20e5e4b 100644 --- a/docs/content/providers/docker.md +++ b/docs/content/providers/docker.md @@ -26,7 +26,7 @@ Attach labels to your containers and let Traefik do the rest! ``` ```bash tab="CLI" - --providers.docker + --providers.docker=true ``` Attaching labels to containers (in your docker compose file) @@ -65,7 +65,7 @@ Attach labels to your containers and let Traefik do the rest! ```bash tab="CLI" --providers.docker.endpoint="tcp://127.0.0.1:2375" - --providers.docker.swarmMode + --providers.docker.swarmMode=true ``` Attach labels to services (not to containers) while in Swarm mode (in your docker compose file) @@ -331,7 +331,7 @@ providers: ``` ```bash tab="CLI" ---providers.docker.swarmMode +--providers.docker.swarmMode=true # ... ``` diff --git a/docs/content/providers/kubernetes-ingress.md b/docs/content/providers/kubernetes-ingress.md index a6de09424..ca0978d44 100644 --- a/docs/content/providers/kubernetes-ingress.md +++ b/docs/content/providers/kubernetes-ingress.md @@ -20,7 +20,7 @@ providers: ``` ```bash tab="CLI" ---providers.kubernetesingress +--providers.kubernetesingress=true ``` The provider then watches for incoming ingresses events, such as the example below, and derives the corresponding dynamic configuration from it, which in turn will create the resulting routers, services, handlers, etc. diff --git a/docs/content/providers/marathon.md b/docs/content/providers/marathon.md index b2c851541..e19e9877c 100644 --- a/docs/content/providers/marathon.md +++ b/docs/content/providers/marathon.md @@ -21,7 +21,7 @@ See also [Marathon user guide](../user-guides/marathon.md). ``` ```bash tab="CLI" - --providers.marathon + --providers.marathon=true ``` Attaching labels to marathon applications diff --git a/docs/content/providers/rancher.md b/docs/content/providers/rancher.md index ea74e39bd..f3aa97121 100644 --- a/docs/content/providers/rancher.md +++ b/docs/content/providers/rancher.md @@ -28,7 +28,7 @@ Attach labels to your services and let Traefik do the rest! ``` ```bash tab="CLI" - --providers.rancher + --providers.rancher=true ``` Attaching labels to services @@ -55,6 +55,8 @@ Attach labels to your services and let Traefik do the rest! --8<-- "content/providers/rancher.txt" ``` +List of all available labels for the [dynamic](../reference/dynamic-configuration/rancher.md) configuration references. + ### `exposedByDefault` _Optional, Default=true_ diff --git a/docs/content/providers/rancher.toml b/docs/content/providers/rancher.toml index b209fb8cb..e809d737d 100644 --- a/docs/content/providers/rancher.toml +++ b/docs/content/providers/rancher.toml @@ -11,7 +11,7 @@ enableServiceHealthFilter = true # Defines the polling interval (in seconds). - refreshSeconds = true + refreshSeconds = 15 # Poll the Rancher metadata service for changes every `rancher.refreshSeconds`, which is less accurate intervalPoll = false diff --git a/docs/content/providers/rancher.txt b/docs/content/providers/rancher.txt index daf9db4ce..be28f4d99 100644 --- a/docs/content/providers/rancher.txt +++ b/docs/content/providers/rancher.txt @@ -1,5 +1,5 @@ # Enable Rancher Provider. ---providers.rancher +--providers.rancher=true # Expose Rancher services by default in Traefik. --providers.rancher.exposedByDefault=true @@ -11,7 +11,7 @@ --providers.rancher.enableServiceHealthFilter=true # Defines the polling interval (in seconds). ---providers.rancher.refreshSeconds=true +--providers.rancher.refreshSeconds=15 # Poll the Rancher metadata service for changes every `rancher.refreshSeconds`, which is less accurate --providers.rancher.intervalPoll=false diff --git a/docs/content/providers/rancher.yml b/docs/content/providers/rancher.yml index 9db978da2..bc9d57fff 100644 --- a/docs/content/providers/rancher.yml +++ b/docs/content/providers/rancher.yml @@ -12,7 +12,7 @@ providers: enableServiceHealthFilter: true # Defines the polling interval (in seconds). - refreshSeconds: true + refreshSeconds: 15 # Poll the Rancher metadata service for changes every `rancher.refreshSeconds`, which is less accurate intervalPoll: false diff --git a/docs/content/reference/dynamic-configuration/docker-labels.yml b/docs/content/reference/dynamic-configuration/docker-labels.yml new file mode 100644 index 000000000..29541203f --- /dev/null +++ b/docs/content/reference/dynamic-configuration/docker-labels.yml @@ -0,0 +1,177 @@ +- "traefik.http.middlewares.middleware00.addprefix.prefix=foobar" +- "traefik.http.middlewares.middleware01.basicauth.headerfield=foobar" +- "traefik.http.middlewares.middleware01.basicauth.realm=foobar" +- "traefik.http.middlewares.middleware01.basicauth.removeheader=true" +- "traefik.http.middlewares.middleware01.basicauth.users=foobar, foobar" +- "traefik.http.middlewares.middleware01.basicauth.usersfile=foobar" +- "traefik.http.middlewares.middleware02.buffering.maxrequestbodybytes=42" +- "traefik.http.middlewares.middleware02.buffering.maxresponsebodybytes=42" +- "traefik.http.middlewares.middleware02.buffering.memrequestbodybytes=42" +- "traefik.http.middlewares.middleware02.buffering.memresponsebodybytes=42" +- "traefik.http.middlewares.middleware02.buffering.retryexpression=foobar" +- "traefik.http.middlewares.middleware03.chain.middlewares=foobar, foobar" +- "traefik.http.middlewares.middleware04.circuitbreaker.expression=foobar" +- "traefik.http.middlewares.middleware05.compress=true" +- "traefik.http.middlewares.middleware06.digestauth.headerfield=foobar" +- "traefik.http.middlewares.middleware06.digestauth.realm=foobar" +- "traefik.http.middlewares.middleware06.digestauth.removeheader=true" +- "traefik.http.middlewares.middleware06.digestauth.users=foobar, foobar" +- "traefik.http.middlewares.middleware06.digestauth.usersfile=foobar" +- "traefik.http.middlewares.middleware07.errors.query=foobar" +- "traefik.http.middlewares.middleware07.errors.service=foobar" +- "traefik.http.middlewares.middleware07.errors.status=foobar, foobar" +- "traefik.http.middlewares.middleware08.forwardauth.address=foobar" +- "traefik.http.middlewares.middleware08.forwardauth.authresponseheaders=foobar, foobar" +- "traefik.http.middlewares.middleware08.forwardauth.tls.ca=foobar" +- "traefik.http.middlewares.middleware08.forwardauth.tls.caoptional=true" +- "traefik.http.middlewares.middleware08.forwardauth.tls.cert=foobar" +- "traefik.http.middlewares.middleware08.forwardauth.tls.insecureskipverify=true" +- "traefik.http.middlewares.middleware08.forwardauth.tls.key=foobar" +- "traefik.http.middlewares.middleware08.forwardauth.trustforwardheader=true" +- "traefik.http.middlewares.middleware09.headers.accesscontrolallowcredentials=true" +- "traefik.http.middlewares.middleware09.headers.accesscontrolallowheaders=foobar, foobar" +- "traefik.http.middlewares.middleware09.headers.accesscontrolallowmethods=foobar, foobar" +- "traefik.http.middlewares.middleware09.headers.accesscontrolalloworigin=foobar" +- "traefik.http.middlewares.middleware09.headers.accesscontrolexposeheaders=foobar, foobar" +- "traefik.http.middlewares.middleware09.headers.accesscontrolmaxage=42" +- "traefik.http.middlewares.middleware09.headers.addvaryheader=true" +- "traefik.http.middlewares.middleware09.headers.allowedhosts=foobar, foobar" +- "traefik.http.middlewares.middleware09.headers.browserxssfilter=true" +- "traefik.http.middlewares.middleware09.headers.contentsecuritypolicy=foobar" +- "traefik.http.middlewares.middleware09.headers.contenttypenosniff=true" +- "traefik.http.middlewares.middleware09.headers.custombrowserxssvalue=foobar" +- "traefik.http.middlewares.middleware09.headers.customframeoptionsvalue=foobar" +- "traefik.http.middlewares.middleware09.headers.customrequestheaders.name0=foobar" +- "traefik.http.middlewares.middleware09.headers.customrequestheaders.name1=foobar" +- "traefik.http.middlewares.middleware09.headers.customresponseheaders.name0=foobar" +- "traefik.http.middlewares.middleware09.headers.customresponseheaders.name1=foobar" +- "traefik.http.middlewares.middleware09.headers.forcestsheader=true" +- "traefik.http.middlewares.middleware09.headers.framedeny=true" +- "traefik.http.middlewares.middleware09.headers.hostsproxyheaders=foobar, foobar" +- "traefik.http.middlewares.middleware09.headers.isdevelopment=true" +- "traefik.http.middlewares.middleware09.headers.publickey=foobar" +- "traefik.http.middlewares.middleware09.headers.referrerpolicy=foobar" +- "traefik.http.middlewares.middleware09.headers.sslforcehost=true" +- "traefik.http.middlewares.middleware09.headers.sslhost=foobar" +- "traefik.http.middlewares.middleware09.headers.sslproxyheaders.name0=foobar" +- "traefik.http.middlewares.middleware09.headers.sslproxyheaders.name1=foobar" +- "traefik.http.middlewares.middleware09.headers.sslredirect=true" +- "traefik.http.middlewares.middleware09.headers.ssltemporaryredirect=true" +- "traefik.http.middlewares.middleware09.headers.stsincludesubdomains=true" +- "traefik.http.middlewares.middleware09.headers.stspreload=true" +- "traefik.http.middlewares.middleware09.headers.stsseconds=42" +- "traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.depth=42" +- "traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.excludedips=foobar, foobar" +- "traefik.http.middlewares.middleware10.ipwhitelist.sourcerange=foobar, foobar" +- "traefik.http.middlewares.middleware11.maxconn.amount=42" +- "traefik.http.middlewares.middleware11.maxconn.extractorfunc=foobar" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.commonname=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.country=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.domaincomponent=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.locality=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.organization=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.province=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.serialnumber=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.notafter=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.notbefore=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.sans=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.commonname=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.country=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.domaincomponent=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.locality=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.organization=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.province=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.serialnumber=true" +- "traefik.http.middlewares.middleware12.passtlsclientcert.pem=true" +- "traefik.http.middlewares.middleware13.redirectregex.permanent=true" +- "traefik.http.middlewares.middleware13.redirectregex.regex=foobar" +- "traefik.http.middlewares.middleware13.redirectregex.replacement=foobar" +- "traefik.http.middlewares.middleware14.redirectscheme.permanent=true" +- "traefik.http.middlewares.middleware14.redirectscheme.port=foobar" +- "traefik.http.middlewares.middleware14.redirectscheme.scheme=foobar" +- "traefik.http.middlewares.middleware15.replacepath.path=foobar" +- "traefik.http.middlewares.middleware16.replacepathregex.regex=foobar" +- "traefik.http.middlewares.middleware16.replacepathregex.replacement=foobar" +- "traefik.http.middlewares.middleware17.retry.attempts=42" +- "traefik.http.middlewares.middleware18.stripprefix.prefixes=foobar, foobar" +- "traefik.http.middlewares.middleware19.stripprefixregex.regex=foobar, foobar" +- "traefik.http.routers.router0.entrypoints=foobar, foobar" +- "traefik.http.routers.router0.middlewares=foobar, foobar" +- "traefik.http.routers.router0.priority=42" +- "traefik.http.routers.router0.rule=foobar" +- "traefik.http.routers.router0.service=foobar" +- "traefik.http.routers.router0.tls=true" +- "traefik.http.routers.router0.tls.certresolver=foobar" +- "traefik.http.routers.router0.tls.domains[0].main=foobar" +- "traefik.http.routers.router0.tls.domains[0].sans=foobar, foobar" +- "traefik.http.routers.router0.tls.domains[1].main=foobar" +- "traefik.http.routers.router0.tls.domains[1].sans=foobar, foobar" +- "traefik.http.routers.router0.tls.options=foobar" +- "traefik.http.routers.router1.entrypoints=foobar, foobar" +- "traefik.http.routers.router1.middlewares=foobar, foobar" +- "traefik.http.routers.router1.priority=42" +- "traefik.http.routers.router1.rule=foobar" +- "traefik.http.routers.router1.service=foobar" +- "traefik.http.routers.router1.tls=true" +- "traefik.http.routers.router1.tls.certresolver=foobar" +- "traefik.http.routers.router1.tls.domains[0].main=foobar" +- "traefik.http.routers.router1.tls.domains[0].sans=foobar, foobar" +- "traefik.http.routers.router1.tls.domains[1].main=foobar" +- "traefik.http.routers.router1.tls.domains[1].sans=foobar, foobar" +- "traefik.http.routers.router1.tls.options=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.headers.name0=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.headers.name1=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.hostname=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.interval=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.path=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.port=42" +- "traefik.http.services.service0.loadbalancer.healthcheck.scheme=foobar" +- "traefik.http.services.service0.loadbalancer.healthcheck.timeout=foobar" +- "traefik.http.services.service0.loadbalancer.passhostheader=true" +- "traefik.http.services.service0.loadbalancer.responseforwarding.flushinterval=foobar" +- "traefik.http.services.service0.loadbalancer.stickiness=true" +- "traefik.http.services.service0.loadbalancer.stickiness.cookiename=foobar" +- "traefik.http.services.service0.loadbalancer.stickiness.httponlycookie=true" +- "traefik.http.services.service0.loadbalancer.stickiness.securecookie=true" +- "traefik.http.services.service0.loadbalancer.server.port=foobar" +- "traefik.http.services.service0.loadbalancer.server.scheme=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.headers.name0=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.headers.name1=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.hostname=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.interval=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.path=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.port=42" +- "traefik.http.services.service1.loadbalancer.healthcheck.scheme=foobar" +- "traefik.http.services.service1.loadbalancer.healthcheck.timeout=foobar" +- "traefik.http.services.service1.loadbalancer.passhostheader=true" +- "traefik.http.services.service1.loadbalancer.responseforwarding.flushinterval=foobar" +- "traefik.http.services.service1.loadbalancer.stickiness=true" +- "traefik.http.services.service1.loadbalancer.stickiness.cookiename=foobar" +- "traefik.http.services.service1.loadbalancer.stickiness.httponlycookie=true" +- "traefik.http.services.service1.loadbalancer.stickiness.securecookie=true" +- "traefik.http.services.service1.loadbalancer.server.port=foobar" +- "traefik.http.services.service1.loadbalancer.server.scheme=foobar" +- "traefik.tcp.routers.tcprouter0.entrypoints=foobar, foobar" +- "traefik.tcp.routers.tcprouter0.rule=foobar" +- "traefik.tcp.routers.tcprouter0.service=foobar" +- "traefik.tcp.routers.tcprouter0.tls=true" +- "traefik.tcp.routers.tcprouter0.tls.certresolver=foobar" +- "traefik.tcp.routers.tcprouter0.tls.domains[0].main=foobar" +- "traefik.tcp.routers.tcprouter0.tls.domains[0].sans=foobar, foobar" +- "traefik.tcp.routers.tcprouter0.tls.domains[1].main=foobar" +- "traefik.tcp.routers.tcprouter0.tls.domains[1].sans=foobar, foobar" +- "traefik.tcp.routers.tcprouter0.tls.options=foobar" +- "traefik.tcp.routers.tcprouter0.tls.passthrough=true" +- "traefik.tcp.routers.tcprouter1.entrypoints=foobar, foobar" +- "traefik.tcp.routers.tcprouter1.rule=foobar" +- "traefik.tcp.routers.tcprouter1.service=foobar" +- "traefik.tcp.routers.tcprouter1.tls=true" +- "traefik.tcp.routers.tcprouter1.tls.certresolver=foobar" +- "traefik.tcp.routers.tcprouter1.tls.domains[0].main=foobar" +- "traefik.tcp.routers.tcprouter1.tls.domains[0].sans=foobar, foobar" +- "traefik.tcp.routers.tcprouter1.tls.domains[1].main=foobar" +- "traefik.tcp.routers.tcprouter1.tls.domains[1].sans=foobar, foobar" +- "traefik.tcp.routers.tcprouter1.tls.options=foobar" +- "traefik.tcp.routers.tcprouter1.tls.passthrough=true" +- "traefik.tcp.services.tcpservice0.loadbalancer.server.port=foobar" +- "traefik.tcp.services.tcpservice1.loadbalancer.server.port=foobar" diff --git a/docs/content/reference/dynamic-configuration/docker.md b/docs/content/reference/dynamic-configuration/docker.md index 93317e0f1..dd6c4bce1 100644 --- a/docs/content/reference/dynamic-configuration/docker.md +++ b/docs/content/reference/dynamic-configuration/docker.md @@ -7,6 +7,6 @@ The labels are case insensitive. ```yaml labels: ---8<-- "content/reference/dynamic-configuration/docker.yml" ---8<-- "content/reference/dynamic-configuration/labels.yml" + --8<-- "content/reference/dynamic-configuration/docker.yml" + --8<-- "content/reference/dynamic-configuration/docker-labels.yml" ``` diff --git a/docs/content/reference/dynamic-configuration/docker.yml b/docs/content/reference/dynamic-configuration/docker.yml index f91fef5b1..6f9e1c62f 100644 --- a/docs/content/reference/dynamic-configuration/docker.yml +++ b/docs/content/reference/dynamic-configuration/docker.yml @@ -1,3 +1,3 @@ - - "traefik.enable=true" - - "traefik.docker.network=foobar" - - "traefik.docker.lbswarm=true" +- "traefik.enable=true" +- "traefik.docker.network=foobar" +- "traefik.docker.lbswarm=true" diff --git a/docs/content/reference/dynamic-configuration/file.toml b/docs/content/reference/dynamic-configuration/file.toml index b9ada6726..033fe61e4 100644 --- a/docs/content/reference/dynamic-configuration/file.toml +++ b/docs/content/reference/dynamic-configuration/file.toml @@ -8,6 +8,15 @@ priority = 42 [http.routers.Router0.tls] options = "foobar" + certResolver = "foobar" + + [[http.routers.Router0.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] + + [[http.routers.Router0.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] [http.routers.Router1] entryPoints = ["foobar", "foobar"] middlewares = ["foobar", "foobar"] @@ -16,6 +25,15 @@ priority = 42 [http.routers.Router1.tls] options = "foobar" + certResolver = "foobar" + + [[http.routers.Router1.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] + + [[http.routers.Router1.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] [http.services] [http.services.Service0] [http.services.Service0.loadBalancer] @@ -186,31 +204,31 @@ commonName = true serialNumber = true domainComponent = true - [http.middlewares.Middleware14] - [http.middlewares.Middleware14.redirectRegex] + [http.middlewares.Middleware13] + [http.middlewares.Middleware13.redirectRegex] regex = "foobar" replacement = "foobar" permanent = true - [http.middlewares.Middleware15] - [http.middlewares.Middleware15.redirectScheme] + [http.middlewares.Middleware14] + [http.middlewares.Middleware14.redirectScheme] scheme = "foobar" port = "foobar" permanent = true - [http.middlewares.Middleware16] - [http.middlewares.Middleware16.replacePath] + [http.middlewares.Middleware15] + [http.middlewares.Middleware15.replacePath] path = "foobar" - [http.middlewares.Middleware17] - [http.middlewares.Middleware17.replacePathRegex] + [http.middlewares.Middleware16] + [http.middlewares.Middleware16.replacePathRegex] regex = "foobar" replacement = "foobar" - [http.middlewares.Middleware18] - [http.middlewares.Middleware18.retry] + [http.middlewares.Middleware17] + [http.middlewares.Middleware17.retry] attempts = 42 - [http.middlewares.Middleware19] - [http.middlewares.Middleware19.stripPrefix] + [http.middlewares.Middleware18] + [http.middlewares.Middleware18.stripPrefix] prefixes = ["foobar", "foobar"] - [http.middlewares.Middleware20] - [http.middlewares.Middleware20.stripPrefixRegex] + [http.middlewares.Middleware19] + [http.middlewares.Middleware19.stripPrefixRegex] regex = ["foobar", "foobar"] [tcp] @@ -222,6 +240,15 @@ [tcp.routers.TCPRouter0.tls] passthrough = true options = "foobar" + certResolver = "foobar" + + [[tcp.routers.TCPRouter0.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] + + [[tcp.routers.TCPRouter0.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] [tcp.routers.TCPRouter1] entryPoints = ["foobar", "foobar"] service = "foobar" @@ -229,6 +256,15 @@ [tcp.routers.TCPRouter1.tls] passthrough = true options = "foobar" + certResolver = "foobar" + + [[tcp.routers.TCPRouter1.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] + + [[tcp.routers.TCPRouter1.tls.domains]] + main = "foobar" + sans = ["foobar", "foobar"] [tcp.services] [tcp.services.TCPService0] [tcp.services.TCPService0.loadBalancer] @@ -265,14 +301,14 @@ sniStrict = true [tls.options.Options0.clientAuth] caFiles = ["foobar", "foobar"] - clientAuthType = "VerifyClientCertIfGiven" + clientAuthType = "foobar" [tls.options.Options1] minVersion = "foobar" cipherSuites = ["foobar", "foobar"] sniStrict = true [tls.options.Options1.clientAuth] caFiles = ["foobar", "foobar"] - clientAuthType = "VerifyClientCertIfGiven" + clientAuthType = "foobar" [tls.stores] [tls.stores.Store0] [tls.stores.Store0.defaultCertificate] diff --git a/docs/content/reference/dynamic-configuration/file.yaml b/docs/content/reference/dynamic-configuration/file.yaml index b3120bb61..a3e1d9b21 100644 --- a/docs/content/reference/dynamic-configuration/file.yaml +++ b/docs/content/reference/dynamic-configuration/file.yaml @@ -12,6 +12,16 @@ http: priority: 42 tls: options: foobar + certResolver: foobar + domains: + - main: foobar + sans: + - foobar + - foobar + - main: foobar + sans: + - foobar + - foobar Router1: entryPoints: - foobar @@ -24,6 +34,16 @@ http: priority: 42 tls: options: foobar + certResolver: foobar + domains: + - main: foobar + sans: + - foobar + - foobar + - main: foobar + sans: + - foobar + - foobar services: Service0: loadBalancer: @@ -212,32 +232,32 @@ http: commonName: true serialNumber: true domainComponent: true - Middleware14: + Middleware13: redirectRegex: regex: foobar replacement: foobar permanent: true - Middleware15: + Middleware14: redirectScheme: scheme: foobar port: foobar permanent: true - Middleware16: + Middleware15: replacePath: path: foobar - Middleware17: + Middleware16: replacePathRegex: regex: foobar replacement: foobar - Middleware18: + Middleware17: retry: attempts: 42 - Middleware19: + Middleware18: stripPrefix: prefixes: - foobar - foobar - Middleware20: + Middleware19: stripPrefixRegex: regex: - foobar @@ -253,6 +273,16 @@ tcp: tls: passthrough: true options: foobar + certResolver: foobar + domains: + - main: foobar + sans: + - foobar + - foobar + - main: foobar + sans: + - foobar + - foobar TCPRouter1: entryPoints: - foobar @@ -262,6 +292,16 @@ tcp: tls: passthrough: true options: foobar + certResolver: foobar + domains: + - main: foobar + sans: + - foobar + - foobar + - main: foobar + sans: + - foobar + - foobar services: TCPService0: loadBalancer: @@ -295,7 +335,7 @@ tls: caFiles: - foobar - foobar - clientAuthType: VerifyClientCertIfGiven + clientAuthType: foobar sniStrict: true Options1: minVersion: foobar @@ -306,7 +346,7 @@ tls: caFiles: - foobar - foobar - clientAuthType: VerifyClientCertIfGiven + clientAuthType: foobar sniStrict: true stores: Store0: diff --git a/docs/content/reference/dynamic-configuration/labels.yml b/docs/content/reference/dynamic-configuration/labels.yml deleted file mode 100644 index b62c36b2a..000000000 --- a/docs/content/reference/dynamic-configuration/labels.yml +++ /dev/null @@ -1,157 +0,0 @@ - - "traefik.http.middlewares.middleware00.addprefix.prefix=foobar" - - "traefik.http.middlewares.middleware01.basicauth.headerfield=foobar" - - "traefik.http.middlewares.middleware01.basicauth.realm=foobar" - - "traefik.http.middlewares.middleware01.basicauth.removeheader=true" - - "traefik.http.middlewares.middleware01.basicauth.users=foobar, foobar" - - "traefik.http.middlewares.middleware01.basicauth.usersfile=foobar" - - "traefik.http.middlewares.middleware02.buffering.maxrequestbodybytes=42" - - "traefik.http.middlewares.middleware02.buffering.maxresponsebodybytes=42" - - "traefik.http.middlewares.middleware02.buffering.memrequestbodybytes=42" - - "traefik.http.middlewares.middleware02.buffering.memresponsebodybytes=42" - - "traefik.http.middlewares.middleware02.buffering.retryexpression=foobar" - - "traefik.http.middlewares.middleware03.chain.middlewares=foobar, foobar" - - "traefik.http.middlewares.middleware04.circuitbreaker.expression=foobar" - - "traefik.http.middlewares.middleware05.compress=true" - - "traefik.http.middlewares.middleware06.digestauth.headerfield=foobar" - - "traefik.http.middlewares.middleware06.digestauth.realm=foobar" - - "traefik.http.middlewares.middleware06.digestauth.removeheader=true" - - "traefik.http.middlewares.middleware06.digestauth.users=foobar, foobar" - - "traefik.http.middlewares.middleware06.digestauth.usersfile=foobar" - - "traefik.http.middlewares.middleware07.errors.query=foobar" - - "traefik.http.middlewares.middleware07.errors.service=foobar" - - "traefik.http.middlewares.middleware07.errors.status=foobar, foobar" - - "traefik.http.middlewares.middleware08.forwardauth.address=foobar" - - "traefik.http.middlewares.middleware08.forwardauth.authresponseheaders=foobar, foobar" - - "traefik.http.middlewares.middleware08.forwardauth.tls.ca=foobar" - - "traefik.http.middlewares.middleware08.forwardauth.tls.caoptional=true" - - "traefik.http.middlewares.middleware08.forwardauth.tls.cert=foobar" - - "traefik.http.middlewares.middleware08.forwardauth.tls.insecureskipverify=true" - - "traefik.http.middlewares.middleware08.forwardauth.tls.key=foobar" - - "traefik.http.middlewares.middleware08.forwardauth.trustforwardheader=true" - - "traefik.http.middlewares.middleware09.headers.accesscontrolallowcredentials=true" - - "traefik.http.middlewares.middleware09.headers.accesscontrolallowheaders=foobar, foobar" - - "traefik.http.middlewares.middleware09.headers.accesscontrolallowmethods=foobar, foobar" - - "traefik.http.middlewares.middleware09.headers.accesscontrolalloworigin=foobar" - - "traefik.http.middlewares.middleware09.headers.accesscontrolexposeheaders=foobar, foobar" - - "traefik.http.middlewares.middleware09.headers.accesscontrolmaxage=42" - - "traefik.http.middlewares.middleware09.headers.addvaryheader=true" - - "traefik.http.middlewares.middleware09.headers.allowedhosts=foobar, foobar" - - "traefik.http.middlewares.middleware09.headers.browserxssfilter=true" - - "traefik.http.middlewares.middleware09.headers.contentsecuritypolicy=foobar" - - "traefik.http.middlewares.middleware09.headers.contenttypenosniff=true" - - "traefik.http.middlewares.middleware09.headers.custombrowserxssvalue=foobar" - - "traefik.http.middlewares.middleware09.headers.customframeoptionsvalue=foobar" - - "traefik.http.middlewares.middleware09.headers.customrequestheaders.name0=foobar" - - "traefik.http.middlewares.middleware09.headers.customrequestheaders.name1=foobar" - - "traefik.http.middlewares.middleware09.headers.customresponseheaders.name0=foobar" - - "traefik.http.middlewares.middleware09.headers.customresponseheaders.name1=foobar" - - "traefik.http.middlewares.middleware09.headers.forcestsheader=true" - - "traefik.http.middlewares.middleware09.headers.framedeny=true" - - "traefik.http.middlewares.middleware09.headers.hostsproxyheaders=foobar, foobar" - - "traefik.http.middlewares.middleware09.headers.isdevelopment=true" - - "traefik.http.middlewares.middleware09.headers.publickey=foobar" - - "traefik.http.middlewares.middleware09.headers.referrerpolicy=foobar" - - "traefik.http.middlewares.middleware09.headers.sslforcehost=true" - - "traefik.http.middlewares.middleware09.headers.sslhost=foobar" - - "traefik.http.middlewares.middleware09.headers.sslproxyheaders.name0=foobar" - - "traefik.http.middlewares.middleware09.headers.sslproxyheaders.name1=foobar" - - "traefik.http.middlewares.middleware09.headers.sslredirect=true" - - "traefik.http.middlewares.middleware09.headers.ssltemporaryredirect=true" - - "traefik.http.middlewares.middleware09.headers.stsincludesubdomains=true" - - "traefik.http.middlewares.middleware09.headers.stspreload=true" - - "traefik.http.middlewares.middleware09.headers.stsseconds=42" - - "traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.depth=42" - - "traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.excludedips=foobar, foobar" - - "traefik.http.middlewares.middleware10.ipwhitelist.sourcerange=foobar, foobar" - - "traefik.http.middlewares.middleware11.maxconn.amount=42" - - "traefik.http.middlewares.middleware11.maxconn.extractorfunc=foobar" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.commonname=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.country=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.domaincomponent=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.locality=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.organization=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.province=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.serialnumber=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.notafter=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.notbefore=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.sans=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.commonname=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.country=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.domaincomponent=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.locality=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.organization=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.province=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.serialnumber=true" - - "traefik.http.middlewares.middleware12.passtlsclientcert.pem=true" - - "traefik.http.middlewares.middleware14.redirectregex.permanent=true" - - "traefik.http.middlewares.middleware14.redirectregex.regex=foobar" - - "traefik.http.middlewares.middleware14.redirectregex.replacement=foobar" - - "traefik.http.middlewares.middleware15.redirectscheme.permanent=true" - - "traefik.http.middlewares.middleware15.redirectscheme.port=foobar" - - "traefik.http.middlewares.middleware15.redirectscheme.scheme=foobar" - - "traefik.http.middlewares.middleware16.replacepath.path=foobar" - - "traefik.http.middlewares.middleware17.replacepathregex.regex=foobar" - - "traefik.http.middlewares.middleware17.replacepathregex.replacement=foobar" - - "traefik.http.middlewares.middleware18.retry.attempts=42" - - "traefik.http.middlewares.middleware19.stripprefix.prefixes=foobar, foobar" - - "traefik.http.middlewares.middleware20.stripprefixregex.regex=foobar, foobar" - - "traefik.http.routers.router0.entrypoints=foobar, foobar" - - "traefik.http.routers.router0.middlewares=foobar, foobar" - - "traefik.http.routers.router0.priority=42" - - "traefik.http.routers.router0.rule=foobar" - - "traefik.http.routers.router0.service=foobar" - - "traefik.http.routers.router0.tls=true" - - "traefik.http.routers.router0.tls.options=foobar" - - "traefik.http.routers.router1.entrypoints=foobar, foobar" - - "traefik.http.routers.router1.middlewares=foobar, foobar" - - "traefik.http.routers.router1.priority=42" - - "traefik.http.routers.router1.rule=foobar" - - "traefik.http.routers.router1.service=foobar" - - "traefik.http.routers.router1.tls=true" - - "traefik.http.routers.router1.tls.options=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.headers.name0=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.headers.name1=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.hostname=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.interval=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.path=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.port=42" - - "traefik.http.services.service0.loadbalancer.healthcheck.scheme=foobar" - - "traefik.http.services.service0.loadbalancer.healthcheck.timeout=foobar" - - "traefik.http.services.service0.loadbalancer.passhostheader=true" - - "traefik.http.services.service0.loadbalancer.responseforwarding.flushinterval=foobar" - - "traefik.http.services.service0.loadbalancer.stickiness=true" - - "traefik.http.services.service0.loadbalancer.stickiness.cookiename=foobar" - - "traefik.http.services.service0.loadbalancer.stickiness.httponlycookie=true" - - "traefik.http.services.service0.loadbalancer.stickiness.securecookie=true" - - "traefik.http.services.service0.loadbalancer.server.port=foobar" - - "traefik.http.services.service0.loadbalancer.server.scheme=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.headers.name0=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.headers.name1=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.hostname=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.interval=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.path=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.port=42" - - "traefik.http.services.service1.loadbalancer.healthcheck.scheme=foobar" - - "traefik.http.services.service1.loadbalancer.healthcheck.timeout=foobar" - - "traefik.http.services.service1.loadbalancer.passhostheader=true" - - "traefik.http.services.service1.loadbalancer.responseforwarding.flushinterval=foobar" - - "traefik.http.services.service1.loadbalancer.stickiness=true" - - "traefik.http.services.service1.loadbalancer.stickiness.cookiename=foobar" - - "traefik.http.services.service1.loadbalancer.stickiness.httponlycookie=true" - - "traefik.http.services.service1.loadbalancer.stickiness.securecookie=true" - - "traefik.http.services.service1.loadbalancer.server.port=foobar" - - "traefik.http.services.service1.loadbalancer.server.scheme=foobar" - - "traefik.tcp.routers.tcprouter0.entrypoints=foobar, foobar" - - "traefik.tcp.routers.tcprouter0.rule=foobar" - - "traefik.tcp.routers.tcprouter0.service=foobar" - - "traefik.tcp.routers.tcprouter0.tls=true" - - "traefik.tcp.routers.tcprouter0.tls.options=foobar" - - "traefik.tcp.routers.tcprouter0.tls.passthrough=true" - - "traefik.tcp.routers.tcprouter1.entrypoints=foobar, foobar" - - "traefik.tcp.routers.tcprouter1.rule=foobar" - - "traefik.tcp.routers.tcprouter1.service=foobar" - - "traefik.tcp.routers.tcprouter1.tls=true" - - "traefik.tcp.routers.tcprouter1.tls.options=foobar" - - "traefik.tcp.routers.tcprouter1.tls.passthrough=true" - - "traefik.tcp.services.tcpservice0.loadbalancer.server.port=foobar" - - "traefik.tcp.services.tcpservice1.loadbalancer.server.port=foobar" \ No newline at end of file diff --git a/docs/content/reference/dynamic-configuration/marathon-labels.json b/docs/content/reference/dynamic-configuration/marathon-labels.json new file mode 100644 index 000000000..45570105b --- /dev/null +++ b/docs/content/reference/dynamic-configuration/marathon-labels.json @@ -0,0 +1,177 @@ +"traefik.http.middlewares.middleware00.addprefix.prefix": "foobar", +"traefik.http.middlewares.middleware01.basicauth.headerfield": "foobar", +"traefik.http.middlewares.middleware01.basicauth.realm": "foobar", +"traefik.http.middlewares.middleware01.basicauth.removeheader": "true", +"traefik.http.middlewares.middleware01.basicauth.users": "foobar, foobar", +"traefik.http.middlewares.middleware01.basicauth.usersfile": "foobar", +"traefik.http.middlewares.middleware02.buffering.maxrequestbodybytes": "42", +"traefik.http.middlewares.middleware02.buffering.maxresponsebodybytes": "42", +"traefik.http.middlewares.middleware02.buffering.memrequestbodybytes": "42", +"traefik.http.middlewares.middleware02.buffering.memresponsebodybytes": "42", +"traefik.http.middlewares.middleware02.buffering.retryexpression": "foobar", +"traefik.http.middlewares.middleware03.chain.middlewares": "foobar, foobar", +"traefik.http.middlewares.middleware04.circuitbreaker.expression": "foobar", +"traefik.http.middlewares.middleware05.compress": "true", +"traefik.http.middlewares.middleware06.digestauth.headerfield": "foobar", +"traefik.http.middlewares.middleware06.digestauth.realm": "foobar", +"traefik.http.middlewares.middleware06.digestauth.removeheader": "true", +"traefik.http.middlewares.middleware06.digestauth.users": "foobar, foobar", +"traefik.http.middlewares.middleware06.digestauth.usersfile": "foobar", +"traefik.http.middlewares.middleware07.errors.query": "foobar", +"traefik.http.middlewares.middleware07.errors.service": "foobar", +"traefik.http.middlewares.middleware07.errors.status": "foobar, foobar", +"traefik.http.middlewares.middleware08.forwardauth.address": "foobar", +"traefik.http.middlewares.middleware08.forwardauth.authresponseheaders": "foobar, foobar", +"traefik.http.middlewares.middleware08.forwardauth.tls.ca": "foobar", +"traefik.http.middlewares.middleware08.forwardauth.tls.caoptional": "true", +"traefik.http.middlewares.middleware08.forwardauth.tls.cert": "foobar", +"traefik.http.middlewares.middleware08.forwardauth.tls.insecureskipverify": "true", +"traefik.http.middlewares.middleware08.forwardauth.tls.key": "foobar", +"traefik.http.middlewares.middleware08.forwardauth.trustforwardheader": "true", +"traefik.http.middlewares.middleware09.headers.accesscontrolallowcredentials": "true", +"traefik.http.middlewares.middleware09.headers.accesscontrolallowheaders": "foobar, foobar", +"traefik.http.middlewares.middleware09.headers.accesscontrolallowmethods": "foobar, foobar", +"traefik.http.middlewares.middleware09.headers.accesscontrolalloworigin": "foobar", +"traefik.http.middlewares.middleware09.headers.accesscontrolexposeheaders": "foobar, foobar", +"traefik.http.middlewares.middleware09.headers.accesscontrolmaxage": "42", +"traefik.http.middlewares.middleware09.headers.addvaryheader": "true", +"traefik.http.middlewares.middleware09.headers.allowedhosts": "foobar, foobar", +"traefik.http.middlewares.middleware09.headers.browserxssfilter": "true", +"traefik.http.middlewares.middleware09.headers.contentsecuritypolicy": "foobar", +"traefik.http.middlewares.middleware09.headers.contenttypenosniff": "true", +"traefik.http.middlewares.middleware09.headers.custombrowserxssvalue": "foobar", +"traefik.http.middlewares.middleware09.headers.customframeoptionsvalue": "foobar", +"traefik.http.middlewares.middleware09.headers.customrequestheaders.name0": "foobar", +"traefik.http.middlewares.middleware09.headers.customrequestheaders.name1": "foobar", +"traefik.http.middlewares.middleware09.headers.customresponseheaders.name0": "foobar", +"traefik.http.middlewares.middleware09.headers.customresponseheaders.name1": "foobar", +"traefik.http.middlewares.middleware09.headers.forcestsheader": "true", +"traefik.http.middlewares.middleware09.headers.framedeny": "true", +"traefik.http.middlewares.middleware09.headers.hostsproxyheaders": "foobar, foobar", +"traefik.http.middlewares.middleware09.headers.isdevelopment": "true", +"traefik.http.middlewares.middleware09.headers.publickey": "foobar", +"traefik.http.middlewares.middleware09.headers.referrerpolicy": "foobar", +"traefik.http.middlewares.middleware09.headers.sslforcehost": "true", +"traefik.http.middlewares.middleware09.headers.sslhost": "foobar", +"traefik.http.middlewares.middleware09.headers.sslproxyheaders.name0": "foobar", +"traefik.http.middlewares.middleware09.headers.sslproxyheaders.name1": "foobar", +"traefik.http.middlewares.middleware09.headers.sslredirect": "true", +"traefik.http.middlewares.middleware09.headers.ssltemporaryredirect": "true", +"traefik.http.middlewares.middleware09.headers.stsincludesubdomains": "true", +"traefik.http.middlewares.middleware09.headers.stspreload": "true", +"traefik.http.middlewares.middleware09.headers.stsseconds": "42", +"traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.depth": "42", +"traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.excludedips": "foobar, foobar", +"traefik.http.middlewares.middleware10.ipwhitelist.sourcerange": "foobar, foobar", +"traefik.http.middlewares.middleware11.maxconn.amount": "42", +"traefik.http.middlewares.middleware11.maxconn.extractorfunc": "foobar", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.commonname": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.country": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.domaincomponent": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.locality": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.organization": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.province": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.serialnumber": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.notafter": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.notbefore": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.sans": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.commonname": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.country": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.domaincomponent": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.locality": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.organization": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.province": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.serialnumber": "true", +"traefik.http.middlewares.middleware12.passtlsclientcert.pem": "true", +"traefik.http.middlewares.middleware13.redirectregex.permanent": "true", +"traefik.http.middlewares.middleware13.redirectregex.regex": "foobar", +"traefik.http.middlewares.middleware13.redirectregex.replacement": "foobar", +"traefik.http.middlewares.middleware14.redirectscheme.permanent": "true", +"traefik.http.middlewares.middleware14.redirectscheme.port": "foobar", +"traefik.http.middlewares.middleware14.redirectscheme.scheme": "foobar", +"traefik.http.middlewares.middleware15.replacepath.path": "foobar", +"traefik.http.middlewares.middleware16.replacepathregex.regex": "foobar", +"traefik.http.middlewares.middleware16.replacepathregex.replacement": "foobar", +"traefik.http.middlewares.middleware17.retry.attempts": "42", +"traefik.http.middlewares.middleware18.stripprefix.prefixes": "foobar, foobar", +"traefik.http.middlewares.middleware19.stripprefixregex.regex": "foobar, foobar", +"traefik.http.routers.router0.entrypoints": "foobar, foobar", +"traefik.http.routers.router0.middlewares": "foobar, foobar", +"traefik.http.routers.router0.priority": "42", +"traefik.http.routers.router0.rule": "foobar", +"traefik.http.routers.router0.service": "foobar", +"traefik.http.routers.router0.tls": "true", +"traefik.http.routers.router0.tls.certresolver": "foobar", +"traefik.http.routers.router0.tls.domains[0].main": "foobar", +"traefik.http.routers.router0.tls.domains[0].sans": "foobar, foobar", +"traefik.http.routers.router0.tls.domains[1].main": "foobar", +"traefik.http.routers.router0.tls.domains[1].sans": "foobar, foobar", +"traefik.http.routers.router0.tls.options": "foobar", +"traefik.http.routers.router1.entrypoints": "foobar, foobar", +"traefik.http.routers.router1.middlewares": "foobar, foobar", +"traefik.http.routers.router1.priority": "42", +"traefik.http.routers.router1.rule": "foobar", +"traefik.http.routers.router1.service": "foobar", +"traefik.http.routers.router1.tls": "true", +"traefik.http.routers.router1.tls.certresolver": "foobar", +"traefik.http.routers.router1.tls.domains[0].main": "foobar", +"traefik.http.routers.router1.tls.domains[0].sans": "foobar, foobar", +"traefik.http.routers.router1.tls.domains[1].main": "foobar", +"traefik.http.routers.router1.tls.domains[1].sans": "foobar, foobar", +"traefik.http.routers.router1.tls.options": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.headers.name0": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.headers.name1": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.hostname": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.interval": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.path": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.port": "42", +"traefik.http.services.service0.loadbalancer.healthcheck.scheme": "foobar", +"traefik.http.services.service0.loadbalancer.healthcheck.timeout": "foobar", +"traefik.http.services.service0.loadbalancer.passhostheader": "true", +"traefik.http.services.service0.loadbalancer.responseforwarding.flushinterval": "foobar", +"traefik.http.services.service0.loadbalancer.stickiness": "true", +"traefik.http.services.service0.loadbalancer.stickiness.cookiename": "foobar", +"traefik.http.services.service0.loadbalancer.stickiness.httponlycookie": "true", +"traefik.http.services.service0.loadbalancer.stickiness.securecookie": "true", +"traefik.http.services.service0.loadbalancer.server.port": "foobar", +"traefik.http.services.service0.loadbalancer.server.scheme": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.headers.name0": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.headers.name1": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.hostname": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.interval": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.path": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.port": "42", +"traefik.http.services.service1.loadbalancer.healthcheck.scheme": "foobar", +"traefik.http.services.service1.loadbalancer.healthcheck.timeout": "foobar", +"traefik.http.services.service1.loadbalancer.passhostheader": "true", +"traefik.http.services.service1.loadbalancer.responseforwarding.flushinterval": "foobar", +"traefik.http.services.service1.loadbalancer.stickiness": "true", +"traefik.http.services.service1.loadbalancer.stickiness.cookiename": "foobar", +"traefik.http.services.service1.loadbalancer.stickiness.httponlycookie": "true", +"traefik.http.services.service1.loadbalancer.stickiness.securecookie": "true", +"traefik.http.services.service1.loadbalancer.server.port": "foobar", +"traefik.http.services.service1.loadbalancer.server.scheme": "foobar", +"traefik.tcp.routers.tcprouter0.entrypoints": "foobar, foobar", +"traefik.tcp.routers.tcprouter0.rule": "foobar", +"traefik.tcp.routers.tcprouter0.service": "foobar", +"traefik.tcp.routers.tcprouter0.tls": "true", +"traefik.tcp.routers.tcprouter0.tls.certresolver": "foobar", +"traefik.tcp.routers.tcprouter0.tls.domains[0].main": "foobar", +"traefik.tcp.routers.tcprouter0.tls.domains[0].sans": "foobar, foobar", +"traefik.tcp.routers.tcprouter0.tls.domains[1].main": "foobar", +"traefik.tcp.routers.tcprouter0.tls.domains[1].sans": "foobar, foobar", +"traefik.tcp.routers.tcprouter0.tls.options": "foobar", +"traefik.tcp.routers.tcprouter0.tls.passthrough": "true", +"traefik.tcp.routers.tcprouter1.entrypoints": "foobar, foobar", +"traefik.tcp.routers.tcprouter1.rule": "foobar", +"traefik.tcp.routers.tcprouter1.service": "foobar", +"traefik.tcp.routers.tcprouter1.tls": "true", +"traefik.tcp.routers.tcprouter1.tls.certresolver": "foobar", +"traefik.tcp.routers.tcprouter1.tls.domains[0].main": "foobar", +"traefik.tcp.routers.tcprouter1.tls.domains[0].sans": "foobar, foobar", +"traefik.tcp.routers.tcprouter1.tls.domains[1].main": "foobar", +"traefik.tcp.routers.tcprouter1.tls.domains[1].sans": "foobar, foobar", +"traefik.tcp.routers.tcprouter1.tls.options": "foobar", +"traefik.tcp.routers.tcprouter1.tls.passthrough": "true", +"traefik.tcp.services.tcpservice0.loadbalancer.server.port": "foobar", +"traefik.tcp.services.tcpservice1.loadbalancer.server.port": "foobar" diff --git a/docs/content/reference/dynamic-configuration/marathon.json b/docs/content/reference/dynamic-configuration/marathon.json new file mode 100644 index 000000000..131344a7e --- /dev/null +++ b/docs/content/reference/dynamic-configuration/marathon.json @@ -0,0 +1,2 @@ +"traefik.enable": "true", +"traefik.marathon.ipaddressidx": "42", diff --git a/docs/content/reference/dynamic-configuration/marathon.md b/docs/content/reference/dynamic-configuration/marathon.md index a1d3d3da9..6d4e17c23 100644 --- a/docs/content/reference/dynamic-configuration/marathon.md +++ b/docs/content/reference/dynamic-configuration/marathon.md @@ -3,8 +3,9 @@ Dynamic configuration with Marathon Labels {: .subtitle } -```yaml -labels: ---8<-- "content/reference/dynamic-configuration/marathon.yml" ---8<-- "content/reference/dynamic-configuration/labels.yml" +```json +"labels": { + --8<-- "content/reference/dynamic-configuration/marathon.json" + --8<-- "content/reference/dynamic-configuration/marathon-labels.json" +} ``` diff --git a/docs/content/reference/dynamic-configuration/marathon.yml b/docs/content/reference/dynamic-configuration/marathon.yml deleted file mode 100644 index d6adde450..000000000 --- a/docs/content/reference/dynamic-configuration/marathon.yml +++ /dev/null @@ -1,2 +0,0 @@ - - "traefik.enable=true" - - "traefik.marathon.ipaddressidx=42" diff --git a/docs/content/reference/dynamic-configuration/rancher.md b/docs/content/reference/dynamic-configuration/rancher.md new file mode 100644 index 000000000..c6cd56736 --- /dev/null +++ b/docs/content/reference/dynamic-configuration/rancher.md @@ -0,0 +1,12 @@ +# Rancher Configuration Reference + +Dynamic configuration with Rancher Labels +{: .subtitle } + +The labels are case insensitive. + +```yaml +labels: + --8<-- "content/reference/dynamic-configuration/rancher.yml" + --8<-- "content/reference/dynamic-configuration/docker-labels.yml" +``` diff --git a/docs/content/reference/dynamic-configuration/rancher.yml b/docs/content/reference/dynamic-configuration/rancher.yml new file mode 100644 index 000000000..23efc00c6 --- /dev/null +++ b/docs/content/reference/dynamic-configuration/rancher.yml @@ -0,0 +1 @@ +- "traefik.enable=true" diff --git a/docs/content/reference/static-configuration/file.toml b/docs/content/reference/static-configuration/file.toml index 62f07e451..8c75d5170 100644 --- a/docs/content/reference/static-configuration/file.toml +++ b/docs/content/reference/static-configuration/file.toml @@ -96,7 +96,6 @@ labelSelector = "foobar" ingressClass = "foobar" [providers.rest] - entryPoint = "foobar" [providers.rancher] constraints = "foobar" watch = true @@ -108,18 +107,12 @@ prefix = "foobar" [api] - entryPoint = "foobar" dashboard = true debug = true - middlewares = ["foobar", "foobar"] - [api.statistics] - recentErrors = 42 [metrics] [metrics.prometheus] buckets = [42.0, 42.0] - entryPoint = "foobar" - middlewares = ["foobar", "foobar"] addEntryPointsLabels = true addServicesLabels = true [metrics.dataDog] @@ -144,8 +137,6 @@ addServicesLabels = true [ping] - entryPoint = "foobar" - middlewares = ["foobar", "foobar"] [log] level = "foobar" @@ -219,25 +210,32 @@ resolvConfig = "foobar" resolvDepth = 42 -[acme] - email = "foobar" - caServer = "foobar" - storage = "foobar" - entryPoint = "foobar" - keyType = "foobar" - [acme.dnsChallenge] - provider = "foobar" - delayBeforeCheck = 42 - resolvers = ["foobar", "foobar"] - disablePropagationCheck = true - [acme.httpChallenge] - entryPoint = "foobar" - [acme.tlsChallenge] - - [[acme.domains]] - main = "foobar" - sans = ["foobar", "foobar"] - - [[acme.domains]] - main = "foobar" - sans = ["foobar", "foobar"] +[certificatesResolvers] + [certificatesResolvers.CertificateResolver0] + [certificatesResolvers.CertificateResolver0.acme] + email = "foobar" + caServer = "foobar" + storage = "foobar" + keyType = "foobar" + [certificatesResolvers.CertificateResolver0.acme.dnsChallenge] + provider = "foobar" + delayBeforeCheck = 42 + resolvers = ["foobar", "foobar"] + disablePropagationCheck = true + [certificatesResolvers.CertificateResolver0.acme.httpChallenge] + entryPoint = "foobar" + [certificatesResolvers.CertificateResolver0.acme.tlsChallenge] + [certificatesResolvers.CertificateResolver1] + [certificatesResolvers.CertificateResolver1.acme] + email = "foobar" + caServer = "foobar" + storage = "foobar" + keyType = "foobar" + [certificatesResolvers.CertificateResolver1.acme.dnsChallenge] + provider = "foobar" + delayBeforeCheck = 42 + resolvers = ["foobar", "foobar"] + disablePropagationCheck = true + [certificatesResolvers.CertificateResolver1.acme.httpChallenge] + entryPoint = "foobar" + [certificatesResolvers.CertificateResolver1.acme.tlsChallenge] diff --git a/docs/content/reference/static-configuration/file.yaml b/docs/content/reference/static-configuration/file.yaml index bfb44c68e..f6a91a75c 100644 --- a/docs/content/reference/static-configuration/file.yaml +++ b/docs/content/reference/static-configuration/file.yaml @@ -102,8 +102,7 @@ providers: - foobar labelSelector: foobar ingressClass: foobar - rest: - entryPoint: foobar + rest: {} rancher: constraints: foobar watch: true @@ -114,23 +113,13 @@ providers: intervalPoll: true prefix: foobar api: - entryPoint: foobar dashboard: true debug: true - statistics: - recentErrors: 42 - middlewares: - - foobar - - foobar metrics: prometheus: buckets: - 42 - 42 - entryPoint: foobar - middlewares: - - foobar - - foobar addEntryPointsLabels: true addServicesLabels: true dataDog: @@ -153,11 +142,7 @@ metrics: password: foobar addEntryPointsLabels: true addServicesLabels: true -ping: - entryPoint: foobar - middlewares: - - foobar - - foobar +ping: {} log: level: foobar filePath: foobar @@ -228,28 +213,36 @@ hostResolver: cnameFlattening: true resolvConfig: foobar resolvDepth: 42 -acme: - email: foobar - caServer: foobar - storage: foobar - entryPoint: foobar - keyType: foobar - dnsChallenge: - provider: foobar - delayBeforeCheck: 42 - resolvers: - - foobar - - foobar - disablePropagationCheck: true - httpChallenge: - entryPoint: foobar - tlsChallenge: {} - domains: - - main: foobar - sans: - - foobar - - foobar - - main: foobar - sans: - - foobar - - foobar +certificatesResolvers: + CertificateResolver0: + acme: + email: foobar + caServer: foobar + storage: foobar + keyType: foobar + dnsChallenge: + provider: foobar + delayBeforeCheck: 42 + resolvers: + - foobar + - foobar + disablePropagationCheck: true + httpChallenge: + entryPoint: foobar + tlsChallenge: {} + CertificateResolver1: + acme: + email: foobar + caServer: foobar + storage: foobar + keyType: foobar + dnsChallenge: + provider: foobar + delayBeforeCheck: 42 + resolvers: + - foobar + - foobar + disablePropagationCheck: true + httpChallenge: + entryPoint: foobar + tlsChallenge: {} diff --git a/docs/content/routing/routers/index.md b/docs/content/routing/routers/index.md index 8ba971c97..1245c3000 100644 --- a/docs/content/routing/routers/index.md +++ b/docs/content/routing/routers/index.md @@ -287,10 +287,6 @@ Traefik will terminate the SSL connections (meaning that it will send decrypted !!! note "HTTPS & ACME" In the current version, with [ACME](../../https/acme.md) enabled, automatic certificate generation will apply to every router declaring a TLS section. - -!!! note "Passthrough" - - On TCP routers, you can configure a passthrough option so that Traefik doesn't terminate the TLS connection. !!! important "Routers for HTTP & HTTPS" @@ -463,7 +459,7 @@ http: ``` [ACME v2](https://community.letsencrypt.org/t/acme-v2-and-wildcard-certificate-support-is-live/55579) supports wildcard certificates. -As described in [Let's Encrypt's post](https://community.letsencrypt.org/t/staging-endpoint-for-acme-v2/49605) wildcard certificates can only be generated through a [`DNS-01` challenge](./../../https/acme.md#dnschallenge). +As described in [Let's Encrypt's post](https://community.letsencrypt.org/t/staging-endpoint-for-acme-v2/49605) wildcard certificates can only be generated through a [`DNS-01` challenge](../../https/acme.md#dnschallenge). Most likely the root domain should receive a certificate too, so it needs to be specified as SAN and 2 `DNS-01` challenges are executed. In this case the generated DNS TXT record for both domains is the same. @@ -471,10 +467,10 @@ Even though this behavior is [DNS RFC](https://community.letsencrypt.org/t/wildc it can lead to problems as all DNS providers keep DNS records cached for a given time (TTL) and this TTL can be greater than the challenge timeout making the `DNS-01` challenge fail. The Traefik ACME client library [LEGO](https://github.com/go-acme/lego) supports some but not all DNS providers to work around this issue. -The [Supported `provider` table](./../../https/acme.md#providers) indicates if they allow generating certificates for a wildcard domain and its root domain. +The [Supported `provider` table](../../https/acme.md#providers) indicates if they allow generating certificates for a wildcard domain and its root domain. !!! note - Wildcard certificates can only be verified through a `DNS-01` challenge. + Wildcard certificates can only be verified through a [`DNS-01` challenge](../../https/acme.md#dnschallenge). !!! note "Double Wildcard Certificates" It is not possible to request a double wildcard certificate for a domain (for example `*.*.local.com`). diff --git a/docs/content/user-guides/grpc.md b/docs/content/user-guides/grpc.md index 9012add8e..6748445df 100644 --- a/docs/content/user-guides/grpc.md +++ b/docs/content/user-guides/grpc.md @@ -34,7 +34,7 @@ api: {} ```yaml tab="CLI" --entryPoints.web.address=":80" --providers.file.filename=dynamic_conf.toml ---api +--api=true ``` `dynamic_conf.{toml,yml}`: @@ -157,7 +157,7 @@ api: {} # For secure connection on backend.local --serversTransport.rootCAs=./backend.cert --providers.file.filename=dynamic_conf.toml ---api +--api=true ``` `dynamic_conf.{toml,yml}`: diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 15191156b..44eff35fc 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -146,7 +146,7 @@ nav: - 'Data Collection': 'contributing/data-collection.md' - 'Advocating': 'contributing/advocating.md' - 'Maintainers': 'contributing/maintainers.md' - - 'Glossary': 'glossary.md' +# - 'Glossary': 'glossary.md' - 'References': - 'Static Configuration': - 'Overview': 'reference/static-configuration/overview.md' @@ -154,7 +154,8 @@ nav: - 'CLI': 'reference/static-configuration/cli.md' - 'Environment variables': 'reference/static-configuration/env.md' - 'Dynamic Configuration': - - 'Docker': 'reference/dynamic-configuration/docker.md' - - 'Marathon': 'reference/dynamic-configuration/marathon.md' - - 'Kubernetes CRD': 'reference/dynamic-configuration/kubernetes-crd.md' - 'File': 'reference/dynamic-configuration/file.md' + - 'Docker': 'reference/dynamic-configuration/docker.md' + - 'Kubernetes CRD': 'reference/dynamic-configuration/kubernetes-crd.md' + - 'Marathon': 'reference/dynamic-configuration/marathon.md' + - 'Rancher': 'reference/dynamic-configuration/rancher.md' diff --git a/traefik.sample.toml b/traefik.sample.toml index 57c90e9ac..bdc001eaf 100644 --- a/traefik.sample.toml +++ b/traefik.sample.toml @@ -1,6 +1,7 @@ ################################################################ # -# Configuration sample for Traefik v2 +# Configuration sample for Traefik v2. +# # For Traefik v1: https://github.com/containous/traefik/blob/v1.7/traefik.sample.toml # ################################################################ @@ -22,7 +23,10 @@ # Default: [entryPoints] [entryPoints.web] - address = ":80" + address = ":80" + + [entryPoints.websecure] + address = ":443" ################################################################ # Traefik logs configuration @@ -35,27 +39,27 @@ # [log] -# Log level -# -# Optional -# Default: "ERROR" -# -# level = "DEBUG" + # Log level + # + # Optional + # Default: "ERROR" + # + # level = "DEBUG" -# Sets the filepath for the traefik log. If not specified, stdout will be used. -# Intermediate directories are created if necessary. -# -# Optional -# Default: os.Stdout -# -# filePath = "log/traefik.log" + # Sets the filepath for the traefik log. If not specified, stdout will be used. + # Intermediate directories are created if necessary. + # + # Optional + # Default: os.Stdout + # + # filePath = "log/traefik.log" -# Format is either "json" or "common". -# -# Optional -# Default: "common" -# -# format = "common" + # Format is either "json" or "common". + # + # Optional + # Default: "common" + # + # format = "json" ################################################################ # Access logs configuration @@ -69,20 +73,20 @@ # # [accessLog] -# Sets the file path for the access log. If not specified, stdout will be used. -# Intermediate directories are created if necessary. -# -# Optional -# Default: os.Stdout -# -# filePath = "/path/to/log/log.txt" + # Sets the file path for the access log. If not specified, stdout will be used. + # Intermediate directories are created if necessary. + # + # Optional + # Default: os.Stdout + # + # filePath = "/path/to/log/log.txt" -# Format is either "json" or "common". -# -# Optional -# Default: "common" -# -# format = "common" + # Format is either "json" or "common". + # + # Optional + # Default: "common" + # + # format = "json" ################################################################ # API and dashboard configuration @@ -126,23 +130,23 @@ # Enable Docker configuration backend [providers.docker] -# Docker server endpoint. Can be a tcp or a unix socket endpoint. -# -# Required -# Default: "unix:///var/run/docker.sock" -# -# endpoint = "tcp://10.10.10.10:2375" + # Docker server endpoint. Can be a tcp or a unix socket endpoint. + # + # Required + # Default: "unix:///var/run/docker.sock" + # + # endpoint = "tcp://10.10.10.10:2375" -# Default host rule. -# -# Optional -# Default: "" -# -# DefaultRule = "Host(`{{ normalize .Name }}.docker.localhost`)" + # Default host rule. + # + # Optional + # Default: "Host(`{{ normalize .Name }}`)" + # + # defaultRule = "Host(`{{ normalize .Name }}.docker.localhost`)" -# Expose containers by default in traefik -# -# Optional -# Default: true -# -# exposedByDefault = true + # Expose containers by default in traefik + # + # Optional + # Default: true + # + # exposedByDefault = false