mirror of
https://github.com/traefik/traefik.git
synced 2026-06-17 19:09:29 +03:00
Replace generated File routing reference page
This commit is contained in:
@@ -1,26 +1,454 @@
|
|||||||
---
|
---
|
||||||
title: "Traefik File Dynamic Configuration"
|
title: "Traefik File Routing Configuration"
|
||||||
description: "This guide will provide you with the YAML and TOML files for dynamic configuration in Traefik Proxy. Read the technical documentation."
|
description: "This guide will provide you with the reference for file-based routing configuration in Traefik Proxy. Read the technical documentation."
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Traefik File Routing Configuration
|
||||||
|
|
||||||
# Traefik and Configuration Files
|
The file provider lets you define routing configuration in YAML or TOML.
|
||||||
|
Use it to declare routers, services, middlewares, TCP and UDP routing, and TLS options that Traefik should load from a file or a directory.
|
||||||
|
|
||||||
!!! warning "Work In Progress"
|
To configure the file provider itself, see the [File provider install configuration](../../install-configuration/providers/others/file.md) page.
|
||||||
|
|
||||||
This page is still work in progress to provide a better documention of the routing options.
|
## Configuration Examples
|
||||||
|
|
||||||
It has been created to provide a centralized page with all the option in YAML and TOML format.
|
??? example "Configuring the File Provider and Exposing One HTTP Service"
|
||||||
|
|
||||||
|
Enabling the file provider:
|
||||||
|
|
||||||
|
```yaml tab="Structured (YAML)"
|
||||||
|
providers:
|
||||||
|
file:
|
||||||
|
filename: /etc/traefik/dynamic.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml tab="Structured (TOML)"
|
||||||
|
[providers.file]
|
||||||
|
filename = "/etc/traefik/dynamic.toml"
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash tab="CLI"
|
||||||
|
--providers.file.filename=/etc/traefik/dynamic.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
Declaring the dynamic HTTP configuration:
|
||||||
|
|
||||||
|
```yaml tab="Structured (YAML)"
|
||||||
|
http:
|
||||||
|
routers:
|
||||||
|
app:
|
||||||
|
rule: Host(`example.com`)
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
service: app
|
||||||
|
tls: {}
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: http://127.0.0.1:8080
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml tab="Structured (TOML)"
|
||||||
|
[http.routers.app]
|
||||||
|
rule = "Host(`example.com`)"
|
||||||
|
entryPoints = ["websecure"]
|
||||||
|
service = "app"
|
||||||
|
|
||||||
|
[http.routers.app.tls]
|
||||||
|
|
||||||
|
[http.services.app.loadBalancer]
|
||||||
|
[[http.services.app.loadBalancer.servers]]
|
||||||
|
url = "http://127.0.0.1:8080"
|
||||||
|
```
|
||||||
|
|
||||||
|
??? example "Specifying More Than One Router and Service"
|
||||||
|
|
||||||
|
Define each router and explicitly attach it to the service that should handle matching requests.
|
||||||
|
|
||||||
|
```yaml tab="Structured (YAML)"
|
||||||
|
http:
|
||||||
|
routers:
|
||||||
|
app:
|
||||||
|
rule: Host(`example-a.com`)
|
||||||
|
service: app
|
||||||
|
admin:
|
||||||
|
rule: Host(`example-b.com`)
|
||||||
|
service: admin
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: http://127.0.0.1:8000
|
||||||
|
admin:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: http://127.0.0.1:9000
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml tab="Structured (TOML)"
|
||||||
|
[http.routers.app]
|
||||||
|
rule = "Host(`example-a.com`)"
|
||||||
|
service = "app"
|
||||||
|
|
||||||
|
[http.routers.admin]
|
||||||
|
rule = "Host(`example-b.com`)"
|
||||||
|
service = "admin"
|
||||||
|
|
||||||
|
[http.services.app.loadBalancer]
|
||||||
|
[[http.services.app.loadBalancer.servers]]
|
||||||
|
url = "http://127.0.0.1:8000"
|
||||||
|
|
||||||
|
[http.services.admin.loadBalancer]
|
||||||
|
[[http.services.admin.loadBalancer.servers]]
|
||||||
|
url = "http://127.0.0.1:9000"
|
||||||
|
```
|
||||||
|
|
||||||
|
??? example "Declaring and Referencing Middlewares"
|
||||||
|
|
||||||
|
Middlewares declared by the file provider can be used by routers from the file provider or by routers from other providers.
|
||||||
|
When another provider references them, use the `@file` provider suffix.
|
||||||
|
|
||||||
|
```yaml tab="Structured (YAML)"
|
||||||
|
http:
|
||||||
|
routers:
|
||||||
|
app:
|
||||||
|
rule: Host(`secure.example.com`)
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
middlewares:
|
||||||
|
- secure-headers
|
||||||
|
service: app
|
||||||
|
tls:
|
||||||
|
options: modern
|
||||||
|
|
||||||
|
middlewares:
|
||||||
|
secure-headers:
|
||||||
|
headers:
|
||||||
|
stsSeconds: 31536000
|
||||||
|
forceSTSHeader: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: http://127.0.0.1:8080
|
||||||
|
|
||||||
|
tls:
|
||||||
|
options:
|
||||||
|
modern:
|
||||||
|
minVersion: VersionTLS12
|
||||||
|
sniStrict: true
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml tab="Structured (TOML)"
|
||||||
|
[http.routers.app]
|
||||||
|
rule = "Host(`secure.example.com`)"
|
||||||
|
entryPoints = ["websecure"]
|
||||||
|
middlewares = ["secure-headers"]
|
||||||
|
service = "app"
|
||||||
|
|
||||||
|
[http.routers.app.tls]
|
||||||
|
options = "modern"
|
||||||
|
|
||||||
|
[http.middlewares.secure-headers.headers]
|
||||||
|
stsSeconds = 31536000
|
||||||
|
forceSTSHeader = true
|
||||||
|
|
||||||
|
[http.services.app.loadBalancer]
|
||||||
|
[[http.services.app.loadBalancer.servers]]
|
||||||
|
url = "http://127.0.0.1:8080"
|
||||||
|
|
||||||
|
[tls.options.modern]
|
||||||
|
minVersion = "VersionTLS12"
|
||||||
|
sniStrict = true
|
||||||
|
```
|
||||||
|
|
||||||
|
??? example "Loading Multiple Dynamic Configuration Files"
|
||||||
|
|
||||||
|
Configure the file provider with a directory when you want to split dynamic configuration across multiple files.
|
||||||
|
|
||||||
|
```yaml tab="Structured (YAML)"
|
||||||
|
providers:
|
||||||
|
file:
|
||||||
|
directory: /etc/traefik/dynamic
|
||||||
|
watch: true
|
||||||
|
```
|
||||||
|
|
||||||
|
```toml tab="Structured (TOML)"
|
||||||
|
[providers.file]
|
||||||
|
directory = "/etc/traefik/dynamic"
|
||||||
|
watch = true
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash tab="CLI"
|
||||||
|
--providers.file.directory=/etc/traefik/dynamic
|
||||||
|
--providers.file.watch=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Example `/etc/traefik/dynamic/http.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
http:
|
||||||
|
routers:
|
||||||
|
app:
|
||||||
|
rule: Host(`example.com`)
|
||||||
|
service: app
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: http://127.0.0.1:8080
|
||||||
|
```
|
||||||
|
|
||||||
|
Example `/etc/traefik/dynamic/tls.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tls:
|
||||||
|
certificates:
|
||||||
|
- certFile: /certs/example.crt
|
||||||
|
keyFile: /certs/example.key
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration Options
|
## Configuration Options
|
||||||
|
|
||||||
```yml tab="YAML"
|
### General
|
||||||
--8<-- "content/reference/routing-configuration/other-providers/file.yaml"
|
|
||||||
```
|
|
||||||
|
|
||||||
```toml tab="TOML"
|
The file provider does not discover services automatically.
|
||||||
--8<-- "content/reference/routing-configuration/other-providers/file.toml"
|
Define every router, service, middleware, and TLS resource explicitly in the routing configuration file.
|
||||||
```
|
|
||||||
|
When another provider references a resource declared by the file provider, append the `@file` provider suffix.
|
||||||
|
For example, a Docker label can reference a file-provider middleware with `secure-headers@file`.
|
||||||
|
|
||||||
|
The examples below use YAML-style field paths.
|
||||||
|
In TOML, use the equivalent table and array syntax, such as `[http.routers.<router_name>]` and `[[http.services.<service_name>.loadBalancer.servers]]`.
|
||||||
|
|
||||||
|
### HTTP
|
||||||
|
|
||||||
|
#### Routers
|
||||||
|
|
||||||
|
Define HTTP routers under `http.routers.<router_name>`.
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the router name `<router_name>`."
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-http-routers-router-name-rule" href="#opt-http-routers-router-name-rule" title="#opt-http-routers-router-name-rule">`http.routers.<router_name>.rule`</a> | See [rule](../http/routing/rules-and-priority.md#rules) for more information. | ```Host(`example.com`)``` |
|
||||||
|
| <a id="opt-http-routers-router-name-ruleSyntax" href="#opt-http-routers-router-name-ruleSyntax" title="#opt-http-routers-router-name-ruleSyntax">`http.routers.<router_name>.ruleSyntax`</a> | See [ruleSyntax](../http/routing/rules-and-priority.md#rulesyntax) for more information.<br/>RuleSyntax is deprecated and will be removed in the next major version. | `v3` |
|
||||||
|
| <a id="opt-http-routers-router-name-entryPointsn" href="#opt-http-routers-router-name-entryPointsn" title="#opt-http-routers-router-name-entryPointsn">`http.routers.<router_name>.entryPoints[n]`</a> | See [entry points](../../install-configuration/entrypoints.md) for more information. | `websecure` |
|
||||||
|
| <a id="opt-http-routers-router-name-middlewaresn" href="#opt-http-routers-router-name-middlewaresn" title="#opt-http-routers-router-name-middlewaresn">`http.routers.<router_name>.middlewares[n]`</a> | See [middlewares overview](../http/middlewares/overview.md) for more information. | `secure-headers` |
|
||||||
|
| <a id="opt-http-routers-router-name-service" href="#opt-http-routers-router-name-service" title="#opt-http-routers-router-name-service">`http.routers.<router_name>.service`</a> | See [service](../http/load-balancing/service.md) for more information. | `app` |
|
||||||
|
| <a id="opt-http-routers-router-name-parentRefsn" href="#opt-http-routers-router-name-parentRefsn" title="#opt-http-routers-router-name-parentRefsn">`http.routers.<router_name>.parentRefs[n]`</a> | See [multi-layer routing](../http/routing/multi-layer-routing.md) for more information. | `parent-router@file` |
|
||||||
|
| <a id="opt-http-routers-router-name-tls" href="#opt-http-routers-router-name-tls" title="#opt-http-routers-router-name-tls">`http.routers.<router_name>.tls`</a> | See [TLS](../http/tls/overview.md) for more information. | `{}` |
|
||||||
|
| <a id="opt-http-routers-router-name-tls-certResolver" href="#opt-http-routers-router-name-tls-certResolver" title="#opt-http-routers-router-name-tls-certResolver">`http.routers.<router_name>.tls.certResolver`</a> | See [certResolver](../../install-configuration/tls/certificate-resolvers/overview.md) for more information. | `myresolver` |
|
||||||
|
| <a id="opt-http-routers-router-name-tls-domainsn-main" href="#opt-http-routers-router-name-tls-domainsn-main" title="#opt-http-routers-router-name-tls-domainsn-main">`http.routers.<router_name>.tls.domains[n].main`</a> | See [domains](../../install-configuration/tls/certificate-resolvers/acme.md#domain-definition) for more information. | `example.org` |
|
||||||
|
| <a id="opt-http-routers-router-name-tls-domainsn-sansn" href="#opt-http-routers-router-name-tls-domainsn-sansn" title="#opt-http-routers-router-name-tls-domainsn-sansn">`http.routers.<router_name>.tls.domains[n].sans[n]`</a> | See [domains](../../install-configuration/tls/certificate-resolvers/acme.md#domain-definition) for more information. | `www.example.org` |
|
||||||
|
| <a id="opt-http-routers-router-name-tls-options" href="#opt-http-routers-router-name-tls-options" title="#opt-http-routers-router-name-tls-options">`http.routers.<router_name>.tls.options`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `modern` |
|
||||||
|
| <a id="opt-http-routers-router-name-observability-accessLogs" href="#opt-http-routers-router-name-observability-accessLogs" title="#opt-http-routers-router-name-observability-accessLogs">`http.routers.<router_name>.observability.accessLogs`</a> | Enables or disables access logs for the router. | `true` |
|
||||||
|
| <a id="opt-http-routers-router-name-observability-metrics" href="#opt-http-routers-router-name-observability-metrics" title="#opt-http-routers-router-name-observability-metrics">`http.routers.<router_name>.observability.metrics`</a> | Enables or disables metrics for the router. | `true` |
|
||||||
|
| <a id="opt-http-routers-router-name-observability-tracing" href="#opt-http-routers-router-name-observability-tracing" title="#opt-http-routers-router-name-observability-tracing">`http.routers.<router_name>.observability.tracing`</a> | Enables or disables tracing for the router. | `true` |
|
||||||
|
| <a id="opt-http-routers-router-name-observability-traceVerbosity" href="#opt-http-routers-router-name-observability-traceVerbosity" title="#opt-http-routers-router-name-observability-traceVerbosity">`http.routers.<router_name>.observability.traceVerbosity`</a> | See [trace verbosity](../http/routing/observability.md#opt-traceVerbosity) for more information. | `minimal` |
|
||||||
|
| <a id="opt-http-routers-router-name-priority" href="#opt-http-routers-router-name-priority" title="#opt-http-routers-router-name-priority">`http.routers.<router_name>.priority`</a> | See [priority](../http/routing/rules-and-priority.md#priority-calculation) for more information. | `42` |
|
||||||
|
|
||||||
|
#### Services
|
||||||
|
|
||||||
|
Define HTTP services under `http.services.<service_name>`.
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the service name `<service_name>`."
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-serversn-url" href="#opt-http-services-service-name-loadBalancer-serversn-url" title="#opt-http-services-service-name-loadBalancer-serversn-url">`http.services.<service_name>.loadBalancer.servers[n].url`</a> | See [servers](../http/load-balancing/service.md#servers) for more information. | `http://127.0.0.1:8080` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-serversn-weight" href="#opt-http-services-service-name-loadBalancer-serversn-weight" title="#opt-http-services-service-name-loadBalancer-serversn-weight">`http.services.<service_name>.loadBalancer.servers[n].weight`</a> | See [servers](../http/load-balancing/service.md#servers) for more information. | `1` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-serversn-preservePath" href="#opt-http-services-service-name-loadBalancer-serversn-preservePath" title="#opt-http-services-service-name-loadBalancer-serversn-preservePath">`http.services.<service_name>.loadBalancer.servers[n].preservePath`</a> | See [servers](../http/load-balancing/service.md#servers) for more information. | `true` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-strategy" href="#opt-http-services-service-name-loadBalancer-strategy" title="#opt-http-services-service-name-loadBalancer-strategy">`http.services.<service_name>.loadBalancer.strategy`</a> | See [load balancing strategies](../http/load-balancing/service.md#load-balancing-strategies) for more information. | `wrr` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-passHostHeader" href="#opt-http-services-service-name-loadBalancer-passHostHeader" title="#opt-http-services-service-name-loadBalancer-passHostHeader">`http.services.<service_name>.loadBalancer.passHostHeader`</a> | See [service load balancer](../http/load-balancing/service.md) for more information. | `true` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-healthCheck" href="#opt-http-services-service-name-loadBalancer-healthCheck" title="#opt-http-services-service-name-loadBalancer-healthCheck">`http.services.<service_name>.loadBalancer.healthCheck.*`</a> | See [health check](../http/load-balancing/service.md#health-check) for more information. | `path: /health` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-passiveHealthCheck" href="#opt-http-services-service-name-loadBalancer-passiveHealthCheck" title="#opt-http-services-service-name-loadBalancer-passiveHealthCheck">`http.services.<service_name>.loadBalancer.passiveHealthCheck.*`</a> | See [passive health check](../http/load-balancing/service.md#passive-health-check) for more information. | `maxFailedAttempts: 3` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-sticky-cookie" href="#opt-http-services-service-name-loadBalancer-sticky-cookie" title="#opt-http-services-service-name-loadBalancer-sticky-cookie">`http.services.<service_name>.loadBalancer.sticky.cookie.*`</a> | See [sticky sessions](../http/load-balancing/service.md#sticky-sessions) for more information. | `name: app-cookie` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-responseForwarding-flushInterval" href="#opt-http-services-service-name-loadBalancer-responseForwarding-flushInterval" title="#opt-http-services-service-name-loadBalancer-responseForwarding-flushInterval">`http.services.<service_name>.loadBalancer.responseForwarding.flushInterval`</a> | See [service load balancer](../http/load-balancing/service.md) for more information. | `100ms` |
|
||||||
|
| <a id="opt-http-services-service-name-loadBalancer-serversTransport" href="#opt-http-services-service-name-loadBalancer-serversTransport" title="#opt-http-services-service-name-loadBalancer-serversTransport">`http.services.<service_name>.loadBalancer.serversTransport`</a> | See [ServersTransport](../http/load-balancing/serverstransport.md) for more information. | `secure-transport` |
|
||||||
|
| <a id="opt-http-services-service-name-weighted-servicesn-name" href="#opt-http-services-service-name-weighted-servicesn-name" title="#opt-http-services-service-name-weighted-servicesn-name">`http.services.<service_name>.weighted.services[n].name`</a> | See [weighted round robin](../http/load-balancing/service.md#weighted-round-robin-wrr) for more information. | `app-v1` |
|
||||||
|
| <a id="opt-http-services-service-name-weighted-servicesn-weight" href="#opt-http-services-service-name-weighted-servicesn-weight" title="#opt-http-services-service-name-weighted-servicesn-weight">`http.services.<service_name>.weighted.services[n].weight`</a> | See [weighted round robin](../http/load-balancing/service.md#weighted-round-robin-wrr) for more information. | `3` |
|
||||||
|
| <a id="opt-http-services-service-name-weighted-sticky-cookie" href="#opt-http-services-service-name-weighted-sticky-cookie" title="#opt-http-services-service-name-weighted-sticky-cookie">`http.services.<service_name>.weighted.sticky.cookie.*`</a> | See [sticky sessions](../http/load-balancing/service.md#sticky-sessions) for more information. | `name: app-cookie` |
|
||||||
|
| <a id="opt-http-services-service-name-weighted-healthCheck" href="#opt-http-services-service-name-weighted-healthCheck" title="#opt-http-services-service-name-weighted-healthCheck">`http.services.<service_name>.weighted.healthCheck`</a> | See [weighted service health check](../http/load-balancing/service.md#health-check) for more information. | `{}` |
|
||||||
|
| <a id="opt-http-services-service-name-highestRandomWeight-servicesn-name" href="#opt-http-services-service-name-highestRandomWeight-servicesn-name" title="#opt-http-services-service-name-highestRandomWeight-servicesn-name">`http.services.<service_name>.highestRandomWeight.services[n].name`</a> | See [highest random weight](../http/load-balancing/service.md#highest-random-weight) for more information. | `app-v1` |
|
||||||
|
| <a id="opt-http-services-service-name-highestRandomWeight-servicesn-weight" href="#opt-http-services-service-name-highestRandomWeight-servicesn-weight" title="#opt-http-services-service-name-highestRandomWeight-servicesn-weight">`http.services.<service_name>.highestRandomWeight.services[n].weight`</a> | See [highest random weight](../http/load-balancing/service.md#highest-random-weight) for more information. | `3` |
|
||||||
|
| <a id="opt-http-services-service-name-highestRandomWeight-healthCheck" href="#opt-http-services-service-name-highestRandomWeight-healthCheck" title="#opt-http-services-service-name-highestRandomWeight-healthCheck">`http.services.<service_name>.highestRandomWeight.healthCheck`</a> | See [highest random weight](../http/load-balancing/service.md#highest-random-weight) for more information. | `{}` |
|
||||||
|
| <a id="opt-http-services-service-name-mirroring-service" href="#opt-http-services-service-name-mirroring-service" title="#opt-http-services-service-name-mirroring-service">`http.services.<service_name>.mirroring.service`</a> | See [mirroring](../http/load-balancing/service.md#mirroring) for more information. | `app-main` |
|
||||||
|
| <a id="opt-http-services-service-name-mirroring-mirrorBody" href="#opt-http-services-service-name-mirroring-mirrorBody" title="#opt-http-services-service-name-mirroring-mirrorBody">`http.services.<service_name>.mirroring.mirrorBody`</a> | See [mirroring](../http/load-balancing/service.md#mirroring) for more information. | `true` |
|
||||||
|
| <a id="opt-http-services-service-name-mirroring-maxBodySize" href="#opt-http-services-service-name-mirroring-maxBodySize" title="#opt-http-services-service-name-mirroring-maxBodySize">`http.services.<service_name>.mirroring.maxBodySize`</a> | See [mirroring](../http/load-balancing/service.md#mirroring) for more information. | `1048576` |
|
||||||
|
| <a id="opt-http-services-service-name-mirroring-mirrorsn-name" href="#opt-http-services-service-name-mirroring-mirrorsn-name" title="#opt-http-services-service-name-mirroring-mirrorsn-name">`http.services.<service_name>.mirroring.mirrors[n].name`</a> | See [mirroring](../http/load-balancing/service.md#mirroring) for more information. | `app-shadow` |
|
||||||
|
| <a id="opt-http-services-service-name-mirroring-mirrorsn-percent" href="#opt-http-services-service-name-mirroring-mirrorsn-percent" title="#opt-http-services-service-name-mirroring-mirrorsn-percent">`http.services.<service_name>.mirroring.mirrors[n].percent`</a> | See [mirroring](../http/load-balancing/service.md#mirroring) for more information. | `10` |
|
||||||
|
| <a id="opt-http-services-service-name-mirroring-healthCheck" href="#opt-http-services-service-name-mirroring-healthCheck" title="#opt-http-services-service-name-mirroring-healthCheck">`http.services.<service_name>.mirroring.healthCheck`</a> | See [mirroring](../http/load-balancing/service.md#mirroring) for more information. | `{}` |
|
||||||
|
| <a id="opt-http-services-service-name-failover-service" href="#opt-http-services-service-name-failover-service" title="#opt-http-services-service-name-failover-service">`http.services.<service_name>.failover.service`</a> | See [failover](../http/load-balancing/service.md#failover) for more information. | `app-main` |
|
||||||
|
| <a id="opt-http-services-service-name-failover-fallback" href="#opt-http-services-service-name-failover-fallback" title="#opt-http-services-service-name-failover-fallback">`http.services.<service_name>.failover.fallback`</a> | See [failover](../http/load-balancing/service.md#failover) for more information. | `app-backup` |
|
||||||
|
| <a id="opt-http-services-service-name-failover-healthCheck" href="#opt-http-services-service-name-failover-healthCheck" title="#opt-http-services-service-name-failover-healthCheck">`http.services.<service_name>.failover.healthCheck`</a> | See [failover](../http/load-balancing/service.md#failover) for more information. | `{}` |
|
||||||
|
| <a id="opt-http-services-service-name-failover-errors-maxRequestBodyBytes" href="#opt-http-services-service-name-failover-errors-maxRequestBodyBytes" title="#opt-http-services-service-name-failover-errors-maxRequestBodyBytes">`http.services.<service_name>.failover.errors.maxRequestBodyBytes`</a> | See [failover errors](../http/load-balancing/service.md#errors) for more information. | `1048576` |
|
||||||
|
| <a id="opt-http-services-service-name-failover-errors-statusn" href="#opt-http-services-service-name-failover-errors-statusn" title="#opt-http-services-service-name-failover-errors-statusn">`http.services.<service_name>.failover.errors.status[n]`</a> | See [failover errors](../http/load-balancing/service.md#errors) for more information. | `500-599` |
|
||||||
|
| <a id="opt-http-services-service-name-middlewaresn" href="#opt-http-services-service-name-middlewaresn" title="#opt-http-services-service-name-middlewaresn">`http.services.<service_name>.middlewares[n]`</a> | Adds middlewares to the service. | `service-ratelimit` |
|
||||||
|
|
||||||
|
#### Middlewares
|
||||||
|
|
||||||
|
Define HTTP middlewares under `http.middlewares.<middleware_name>`.
|
||||||
|
|
||||||
|
For example, to declare an [`AddPrefix`](../http/middlewares/addprefix.md) middleware named `add-api`, set `http.middlewares.add-api.addPrefix.prefix=/api`.
|
||||||
|
|
||||||
|
More information about available middlewares can be found in the dedicated [middlewares section](../http/middlewares/overview.md).
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the middleware name `<middleware_name>`."
|
||||||
|
|
||||||
|
!!! warning "Conflicts in Declaration"
|
||||||
|
|
||||||
|
If you declare multiple middlewares with the same name but different parameters, the middleware fails to be declared.
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-http-middlewares-middleware-name-middleware-type-middleware-option" href="#opt-http-middlewares-middleware-name-middleware-type-middleware-option" title="#opt-http-middlewares-middleware-name-middleware-type-middleware-option">`http.middlewares.<middleware_name>.<middleware_type>.<middleware_option>`</a> | With `middleware_type` the middleware type, such as `addPrefix` or `headers`, and `middleware_option` the option to set. | `prefix: /api` |
|
||||||
|
|
||||||
|
#### ServersTransports
|
||||||
|
|
||||||
|
Define HTTP ServersTransports under `http.serversTransports.<servers_transport_name>`.
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-http-serversTransports-servers-transport-name" href="#opt-http-serversTransports-servers-transport-name" title="#opt-http-serversTransports-servers-transport-name">`http.serversTransports.<servers_transport_name>.*`</a> | See [ServersTransport](../http/load-balancing/serverstransport.md) for more information. | `serverName: example.org` |
|
||||||
|
|
||||||
|
### TCP
|
||||||
|
|
||||||
|
You can declare TCP routers, services, middlewares, and ServersTransports with the file provider.
|
||||||
|
|
||||||
|
#### TCP Routers
|
||||||
|
|
||||||
|
Define TCP routers under `tcp.routers.<router_name>`.
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the router name `<router_name>`."
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tcp-routers-router-name-entryPointsn" href="#opt-tcp-routers-router-name-entryPointsn" title="#opt-tcp-routers-router-name-entryPointsn">`tcp.routers.<router_name>.entryPoints[n]`</a> | See [entry points](../../install-configuration/entrypoints.md) for more information. | `websecure` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-rule" href="#opt-tcp-routers-router-name-rule" title="#opt-tcp-routers-router-name-rule">`tcp.routers.<router_name>.rule`</a> | See [rule](../tcp/routing/rules-and-priority.md#rules) for more information. | ```HostSNI(`example.com`)``` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-ruleSyntax" href="#opt-tcp-routers-router-name-ruleSyntax" title="#opt-tcp-routers-router-name-ruleSyntax">`tcp.routers.<router_name>.ruleSyntax`</a> | Configures the rule syntax to use for parsing the rule on a per-router basis.<br/>RuleSyntax is deprecated and will be removed in the next major version. | `v3` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-middlewaresn" href="#opt-tcp-routers-router-name-middlewaresn" title="#opt-tcp-routers-router-name-middlewaresn">`tcp.routers.<router_name>.middlewares[n]`</a> | See [TCP middlewares overview](../tcp/middlewares/overview.md) for more information. | `ip-allowlist` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-service" href="#opt-tcp-routers-router-name-service" title="#opt-tcp-routers-router-name-service">`tcp.routers.<router_name>.service`</a> | See [service](../tcp/service.md) for more information. | `tcp-app` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-tls" href="#opt-tcp-routers-router-name-tls" title="#opt-tcp-routers-router-name-tls">`tcp.routers.<router_name>.tls`</a> | See [TLS](../tcp/tls.md) for more information. | `{}` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-tls-certResolver" href="#opt-tcp-routers-router-name-tls-certResolver" title="#opt-tcp-routers-router-name-tls-certResolver">`tcp.routers.<router_name>.tls.certResolver`</a> | See [certResolver](../tcp/tls.md#configuration-options) for more information. | `myresolver` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-tls-domainsn-main" href="#opt-tcp-routers-router-name-tls-domainsn-main" title="#opt-tcp-routers-router-name-tls-domainsn-main">`tcp.routers.<router_name>.tls.domains[n].main`</a> | See [TLS](../tcp/tls.md) for more information. | `example.org` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-tls-domainsn-sansn" href="#opt-tcp-routers-router-name-tls-domainsn-sansn" title="#opt-tcp-routers-router-name-tls-domainsn-sansn">`tcp.routers.<router_name>.tls.domains[n].sans[n]`</a> | See [TLS](../tcp/tls.md) for more information. | `www.example.org` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-tls-options" href="#opt-tcp-routers-router-name-tls-options" title="#opt-tcp-routers-router-name-tls-options">`tcp.routers.<router_name>.tls.options`</a> | See [TLS](../tcp/tls.md) for more information. | `modern` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-tls-passthrough" href="#opt-tcp-routers-router-name-tls-passthrough" title="#opt-tcp-routers-router-name-tls-passthrough">`tcp.routers.<router_name>.tls.passthrough`</a> | See [Passthrough](../tcp/tls.md#opt-passthrough) for more information. | `true` |
|
||||||
|
| <a id="opt-tcp-routers-router-name-priority" href="#opt-tcp-routers-router-name-priority" title="#opt-tcp-routers-router-name-priority">`tcp.routers.<router_name>.priority`</a> | See [priority](../tcp/routing/rules-and-priority.md#priority-calculation) for more information. | `42` |
|
||||||
|
|
||||||
|
#### TCP Services
|
||||||
|
|
||||||
|
Define TCP services under `tcp.services.<service_name>`.
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the service name `<service_name>`."
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tcp-services-service-name-loadBalancer-serversn-address" href="#opt-tcp-services-service-name-loadBalancer-serversn-address" title="#opt-tcp-services-service-name-loadBalancer-serversn-address">`tcp.services.<service_name>.loadBalancer.servers[n].address`</a> | See [servers load balancer](../tcp/service.md#servers-load-balancer) for more information. | `127.0.0.1:9000` |
|
||||||
|
| <a id="opt-tcp-services-service-name-loadBalancer-serversn-tls" href="#opt-tcp-services-service-name-loadBalancer-serversn-tls" title="#opt-tcp-services-service-name-loadBalancer-serversn-tls">`tcp.services.<service_name>.loadBalancer.servers[n].tls`</a> | Determines whether to use TLS when dialing the backend server. | `true` |
|
||||||
|
| <a id="opt-tcp-services-service-name-loadBalancer-serversTransport" href="#opt-tcp-services-service-name-loadBalancer-serversTransport" title="#opt-tcp-services-service-name-loadBalancer-serversTransport">`tcp.services.<service_name>.loadBalancer.serversTransport`</a> | See [TCP ServersTransport](../tcp/serverstransport.md) for more information. | `secure-tcp` |
|
||||||
|
| <a id="opt-tcp-services-service-name-loadBalancer-proxyProtocol-version" href="#opt-tcp-services-service-name-loadBalancer-proxyProtocol-version" title="#opt-tcp-services-service-name-loadBalancer-proxyProtocol-version">`tcp.services.<service_name>.loadBalancer.proxyProtocol.version`</a> | Enables Proxy Protocol for backend connections. | `2` |
|
||||||
|
| <a id="opt-tcp-services-service-name-loadBalancer-terminationDelay" href="#opt-tcp-services-service-name-loadBalancer-terminationDelay" title="#opt-tcp-services-service-name-loadBalancer-terminationDelay">`tcp.services.<service_name>.loadBalancer.terminationDelay`</a> | Defines the delay before terminating connections. | `100` |
|
||||||
|
| <a id="opt-tcp-services-service-name-loadBalancer-healthCheck" href="#opt-tcp-services-service-name-loadBalancer-healthCheck" title="#opt-tcp-services-service-name-loadBalancer-healthCheck">`tcp.services.<service_name>.loadBalancer.healthCheck.*`</a> | See [TCP service health check](../tcp/service.md#health-check) for more information. | `interval: 10s` |
|
||||||
|
| <a id="opt-tcp-services-service-name-weighted-servicesn-name" href="#opt-tcp-services-service-name-weighted-servicesn-name" title="#opt-tcp-services-service-name-weighted-servicesn-name">`tcp.services.<service_name>.weighted.services[n].name`</a> | See [weighted round robin](../tcp/service.md#weighted-round-robin) for more information. | `tcp-v1` |
|
||||||
|
| <a id="opt-tcp-services-service-name-weighted-servicesn-weight" href="#opt-tcp-services-service-name-weighted-servicesn-weight" title="#opt-tcp-services-service-name-weighted-servicesn-weight">`tcp.services.<service_name>.weighted.services[n].weight`</a> | See [weighted round robin](../tcp/service.md#weighted-round-robin) for more information. | `3` |
|
||||||
|
| <a id="opt-tcp-services-service-name-weighted-healthCheck" href="#opt-tcp-services-service-name-weighted-healthCheck" title="#opt-tcp-services-service-name-weighted-healthCheck">`tcp.services.<service_name>.weighted.healthCheck`</a> | See [weighted round robin](../tcp/service.md#weighted-round-robin) for more information. | `{}` |
|
||||||
|
|
||||||
|
#### TCP Middlewares
|
||||||
|
|
||||||
|
Define TCP middlewares under `tcp.middlewares.<middleware_name>`.
|
||||||
|
|
||||||
|
For example, to declare an [`InFlightConn`](../tcp/middlewares/inflightconn.md) middleware named `limit`, set `tcp.middlewares.limit.inFlightConn.amount=10`.
|
||||||
|
|
||||||
|
More information about available middlewares is available in the dedicated [TCP middlewares section](../tcp/middlewares/overview.md).
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the middleware name `<middleware_name>`."
|
||||||
|
|
||||||
|
!!! warning "Conflicts in Declaration"
|
||||||
|
|
||||||
|
If you declare multiple middlewares with the same name but different parameters, the middleware fails to be declared.
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tcp-middlewares-middleware-name-middleware-type-middleware-option" href="#opt-tcp-middlewares-middleware-name-middleware-type-middleware-option" title="#opt-tcp-middlewares-middleware-name-middleware-type-middleware-option">`tcp.middlewares.<middleware_name>.<middleware_type>.<middleware_option>`</a> | With `middleware_type` the middleware type, such as `inFlightConn`, and `middleware_option` the option to set. | `amount: 10` |
|
||||||
|
|
||||||
|
#### TCP ServersTransports
|
||||||
|
|
||||||
|
Define TCP ServersTransports under `tcp.serversTransports.<servers_transport_name>`.
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tcp-serversTransports-servers-transport-name" href="#opt-tcp-serversTransports-servers-transport-name" title="#opt-tcp-serversTransports-servers-transport-name">`tcp.serversTransports.<servers_transport_name>.*`</a> | See [TCP ServersTransport](../tcp/serverstransport.md) for more information. | `dialTimeout: 30s` |
|
||||||
|
|
||||||
|
### UDP
|
||||||
|
|
||||||
|
You can declare UDP routers and services with the file provider.
|
||||||
|
|
||||||
|
#### UDP Routers
|
||||||
|
|
||||||
|
Define UDP routers under `udp.routers.<router_name>`.
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the router name `<router_name>`."
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-udp-routers-router-name-entryPointsn" href="#opt-udp-routers-router-name-entryPointsn" title="#opt-udp-routers-router-name-entryPointsn">`udp.routers.<router_name>.entryPoints[n]`</a> | See [UDP router entrypoints](../udp/routing/rules-priority.md#entrypoints) for more information. | `dns` |
|
||||||
|
| <a id="opt-udp-routers-router-name-service" href="#opt-udp-routers-router-name-service" title="#opt-udp-routers-router-name-service">`udp.routers.<router_name>.service`</a> | See [UDP router configuration](../udp/routing/rules-priority.md#configuration-example) for more information. | `dns-service` |
|
||||||
|
|
||||||
|
#### UDP Services
|
||||||
|
|
||||||
|
Define UDP services under `udp.services.<service_name>`.
|
||||||
|
|
||||||
|
!!! warning "The character `@` is not authorized in the service name `<service_name>`."
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-udp-services-service-name-loadBalancer-serversn-address" href="#opt-udp-services-service-name-loadBalancer-serversn-address" title="#opt-udp-services-service-name-loadBalancer-serversn-address">`udp.services.<service_name>.loadBalancer.servers[n].address`</a> | See [UDP service](../udp/service.md) for more information. | `127.0.0.1:5353` |
|
||||||
|
| <a id="opt-udp-services-service-name-weighted-servicesn-name" href="#opt-udp-services-service-name-weighted-servicesn-name" title="#opt-udp-services-service-name-weighted-servicesn-name">`udp.services.<service_name>.weighted.services[n].name`</a> | See [UDP service](../udp/service.md) for more information. | `dns-v1` |
|
||||||
|
| <a id="opt-udp-services-service-name-weighted-servicesn-weight" href="#opt-udp-services-service-name-weighted-servicesn-weight" title="#opt-udp-services-service-name-weighted-servicesn-weight">`udp.services.<service_name>.weighted.services[n].weight`</a> | See [UDP service](../udp/service.md) for more information. | `3` |
|
||||||
|
|
||||||
|
### TLS
|
||||||
|
|
||||||
|
You can declare TLS certificates, options, and stores with the file provider.
|
||||||
|
|
||||||
|
#### Certificates
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tls-certificatesn-certFile" href="#opt-tls-certificatesn-certFile" title="#opt-tls-certificatesn-certFile">`tls.certificates[n].certFile`</a> | See [TLS certificates](../http/tls/tls-certificates.md) for more information. | `/certs/example.crt` |
|
||||||
|
| <a id="opt-tls-certificatesn-keyFile" href="#opt-tls-certificatesn-keyFile" title="#opt-tls-certificatesn-keyFile">`tls.certificates[n].keyFile`</a> | See [TLS certificates](../http/tls/tls-certificates.md) for more information. | `/certs/example.key` |
|
||||||
|
| <a id="opt-tls-certificatesn-storesn" href="#opt-tls-certificatesn-storesn" title="#opt-tls-certificatesn-storesn">`tls.certificates[n].stores[n]`</a> | See [certificate stores](../http/tls/tls-certificates.md#certificates-stores) for more information. | `default` |
|
||||||
|
|
||||||
|
#### TLS Options
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tls-options-options-name-minVersion" href="#opt-tls-options-options-name-minVersion" title="#opt-tls-options-options-name-minVersion">`tls.options.<options_name>.minVersion`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `VersionTLS12` |
|
||||||
|
| <a id="opt-tls-options-options-name-maxVersion" href="#opt-tls-options-options-name-maxVersion" title="#opt-tls-options-options-name-maxVersion">`tls.options.<options_name>.maxVersion`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `VersionTLS13` |
|
||||||
|
| <a id="opt-tls-options-options-name-cipherSuitesn" href="#opt-tls-options-options-name-cipherSuitesn" title="#opt-tls-options-options-name-cipherSuitesn">`tls.options.<options_name>.cipherSuites[n]`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256` |
|
||||||
|
| <a id="opt-tls-options-options-name-curvePreferencesn" href="#opt-tls-options-options-name-curvePreferencesn" title="#opt-tls-options-options-name-curvePreferencesn">`tls.options.<options_name>.curvePreferences[n]`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `CurveP256` |
|
||||||
|
| <a id="opt-tls-options-options-name-clientAuth-caFilesn" href="#opt-tls-options-options-name-clientAuth-caFilesn" title="#opt-tls-options-options-name-clientAuth-caFilesn">`tls.options.<options_name>.clientAuth.caFiles[n]`</a> | See [client authentication](../http/tls/tls-options.md#client-authentication-mtls) for more information. | `/certs/client-ca.crt` |
|
||||||
|
| <a id="opt-tls-options-options-name-clientAuth-clientAuthType" href="#opt-tls-options-options-name-clientAuth-clientAuthType" title="#opt-tls-options-options-name-clientAuth-clientAuthType">`tls.options.<options_name>.clientAuth.clientAuthType`</a> | See [client authentication](../http/tls/tls-options.md#client-authentication-mtls) for more information. | `RequireAndVerifyClientCert` |
|
||||||
|
| <a id="opt-tls-options-options-name-sniStrict" href="#opt-tls-options-options-name-sniStrict" title="#opt-tls-options-options-name-sniStrict">`tls.options.<options_name>.sniStrict`</a> | See [strict SNI checking](../http/tls/tls-options.md#strict-sni-checking) for more information. | `true` |
|
||||||
|
| <a id="opt-tls-options-options-name-alpnProtocolsn" href="#opt-tls-options-options-name-alpnProtocolsn" title="#opt-tls-options-options-name-alpnProtocolsn">`tls.options.<options_name>.alpnProtocols[n]`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `h2` |
|
||||||
|
| <a id="opt-tls-options-options-name-disableSessionTickets" href="#opt-tls-options-options-name-disableSessionTickets" title="#opt-tls-options-options-name-disableSessionTickets">`tls.options.<options_name>.disableSessionTickets`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `true` |
|
||||||
|
| <a id="opt-tls-options-options-name-preferServerCipherSuites" href="#opt-tls-options-options-name-preferServerCipherSuites" title="#opt-tls-options-options-name-preferServerCipherSuites">`tls.options.<options_name>.preferServerCipherSuites`</a> | See [TLS options](../http/tls/tls-options.md) for more information. | `true` |
|
||||||
|
|
||||||
|
#### TLS Stores
|
||||||
|
|
||||||
|
| Field | Description | Value |
|
||||||
|
|------|-------------|-------|
|
||||||
|
| <a id="opt-tls-stores-store-name-defaultCertificate-certFile" href="#opt-tls-stores-store-name-defaultCertificate-certFile" title="#opt-tls-stores-store-name-defaultCertificate-certFile">`tls.stores.<store_name>.defaultCertificate.certFile`</a> | See [default certificate](../http/tls/tls-certificates.md#default-certificate) for more information. | `/certs/default.crt` |
|
||||||
|
| <a id="opt-tls-stores-store-name-defaultCertificate-keyFile" href="#opt-tls-stores-store-name-defaultCertificate-keyFile" title="#opt-tls-stores-store-name-defaultCertificate-keyFile">`tls.stores.<store_name>.defaultCertificate.keyFile`</a> | See [default certificate](../http/tls/tls-certificates.md#default-certificate) for more information. | `/certs/default.key` |
|
||||||
|
| <a id="opt-tls-stores-store-name-defaultGeneratedCert-resolver" href="#opt-tls-stores-store-name-defaultGeneratedCert-resolver" title="#opt-tls-stores-store-name-defaultGeneratedCert-resolver">`tls.stores.<store_name>.defaultGeneratedCert.resolver`</a> | See [ACME default certificate](../http/tls/tls-certificates.md#acme-default-certificate) for more information. | `myresolver` |
|
||||||
|
| <a id="opt-tls-stores-store-name-defaultGeneratedCert-domain-main" href="#opt-tls-stores-store-name-defaultGeneratedCert-domain-main" title="#opt-tls-stores-store-name-defaultGeneratedCert-domain-main">`tls.stores.<store_name>.defaultGeneratedCert.domain.main`</a> | See [ACME default certificate](../http/tls/tls-certificates.md#acme-default-certificate) for more information. | `example.org` |
|
||||||
|
| <a id="opt-tls-stores-store-name-defaultGeneratedCert-domain-sansn" href="#opt-tls-stores-store-name-defaultGeneratedCert-domain-sansn" title="#opt-tls-stores-store-name-defaultGeneratedCert-domain-sansn">`tls.stores.<store_name>.defaultGeneratedCert.domain.sans[n]`</a> | See [ACME default certificate](../http/tls/tls-certificates.md#acme-default-certificate) for more information. | `www.example.org` |
|
||||||
|
|
||||||
## Go Templating
|
## Go Templating
|
||||||
|
|
||||||
@@ -69,7 +497,7 @@ To illustrate, it is possible to easily define multiple routers, services, and T
|
|||||||
{{ range $i, $e := until 10 }}
|
{{ range $i, $e := until 10 }}
|
||||||
- certFile: "/etc/traefik/cert-{{ $e }}.pem"
|
- certFile: "/etc/traefik/cert-{{ $e }}.pem"
|
||||||
keyFile: "/etc/traefik/cert-{{ $e }}.key"
|
keyFile: "/etc/traefik/cert-{{ $e }}.key"
|
||||||
store:
|
stores:
|
||||||
- "my-store-foo-{{ $e }}"
|
- "my-store-foo-{{ $e }}"
|
||||||
- "my-store-bar-{{ $e }}"
|
- "my-store-bar-{{ $e }}"
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -101,7 +529,7 @@ To illustrate, it is possible to easily define multiple routers, services, and T
|
|||||||
|
|
||||||
[tcp.services]
|
[tcp.services]
|
||||||
{{ range $i, $e := until 100 }}
|
{{ range $i, $e := until 100 }}
|
||||||
[http.services.service{{ $e }}]
|
[tcp.services.service{{ $e }}]
|
||||||
# ...
|
# ...
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@@ -112,9 +540,9 @@ To illustrate, it is possible to easily define multiple routers, services, and T
|
|||||||
stores = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
|
stores = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
[tls.config]
|
[tls.options]
|
||||||
{{ range $i, $e := until 10 }}
|
{{ range $i, $e := until 10 }}
|
||||||
[tls.config.TLS{{ $e }}]
|
[tls.options.TLS{{ $e }}]
|
||||||
# ...
|
# ...
|
||||||
{{ end }}
|
{{ end }}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,641 +0,0 @@
|
|||||||
## CODE GENERATED AUTOMATICALLY
|
|
||||||
## THIS FILE MUST NOT BE EDITED BY HAND
|
|
||||||
[http]
|
|
||||||
[http.routers]
|
|
||||||
[http.routers.Router0]
|
|
||||||
entryPoints = ["foobar", "foobar"]
|
|
||||||
middlewares = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
rule = "foobar"
|
|
||||||
parentRefs = ["foobar", "foobar"]
|
|
||||||
ruleSyntax = "foobar"
|
|
||||||
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.Router0.observability]
|
|
||||||
accessLogs = true
|
|
||||||
metrics = true
|
|
||||||
tracing = true
|
|
||||||
traceVerbosity = "foobar"
|
|
||||||
[http.routers.Router1]
|
|
||||||
entryPoints = ["foobar", "foobar"]
|
|
||||||
middlewares = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
rule = "foobar"
|
|
||||||
parentRefs = ["foobar", "foobar"]
|
|
||||||
ruleSyntax = "foobar"
|
|
||||||
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.routers.Router1.observability]
|
|
||||||
accessLogs = true
|
|
||||||
metrics = true
|
|
||||||
tracing = true
|
|
||||||
traceVerbosity = "foobar"
|
|
||||||
[http.services]
|
|
||||||
[http.services.Service01]
|
|
||||||
[http.services.Service01.failover]
|
|
||||||
service = "foobar"
|
|
||||||
fallback = "foobar"
|
|
||||||
[http.services.Service01.failover.healthCheck]
|
|
||||||
[http.services.Service02]
|
|
||||||
[http.services.Service02.highestRandomWeight]
|
|
||||||
|
|
||||||
[[http.services.Service02.highestRandomWeight.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
|
|
||||||
[[http.services.Service02.highestRandomWeight.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
[http.services.Service02.highestRandomWeight.healthCheck]
|
|
||||||
[http.services.Service03]
|
|
||||||
[http.services.Service03.loadBalancer]
|
|
||||||
strategy = "foobar"
|
|
||||||
passHostHeader = true
|
|
||||||
serversTransport = "foobar"
|
|
||||||
[http.services.Service03.loadBalancer.sticky]
|
|
||||||
[http.services.Service03.loadBalancer.sticky.cookie]
|
|
||||||
name = "foobar"
|
|
||||||
secure = true
|
|
||||||
httpOnly = true
|
|
||||||
sameSite = "foobar"
|
|
||||||
maxAge = 42
|
|
||||||
path = "foobar"
|
|
||||||
domain = "foobar"
|
|
||||||
|
|
||||||
[[http.services.Service03.loadBalancer.servers]]
|
|
||||||
url = "foobar"
|
|
||||||
weight = 42
|
|
||||||
preservePath = true
|
|
||||||
|
|
||||||
[[http.services.Service03.loadBalancer.servers]]
|
|
||||||
url = "foobar"
|
|
||||||
weight = 42
|
|
||||||
preservePath = true
|
|
||||||
[http.services.Service03.loadBalancer.healthCheck]
|
|
||||||
scheme = "foobar"
|
|
||||||
mode = "foobar"
|
|
||||||
path = "foobar"
|
|
||||||
method = "foobar"
|
|
||||||
status = 42
|
|
||||||
port = 42
|
|
||||||
interval = "42s"
|
|
||||||
unhealthyInterval = "42s"
|
|
||||||
timeout = "42s"
|
|
||||||
hostname = "foobar"
|
|
||||||
followRedirects = true
|
|
||||||
[http.services.Service03.loadBalancer.healthCheck.headers]
|
|
||||||
name0 = "foobar"
|
|
||||||
name1 = "foobar"
|
|
||||||
[http.services.Service03.loadBalancer.passiveHealthCheck]
|
|
||||||
failureWindow = "42s"
|
|
||||||
maxFailedAttempts = 42
|
|
||||||
[http.services.Service03.loadBalancer.responseForwarding]
|
|
||||||
flushInterval = "42s"
|
|
||||||
[http.services.Service04]
|
|
||||||
[http.services.Service04.mirroring]
|
|
||||||
service = "foobar"
|
|
||||||
mirrorBody = true
|
|
||||||
maxBodySize = 42
|
|
||||||
|
|
||||||
[[http.services.Service04.mirroring.mirrors]]
|
|
||||||
name = "foobar"
|
|
||||||
percent = 42
|
|
||||||
|
|
||||||
[[http.services.Service04.mirroring.mirrors]]
|
|
||||||
name = "foobar"
|
|
||||||
percent = 42
|
|
||||||
[http.services.Service04.mirroring.healthCheck]
|
|
||||||
[http.services.Service05]
|
|
||||||
[http.services.Service05.weighted]
|
|
||||||
|
|
||||||
[[http.services.Service05.weighted.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
|
|
||||||
[[http.services.Service05.weighted.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
[http.services.Service05.weighted.sticky]
|
|
||||||
[http.services.Service05.weighted.sticky.cookie]
|
|
||||||
name = "foobar"
|
|
||||||
secure = true
|
|
||||||
httpOnly = true
|
|
||||||
sameSite = "foobar"
|
|
||||||
maxAge = 42
|
|
||||||
path = "foobar"
|
|
||||||
domain = "foobar"
|
|
||||||
[http.services.Service05.weighted.healthCheck]
|
|
||||||
[http.middlewares]
|
|
||||||
[http.middlewares.Middleware01]
|
|
||||||
[http.middlewares.Middleware01.addPrefix]
|
|
||||||
prefix = "foobar"
|
|
||||||
[http.middlewares.Middleware02]
|
|
||||||
[http.middlewares.Middleware02.basicAuth]
|
|
||||||
users = ["foobar", "foobar"]
|
|
||||||
usersFile = "foobar"
|
|
||||||
realm = "foobar"
|
|
||||||
removeHeader = true
|
|
||||||
headerField = "foobar"
|
|
||||||
[http.middlewares.Middleware03]
|
|
||||||
[http.middlewares.Middleware03.buffering]
|
|
||||||
maxRequestBodyBytes = 42
|
|
||||||
memRequestBodyBytes = 42
|
|
||||||
maxResponseBodyBytes = 42
|
|
||||||
memResponseBodyBytes = 42
|
|
||||||
retryExpression = "foobar"
|
|
||||||
[http.middlewares.Middleware04]
|
|
||||||
[http.middlewares.Middleware04.chain]
|
|
||||||
middlewares = ["foobar", "foobar"]
|
|
||||||
[http.middlewares.Middleware05]
|
|
||||||
[http.middlewares.Middleware05.circuitBreaker]
|
|
||||||
expression = "foobar"
|
|
||||||
checkPeriod = "42s"
|
|
||||||
fallbackDuration = "42s"
|
|
||||||
recoveryDuration = "42s"
|
|
||||||
responseCode = 42
|
|
||||||
[http.middlewares.Middleware06]
|
|
||||||
[http.middlewares.Middleware06.compress]
|
|
||||||
excludedContentTypes = ["foobar", "foobar"]
|
|
||||||
includedContentTypes = ["foobar", "foobar"]
|
|
||||||
minResponseBodyBytes = 42
|
|
||||||
encodings = ["foobar", "foobar"]
|
|
||||||
defaultEncoding = "foobar"
|
|
||||||
[http.middlewares.Middleware07]
|
|
||||||
[http.middlewares.Middleware07.contentType]
|
|
||||||
autoDetect = true
|
|
||||||
[http.middlewares.Middleware08]
|
|
||||||
[http.middlewares.Middleware08.digestAuth]
|
|
||||||
users = ["foobar", "foobar"]
|
|
||||||
usersFile = "foobar"
|
|
||||||
removeHeader = true
|
|
||||||
realm = "foobar"
|
|
||||||
headerField = "foobar"
|
|
||||||
[http.middlewares.Middleware09]
|
|
||||||
[http.middlewares.Middleware09.errors]
|
|
||||||
status = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
query = "foobar"
|
|
||||||
errorRequestHeaders = ["foobar", "foobar"]
|
|
||||||
[http.middlewares.Middleware09.errors.statusRewrites]
|
|
||||||
name0 = 42
|
|
||||||
name1 = 42
|
|
||||||
[http.middlewares.Middleware10]
|
|
||||||
[http.middlewares.Middleware10.forwardAuth]
|
|
||||||
address = "foobar"
|
|
||||||
trustForwardHeader = true
|
|
||||||
authResponseHeaders = ["foobar", "foobar"]
|
|
||||||
authResponseHeadersRegex = "foobar"
|
|
||||||
authRequestHeaders = ["foobar", "foobar"]
|
|
||||||
maxResponseBodySize = 42
|
|
||||||
addAuthCookiesToResponse = ["foobar", "foobar"]
|
|
||||||
headerField = "foobar"
|
|
||||||
forwardBody = true
|
|
||||||
maxBodySize = 42
|
|
||||||
preserveLocationHeader = true
|
|
||||||
preserveRequestMethod = true
|
|
||||||
[http.middlewares.Middleware10.forwardAuth.tls]
|
|
||||||
ca = "foobar"
|
|
||||||
cert = "foobar"
|
|
||||||
key = "foobar"
|
|
||||||
insecureSkipVerify = true
|
|
||||||
caOptional = true
|
|
||||||
[http.middlewares.Middleware11]
|
|
||||||
[http.middlewares.Middleware11.grpcWeb]
|
|
||||||
allowOrigins = ["foobar", "foobar"]
|
|
||||||
[http.middlewares.Middleware12]
|
|
||||||
[http.middlewares.Middleware12.headers]
|
|
||||||
accessControlAllowCredentials = true
|
|
||||||
accessControlAllowHeaders = ["foobar", "foobar"]
|
|
||||||
accessControlAllowMethods = ["foobar", "foobar"]
|
|
||||||
accessControlAllowOriginList = ["foobar", "foobar"]
|
|
||||||
accessControlAllowOriginListRegex = ["foobar", "foobar"]
|
|
||||||
accessControlExposeHeaders = ["foobar", "foobar"]
|
|
||||||
accessControlMaxAge = 42
|
|
||||||
addVaryHeader = true
|
|
||||||
allowedHosts = ["foobar", "foobar"]
|
|
||||||
hostsProxyHeaders = ["foobar", "foobar"]
|
|
||||||
stsSeconds = 42
|
|
||||||
stsIncludeSubdomains = true
|
|
||||||
stsPreload = true
|
|
||||||
forceSTSHeader = true
|
|
||||||
frameDeny = true
|
|
||||||
customFrameOptionsValue = "foobar"
|
|
||||||
contentTypeNosniff = true
|
|
||||||
browserXssFilter = true
|
|
||||||
customBrowserXSSValue = "foobar"
|
|
||||||
contentSecurityPolicy = "foobar"
|
|
||||||
contentSecurityPolicyReportOnly = "foobar"
|
|
||||||
publicKey = "foobar"
|
|
||||||
referrerPolicy = "foobar"
|
|
||||||
permissionsPolicy = "foobar"
|
|
||||||
isDevelopment = true
|
|
||||||
featurePolicy = "foobar"
|
|
||||||
sslRedirect = true
|
|
||||||
sslTemporaryRedirect = true
|
|
||||||
sslHost = "foobar"
|
|
||||||
sslForceHost = true
|
|
||||||
[http.middlewares.Middleware12.headers.customRequestHeaders]
|
|
||||||
name0 = "foobar"
|
|
||||||
name1 = "foobar"
|
|
||||||
[http.middlewares.Middleware12.headers.customResponseHeaders]
|
|
||||||
name0 = "foobar"
|
|
||||||
name1 = "foobar"
|
|
||||||
[http.middlewares.Middleware12.headers.sslProxyHeaders]
|
|
||||||
name0 = "foobar"
|
|
||||||
name1 = "foobar"
|
|
||||||
[http.middlewares.Middleware13]
|
|
||||||
[http.middlewares.Middleware13.ipAllowList]
|
|
||||||
sourceRange = ["foobar", "foobar"]
|
|
||||||
rejectStatusCode = 42
|
|
||||||
[http.middlewares.Middleware13.ipAllowList.ipStrategy]
|
|
||||||
depth = 42
|
|
||||||
excludedIPs = ["foobar", "foobar"]
|
|
||||||
ipv6Subnet = 42
|
|
||||||
[http.middlewares.Middleware14]
|
|
||||||
[http.middlewares.Middleware14.ipWhiteList]
|
|
||||||
sourceRange = ["foobar", "foobar"]
|
|
||||||
[http.middlewares.Middleware14.ipWhiteList.ipStrategy]
|
|
||||||
depth = 42
|
|
||||||
excludedIPs = ["foobar", "foobar"]
|
|
||||||
ipv6Subnet = 42
|
|
||||||
[http.middlewares.Middleware15]
|
|
||||||
[http.middlewares.Middleware15.inFlightReq]
|
|
||||||
amount = 42
|
|
||||||
[http.middlewares.Middleware15.inFlightReq.sourceCriterion]
|
|
||||||
requestHeaderName = "foobar"
|
|
||||||
requestHost = true
|
|
||||||
[http.middlewares.Middleware15.inFlightReq.sourceCriterion.ipStrategy]
|
|
||||||
depth = 42
|
|
||||||
excludedIPs = ["foobar", "foobar"]
|
|
||||||
ipv6Subnet = 42
|
|
||||||
[http.middlewares.Middleware16]
|
|
||||||
[http.middlewares.Middleware16.passTLSClientCert]
|
|
||||||
pem = true
|
|
||||||
[http.middlewares.Middleware16.passTLSClientCert.info]
|
|
||||||
notAfter = true
|
|
||||||
notBefore = true
|
|
||||||
sans = true
|
|
||||||
serialNumber = true
|
|
||||||
[http.middlewares.Middleware16.passTLSClientCert.info.subject]
|
|
||||||
country = true
|
|
||||||
province = true
|
|
||||||
locality = true
|
|
||||||
organization = true
|
|
||||||
organizationalUnit = true
|
|
||||||
commonName = true
|
|
||||||
serialNumber = true
|
|
||||||
domainComponent = true
|
|
||||||
[http.middlewares.Middleware16.passTLSClientCert.info.issuer]
|
|
||||||
country = true
|
|
||||||
province = true
|
|
||||||
locality = true
|
|
||||||
organization = true
|
|
||||||
commonName = true
|
|
||||||
serialNumber = true
|
|
||||||
domainComponent = true
|
|
||||||
[http.middlewares.Middleware17]
|
|
||||||
[http.middlewares.Middleware17.plugin]
|
|
||||||
[http.middlewares.Middleware17.plugin.PluginConf0]
|
|
||||||
name0 = "foobar"
|
|
||||||
name1 = "foobar"
|
|
||||||
[http.middlewares.Middleware17.plugin.PluginConf1]
|
|
||||||
name0 = "foobar"
|
|
||||||
name1 = "foobar"
|
|
||||||
[http.middlewares.Middleware18]
|
|
||||||
[http.middlewares.Middleware18.rateLimit]
|
|
||||||
average = 42
|
|
||||||
period = "42s"
|
|
||||||
burst = 42
|
|
||||||
[http.middlewares.Middleware18.rateLimit.sourceCriterion]
|
|
||||||
requestHeaderName = "foobar"
|
|
||||||
requestHost = true
|
|
||||||
[http.middlewares.Middleware18.rateLimit.sourceCriterion.ipStrategy]
|
|
||||||
depth = 42
|
|
||||||
excludedIPs = ["foobar", "foobar"]
|
|
||||||
ipv6Subnet = 42
|
|
||||||
[http.middlewares.Middleware18.rateLimit.redis]
|
|
||||||
endpoints = ["foobar", "foobar"]
|
|
||||||
username = "foobar"
|
|
||||||
password = "foobar"
|
|
||||||
db = 42
|
|
||||||
poolSize = 42
|
|
||||||
minIdleConns = 42
|
|
||||||
maxActiveConns = 42
|
|
||||||
readTimeout = "42s"
|
|
||||||
writeTimeout = "42s"
|
|
||||||
dialTimeout = "42s"
|
|
||||||
[http.middlewares.Middleware18.rateLimit.redis.tls]
|
|
||||||
ca = "foobar"
|
|
||||||
cert = "foobar"
|
|
||||||
key = "foobar"
|
|
||||||
insecureSkipVerify = true
|
|
||||||
[http.middlewares.Middleware19]
|
|
||||||
[http.middlewares.Middleware19.redirectRegex]
|
|
||||||
regex = "foobar"
|
|
||||||
replacement = "foobar"
|
|
||||||
permanent = true
|
|
||||||
[http.middlewares.Middleware20]
|
|
||||||
[http.middlewares.Middleware20.redirectScheme]
|
|
||||||
scheme = "foobar"
|
|
||||||
port = "foobar"
|
|
||||||
permanent = true
|
|
||||||
[http.middlewares.Middleware21]
|
|
||||||
[http.middlewares.Middleware21.replacePath]
|
|
||||||
path = "foobar"
|
|
||||||
[http.middlewares.Middleware22]
|
|
||||||
[http.middlewares.Middleware22.replacePathRegex]
|
|
||||||
regex = "foobar"
|
|
||||||
replacement = "foobar"
|
|
||||||
[http.middlewares.Middleware23]
|
|
||||||
[http.middlewares.Middleware23.retry]
|
|
||||||
attempts = 42
|
|
||||||
initialInterval = "42s"
|
|
||||||
[http.middlewares.Middleware24]
|
|
||||||
[http.middlewares.Middleware24.stripPrefix]
|
|
||||||
prefixes = ["foobar", "foobar"]
|
|
||||||
forceSlash = true
|
|
||||||
[http.middlewares.Middleware25]
|
|
||||||
[http.middlewares.Middleware25.stripPrefixRegex]
|
|
||||||
regex = ["foobar", "foobar"]
|
|
||||||
[http.serversTransports]
|
|
||||||
[http.serversTransports.ServersTransport0]
|
|
||||||
serverName = "foobar"
|
|
||||||
insecureSkipVerify = true
|
|
||||||
rootCAs = ["foobar", "foobar"]
|
|
||||||
maxIdleConnsPerHost = 42
|
|
||||||
disableHTTP2 = true
|
|
||||||
peerCertURI = "foobar"
|
|
||||||
|
|
||||||
[[http.serversTransports.ServersTransport0.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
|
|
||||||
[[http.serversTransports.ServersTransport0.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
[http.serversTransports.ServersTransport0.forwardingTimeouts]
|
|
||||||
dialTimeout = "42s"
|
|
||||||
responseHeaderTimeout = "42s"
|
|
||||||
idleConnTimeout = "42s"
|
|
||||||
readIdleTimeout = "42s"
|
|
||||||
pingTimeout = "42s"
|
|
||||||
[http.serversTransports.ServersTransport0.spiffe]
|
|
||||||
ids = ["foobar", "foobar"]
|
|
||||||
trustDomain = "foobar"
|
|
||||||
[http.serversTransports.ServersTransport1]
|
|
||||||
serverName = "foobar"
|
|
||||||
insecureSkipVerify = true
|
|
||||||
rootCAs = ["foobar", "foobar"]
|
|
||||||
maxIdleConnsPerHost = 42
|
|
||||||
disableHTTP2 = true
|
|
||||||
peerCertURI = "foobar"
|
|
||||||
|
|
||||||
[[http.serversTransports.ServersTransport1.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
|
|
||||||
[[http.serversTransports.ServersTransport1.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
[http.serversTransports.ServersTransport1.forwardingTimeouts]
|
|
||||||
dialTimeout = "42s"
|
|
||||||
responseHeaderTimeout = "42s"
|
|
||||||
idleConnTimeout = "42s"
|
|
||||||
readIdleTimeout = "42s"
|
|
||||||
pingTimeout = "42s"
|
|
||||||
[http.serversTransports.ServersTransport1.spiffe]
|
|
||||||
ids = ["foobar", "foobar"]
|
|
||||||
trustDomain = "foobar"
|
|
||||||
|
|
||||||
[tcp]
|
|
||||||
[tcp.routers]
|
|
||||||
[tcp.routers.TCPRouter0]
|
|
||||||
entryPoints = ["foobar", "foobar"]
|
|
||||||
middlewares = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
rule = "foobar"
|
|
||||||
ruleSyntax = "foobar"
|
|
||||||
priority = 42
|
|
||||||
[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"]
|
|
||||||
middlewares = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
rule = "foobar"
|
|
||||||
ruleSyntax = "foobar"
|
|
||||||
priority = 42
|
|
||||||
[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.TCPService01]
|
|
||||||
[tcp.services.TCPService01.loadBalancer]
|
|
||||||
serversTransport = "foobar"
|
|
||||||
terminationDelay = 42
|
|
||||||
|
|
||||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
|
||||||
address = "foobar"
|
|
||||||
tls = true
|
|
||||||
|
|
||||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
|
||||||
address = "foobar"
|
|
||||||
tls = true
|
|
||||||
[tcp.services.TCPService01.loadBalancer.proxyProtocol]
|
|
||||||
version = 42
|
|
||||||
[tcp.services.TCPService01.loadBalancer.healthCheck]
|
|
||||||
port = 42
|
|
||||||
send = "foobar"
|
|
||||||
expect = "foobar"
|
|
||||||
interval = "42s"
|
|
||||||
unhealthyInterval = "42s"
|
|
||||||
timeout = "42s"
|
|
||||||
[tcp.services.TCPService02]
|
|
||||||
[tcp.services.TCPService02.weighted]
|
|
||||||
|
|
||||||
[[tcp.services.TCPService02.weighted.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
|
|
||||||
[[tcp.services.TCPService02.weighted.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
[tcp.services.TCPService02.weighted.healthCheck]
|
|
||||||
[tcp.middlewares]
|
|
||||||
[tcp.middlewares.TCPMiddleware01]
|
|
||||||
[tcp.middlewares.TCPMiddleware01.ipAllowList]
|
|
||||||
sourceRange = ["foobar", "foobar"]
|
|
||||||
[tcp.middlewares.TCPMiddleware02]
|
|
||||||
[tcp.middlewares.TCPMiddleware02.ipWhiteList]
|
|
||||||
sourceRange = ["foobar", "foobar"]
|
|
||||||
[tcp.middlewares.TCPMiddleware03]
|
|
||||||
[tcp.middlewares.TCPMiddleware03.inFlightConn]
|
|
||||||
amount = 42
|
|
||||||
[tcp.serversTransports]
|
|
||||||
[tcp.serversTransports.TCPServersTransport0]
|
|
||||||
dialKeepAlive = "42s"
|
|
||||||
dialTimeout = "42s"
|
|
||||||
terminationDelay = "42s"
|
|
||||||
[tcp.serversTransports.TCPServersTransport0.proxyProtocol]
|
|
||||||
version = 42
|
|
||||||
[tcp.serversTransports.TCPServersTransport0.tls]
|
|
||||||
serverName = "foobar"
|
|
||||||
insecureSkipVerify = true
|
|
||||||
rootCAs = ["foobar", "foobar"]
|
|
||||||
peerCertURI = "foobar"
|
|
||||||
|
|
||||||
[[tcp.serversTransports.TCPServersTransport0.tls.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
|
|
||||||
[[tcp.serversTransports.TCPServersTransport0.tls.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
[tcp.serversTransports.TCPServersTransport0.tls.spiffe]
|
|
||||||
ids = ["foobar", "foobar"]
|
|
||||||
trustDomain = "foobar"
|
|
||||||
[tcp.serversTransports.TCPServersTransport1]
|
|
||||||
dialKeepAlive = "42s"
|
|
||||||
dialTimeout = "42s"
|
|
||||||
terminationDelay = "42s"
|
|
||||||
[tcp.serversTransports.TCPServersTransport1.proxyProtocol]
|
|
||||||
version = 42
|
|
||||||
[tcp.serversTransports.TCPServersTransport1.tls]
|
|
||||||
serverName = "foobar"
|
|
||||||
insecureSkipVerify = true
|
|
||||||
rootCAs = ["foobar", "foobar"]
|
|
||||||
peerCertURI = "foobar"
|
|
||||||
|
|
||||||
[[tcp.serversTransports.TCPServersTransport1.tls.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
|
|
||||||
[[tcp.serversTransports.TCPServersTransport1.tls.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
[tcp.serversTransports.TCPServersTransport1.tls.spiffe]
|
|
||||||
ids = ["foobar", "foobar"]
|
|
||||||
trustDomain = "foobar"
|
|
||||||
|
|
||||||
[udp]
|
|
||||||
[udp.routers]
|
|
||||||
[udp.routers.UDPRouter0]
|
|
||||||
entryPoints = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
[udp.routers.UDPRouter1]
|
|
||||||
entryPoints = ["foobar", "foobar"]
|
|
||||||
service = "foobar"
|
|
||||||
[udp.services]
|
|
||||||
[udp.services.UDPService01]
|
|
||||||
[udp.services.UDPService01.loadBalancer]
|
|
||||||
|
|
||||||
[[udp.services.UDPService01.loadBalancer.servers]]
|
|
||||||
address = "foobar"
|
|
||||||
|
|
||||||
[[udp.services.UDPService01.loadBalancer.servers]]
|
|
||||||
address = "foobar"
|
|
||||||
[udp.services.UDPService02]
|
|
||||||
[udp.services.UDPService02.weighted]
|
|
||||||
|
|
||||||
[[udp.services.UDPService02.weighted.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
|
|
||||||
[[udp.services.UDPService02.weighted.services]]
|
|
||||||
name = "foobar"
|
|
||||||
weight = 42
|
|
||||||
|
|
||||||
[tls]
|
|
||||||
|
|
||||||
[[tls.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
stores = ["foobar", "foobar"]
|
|
||||||
|
|
||||||
[[tls.certificates]]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
stores = ["foobar", "foobar"]
|
|
||||||
[tls.options]
|
|
||||||
[tls.options.Options0]
|
|
||||||
minVersion = "foobar"
|
|
||||||
maxVersion = "foobar"
|
|
||||||
cipherSuites = ["foobar", "foobar"]
|
|
||||||
curvePreferences = ["foobar", "foobar"]
|
|
||||||
sniStrict = true
|
|
||||||
alpnProtocols = ["foobar", "foobar"]
|
|
||||||
disableSessionTickets = true
|
|
||||||
preferServerCipherSuites = true
|
|
||||||
[tls.options.Options0.clientAuth]
|
|
||||||
caFiles = ["foobar", "foobar"]
|
|
||||||
clientAuthType = "foobar"
|
|
||||||
[tls.options.Options1]
|
|
||||||
minVersion = "foobar"
|
|
||||||
maxVersion = "foobar"
|
|
||||||
cipherSuites = ["foobar", "foobar"]
|
|
||||||
curvePreferences = ["foobar", "foobar"]
|
|
||||||
sniStrict = true
|
|
||||||
alpnProtocols = ["foobar", "foobar"]
|
|
||||||
disableSessionTickets = true
|
|
||||||
preferServerCipherSuites = true
|
|
||||||
[tls.options.Options1.clientAuth]
|
|
||||||
caFiles = ["foobar", "foobar"]
|
|
||||||
clientAuthType = "foobar"
|
|
||||||
[tls.stores]
|
|
||||||
[tls.stores.Store0]
|
|
||||||
[tls.stores.Store0.defaultCertificate]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
[tls.stores.Store0.defaultGeneratedCert]
|
|
||||||
resolver = "foobar"
|
|
||||||
[tls.stores.Store0.defaultGeneratedCert.domain]
|
|
||||||
main = "foobar"
|
|
||||||
sans = ["foobar", "foobar"]
|
|
||||||
[tls.stores.Store1]
|
|
||||||
[tls.stores.Store1.defaultCertificate]
|
|
||||||
certFile = "foobar"
|
|
||||||
keyFile = "foobar"
|
|
||||||
[tls.stores.Store1.defaultGeneratedCert]
|
|
||||||
resolver = "foobar"
|
|
||||||
[tls.stores.Store1.defaultGeneratedCert.domain]
|
|
||||||
main = "foobar"
|
|
||||||
sans = ["foobar", "foobar"]
|
|
||||||
@@ -1,727 +0,0 @@
|
|||||||
## CODE GENERATED AUTOMATICALLY
|
|
||||||
## THIS FILE MUST NOT BE EDITED BY HAND
|
|
||||||
http:
|
|
||||||
routers:
|
|
||||||
Router0:
|
|
||||||
entryPoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
middlewares:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
service: foobar
|
|
||||||
rule: foobar
|
|
||||||
parentRefs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ruleSyntax: foobar
|
|
||||||
priority: 42
|
|
||||||
tls:
|
|
||||||
options: foobar
|
|
||||||
certResolver: foobar
|
|
||||||
domains:
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
observability:
|
|
||||||
accessLogs: true
|
|
||||||
metrics: true
|
|
||||||
tracing: true
|
|
||||||
traceVerbosity: foobar
|
|
||||||
Router1:
|
|
||||||
entryPoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
middlewares:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
service: foobar
|
|
||||||
rule: foobar
|
|
||||||
parentRefs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ruleSyntax: foobar
|
|
||||||
priority: 42
|
|
||||||
tls:
|
|
||||||
options: foobar
|
|
||||||
certResolver: foobar
|
|
||||||
domains:
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
observability:
|
|
||||||
accessLogs: true
|
|
||||||
metrics: true
|
|
||||||
tracing: true
|
|
||||||
traceVerbosity: foobar
|
|
||||||
services:
|
|
||||||
Service01:
|
|
||||||
failover:
|
|
||||||
service: foobar
|
|
||||||
fallback: foobar
|
|
||||||
healthCheck: {}
|
|
||||||
Service02:
|
|
||||||
highestRandomWeight:
|
|
||||||
services:
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
healthCheck: {}
|
|
||||||
Service03:
|
|
||||||
loadBalancer:
|
|
||||||
sticky:
|
|
||||||
cookie:
|
|
||||||
name: foobar
|
|
||||||
secure: true
|
|
||||||
httpOnly: true
|
|
||||||
sameSite: foobar
|
|
||||||
maxAge: 42
|
|
||||||
path: foobar
|
|
||||||
domain: foobar
|
|
||||||
servers:
|
|
||||||
- url: foobar
|
|
||||||
weight: 42
|
|
||||||
preservePath: true
|
|
||||||
- url: foobar
|
|
||||||
weight: 42
|
|
||||||
preservePath: true
|
|
||||||
strategy: foobar
|
|
||||||
healthCheck:
|
|
||||||
scheme: foobar
|
|
||||||
mode: foobar
|
|
||||||
path: foobar
|
|
||||||
method: foobar
|
|
||||||
status: 42
|
|
||||||
port: 42
|
|
||||||
interval: 42s
|
|
||||||
unhealthyInterval: 42s
|
|
||||||
timeout: 42s
|
|
||||||
hostname: foobar
|
|
||||||
followRedirects: true
|
|
||||||
headers:
|
|
||||||
name0: foobar
|
|
||||||
name1: foobar
|
|
||||||
passiveHealthCheck:
|
|
||||||
failureWindow: 42s
|
|
||||||
maxFailedAttempts: 42
|
|
||||||
passHostHeader: true
|
|
||||||
responseForwarding:
|
|
||||||
flushInterval: 42s
|
|
||||||
serversTransport: foobar
|
|
||||||
Service04:
|
|
||||||
mirroring:
|
|
||||||
service: foobar
|
|
||||||
mirrorBody: true
|
|
||||||
maxBodySize: 42
|
|
||||||
mirrors:
|
|
||||||
- name: foobar
|
|
||||||
percent: 42
|
|
||||||
- name: foobar
|
|
||||||
percent: 42
|
|
||||||
healthCheck: {}
|
|
||||||
Service05:
|
|
||||||
weighted:
|
|
||||||
services:
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
sticky:
|
|
||||||
cookie:
|
|
||||||
name: foobar
|
|
||||||
secure: true
|
|
||||||
httpOnly: true
|
|
||||||
sameSite: foobar
|
|
||||||
maxAge: 42
|
|
||||||
path: foobar
|
|
||||||
domain: foobar
|
|
||||||
healthCheck: {}
|
|
||||||
middlewares:
|
|
||||||
Middleware01:
|
|
||||||
addPrefix:
|
|
||||||
prefix: foobar
|
|
||||||
Middleware02:
|
|
||||||
basicAuth:
|
|
||||||
users:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
usersFile: foobar
|
|
||||||
realm: foobar
|
|
||||||
removeHeader: true
|
|
||||||
headerField: foobar
|
|
||||||
Middleware03:
|
|
||||||
buffering:
|
|
||||||
maxRequestBodyBytes: 42
|
|
||||||
memRequestBodyBytes: 42
|
|
||||||
maxResponseBodyBytes: 42
|
|
||||||
memResponseBodyBytes: 42
|
|
||||||
retryExpression: foobar
|
|
||||||
Middleware04:
|
|
||||||
chain:
|
|
||||||
middlewares:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
Middleware05:
|
|
||||||
circuitBreaker:
|
|
||||||
expression: foobar
|
|
||||||
checkPeriod: 42s
|
|
||||||
fallbackDuration: 42s
|
|
||||||
recoveryDuration: 42s
|
|
||||||
responseCode: 42
|
|
||||||
Middleware06:
|
|
||||||
compress:
|
|
||||||
excludedContentTypes:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
includedContentTypes:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
minResponseBodyBytes: 42
|
|
||||||
encodings:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
defaultEncoding: foobar
|
|
||||||
Middleware07:
|
|
||||||
contentType:
|
|
||||||
autoDetect: true
|
|
||||||
Middleware08:
|
|
||||||
digestAuth:
|
|
||||||
users:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
usersFile: foobar
|
|
||||||
removeHeader: true
|
|
||||||
realm: foobar
|
|
||||||
headerField: foobar
|
|
||||||
Middleware09:
|
|
||||||
errors:
|
|
||||||
status:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
statusRewrites:
|
|
||||||
name0: 42
|
|
||||||
name1: 42
|
|
||||||
service: foobar
|
|
||||||
query: foobar
|
|
||||||
errorRequestHeaders:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
Middleware10:
|
|
||||||
forwardAuth:
|
|
||||||
address: foobar
|
|
||||||
tls:
|
|
||||||
ca: foobar
|
|
||||||
cert: foobar
|
|
||||||
key: foobar
|
|
||||||
insecureSkipVerify: true
|
|
||||||
caOptional: true
|
|
||||||
trustForwardHeader: true
|
|
||||||
authResponseHeaders:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
authResponseHeadersRegex: foobar
|
|
||||||
authRequestHeaders:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
maxResponseBodySize: 42
|
|
||||||
addAuthCookiesToResponse:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
headerField: foobar
|
|
||||||
forwardBody: true
|
|
||||||
maxBodySize: 42
|
|
||||||
preserveLocationHeader: true
|
|
||||||
preserveRequestMethod: true
|
|
||||||
Middleware11:
|
|
||||||
grpcWeb:
|
|
||||||
allowOrigins:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
Middleware12:
|
|
||||||
headers:
|
|
||||||
customRequestHeaders:
|
|
||||||
name0: foobar
|
|
||||||
name1: foobar
|
|
||||||
customResponseHeaders:
|
|
||||||
name0: foobar
|
|
||||||
name1: foobar
|
|
||||||
accessControlAllowCredentials: true
|
|
||||||
accessControlAllowHeaders:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
accessControlAllowMethods:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
accessControlAllowOriginList:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
accessControlAllowOriginListRegex:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
accessControlExposeHeaders:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
accessControlMaxAge: 42
|
|
||||||
addVaryHeader: true
|
|
||||||
allowedHosts:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
hostsProxyHeaders:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
sslProxyHeaders:
|
|
||||||
name0: foobar
|
|
||||||
name1: foobar
|
|
||||||
stsSeconds: 42
|
|
||||||
stsIncludeSubdomains: true
|
|
||||||
stsPreload: true
|
|
||||||
forceSTSHeader: true
|
|
||||||
frameDeny: true
|
|
||||||
customFrameOptionsValue: foobar
|
|
||||||
contentTypeNosniff: true
|
|
||||||
browserXssFilter: true
|
|
||||||
customBrowserXSSValue: foobar
|
|
||||||
contentSecurityPolicy: foobar
|
|
||||||
contentSecurityPolicyReportOnly: foobar
|
|
||||||
publicKey: foobar
|
|
||||||
referrerPolicy: foobar
|
|
||||||
permissionsPolicy: foobar
|
|
||||||
isDevelopment: true
|
|
||||||
featurePolicy: foobar
|
|
||||||
sslRedirect: true
|
|
||||||
sslTemporaryRedirect: true
|
|
||||||
sslHost: foobar
|
|
||||||
sslForceHost: true
|
|
||||||
Middleware13:
|
|
||||||
ipAllowList:
|
|
||||||
sourceRange:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ipStrategy:
|
|
||||||
depth: 42
|
|
||||||
excludedIPs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ipv6Subnet: 42
|
|
||||||
rejectStatusCode: 42
|
|
||||||
Middleware14:
|
|
||||||
ipWhiteList:
|
|
||||||
sourceRange:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ipStrategy:
|
|
||||||
depth: 42
|
|
||||||
excludedIPs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ipv6Subnet: 42
|
|
||||||
Middleware15:
|
|
||||||
inFlightReq:
|
|
||||||
amount: 42
|
|
||||||
sourceCriterion:
|
|
||||||
ipStrategy:
|
|
||||||
depth: 42
|
|
||||||
excludedIPs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ipv6Subnet: 42
|
|
||||||
requestHeaderName: foobar
|
|
||||||
requestHost: true
|
|
||||||
Middleware16:
|
|
||||||
passTLSClientCert:
|
|
||||||
pem: true
|
|
||||||
info:
|
|
||||||
notAfter: true
|
|
||||||
notBefore: true
|
|
||||||
sans: true
|
|
||||||
serialNumber: true
|
|
||||||
subject:
|
|
||||||
country: true
|
|
||||||
province: true
|
|
||||||
locality: true
|
|
||||||
organization: true
|
|
||||||
organizationalUnit: true
|
|
||||||
commonName: true
|
|
||||||
serialNumber: true
|
|
||||||
domainComponent: true
|
|
||||||
issuer:
|
|
||||||
country: true
|
|
||||||
province: true
|
|
||||||
locality: true
|
|
||||||
organization: true
|
|
||||||
commonName: true
|
|
||||||
serialNumber: true
|
|
||||||
domainComponent: true
|
|
||||||
Middleware17:
|
|
||||||
plugin:
|
|
||||||
PluginConf0:
|
|
||||||
name0: foobar
|
|
||||||
name1: foobar
|
|
||||||
PluginConf1:
|
|
||||||
name0: foobar
|
|
||||||
name1: foobar
|
|
||||||
Middleware18:
|
|
||||||
rateLimit:
|
|
||||||
average: 42
|
|
||||||
period: 42s
|
|
||||||
burst: 42
|
|
||||||
sourceCriterion:
|
|
||||||
ipStrategy:
|
|
||||||
depth: 42
|
|
||||||
excludedIPs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
ipv6Subnet: 42
|
|
||||||
requestHeaderName: foobar
|
|
||||||
requestHost: true
|
|
||||||
redis:
|
|
||||||
endpoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
tls:
|
|
||||||
ca: foobar
|
|
||||||
cert: foobar
|
|
||||||
key: foobar
|
|
||||||
insecureSkipVerify: true
|
|
||||||
username: foobar
|
|
||||||
password: foobar
|
|
||||||
db: 42
|
|
||||||
poolSize: 42
|
|
||||||
minIdleConns: 42
|
|
||||||
maxActiveConns: 42
|
|
||||||
readTimeout: 42s
|
|
||||||
writeTimeout: 42s
|
|
||||||
dialTimeout: 42s
|
|
||||||
Middleware19:
|
|
||||||
redirectRegex:
|
|
||||||
regex: foobar
|
|
||||||
replacement: foobar
|
|
||||||
permanent: true
|
|
||||||
Middleware20:
|
|
||||||
redirectScheme:
|
|
||||||
scheme: foobar
|
|
||||||
port: foobar
|
|
||||||
permanent: true
|
|
||||||
Middleware21:
|
|
||||||
replacePath:
|
|
||||||
path: foobar
|
|
||||||
Middleware22:
|
|
||||||
replacePathRegex:
|
|
||||||
regex: foobar
|
|
||||||
replacement: foobar
|
|
||||||
Middleware23:
|
|
||||||
retry:
|
|
||||||
attempts: 42
|
|
||||||
initialInterval: 42s
|
|
||||||
Middleware24:
|
|
||||||
stripPrefix:
|
|
||||||
prefixes:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
forceSlash: true
|
|
||||||
Middleware25:
|
|
||||||
stripPrefixRegex:
|
|
||||||
regex:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
serversTransports:
|
|
||||||
ServersTransport0:
|
|
||||||
serverName: foobar
|
|
||||||
insecureSkipVerify: true
|
|
||||||
rootCAs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
certificates:
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
maxIdleConnsPerHost: 42
|
|
||||||
forwardingTimeouts:
|
|
||||||
dialTimeout: 42s
|
|
||||||
responseHeaderTimeout: 42s
|
|
||||||
idleConnTimeout: 42s
|
|
||||||
readIdleTimeout: 42s
|
|
||||||
pingTimeout: 42s
|
|
||||||
disableHTTP2: true
|
|
||||||
peerCertURI: foobar
|
|
||||||
spiffe:
|
|
||||||
ids:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
trustDomain: foobar
|
|
||||||
ServersTransport1:
|
|
||||||
serverName: foobar
|
|
||||||
insecureSkipVerify: true
|
|
||||||
rootCAs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
certificates:
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
maxIdleConnsPerHost: 42
|
|
||||||
forwardingTimeouts:
|
|
||||||
dialTimeout: 42s
|
|
||||||
responseHeaderTimeout: 42s
|
|
||||||
idleConnTimeout: 42s
|
|
||||||
readIdleTimeout: 42s
|
|
||||||
pingTimeout: 42s
|
|
||||||
disableHTTP2: true
|
|
||||||
peerCertURI: foobar
|
|
||||||
spiffe:
|
|
||||||
ids:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
trustDomain: foobar
|
|
||||||
tcp:
|
|
||||||
routers:
|
|
||||||
TCPRouter0:
|
|
||||||
entryPoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
middlewares:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
service: foobar
|
|
||||||
rule: foobar
|
|
||||||
ruleSyntax: foobar
|
|
||||||
priority: 42
|
|
||||||
tls:
|
|
||||||
passthrough: true
|
|
||||||
options: foobar
|
|
||||||
certResolver: foobar
|
|
||||||
domains:
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
TCPRouter1:
|
|
||||||
entryPoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
middlewares:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
service: foobar
|
|
||||||
rule: foobar
|
|
||||||
ruleSyntax: foobar
|
|
||||||
priority: 42
|
|
||||||
tls:
|
|
||||||
passthrough: true
|
|
||||||
options: foobar
|
|
||||||
certResolver: foobar
|
|
||||||
domains:
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
- main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
services:
|
|
||||||
TCPService01:
|
|
||||||
loadBalancer:
|
|
||||||
servers:
|
|
||||||
- address: foobar
|
|
||||||
tls: true
|
|
||||||
- address: foobar
|
|
||||||
tls: true
|
|
||||||
serversTransport: foobar
|
|
||||||
proxyProtocol:
|
|
||||||
version: 42
|
|
||||||
terminationDelay: 42
|
|
||||||
healthCheck:
|
|
||||||
port: 42
|
|
||||||
send: foobar
|
|
||||||
expect: foobar
|
|
||||||
interval: 42s
|
|
||||||
unhealthyInterval: 42s
|
|
||||||
timeout: 42s
|
|
||||||
TCPService02:
|
|
||||||
weighted:
|
|
||||||
services:
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
healthCheck: {}
|
|
||||||
middlewares:
|
|
||||||
TCPMiddleware01:
|
|
||||||
ipAllowList:
|
|
||||||
sourceRange:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
TCPMiddleware02:
|
|
||||||
ipWhiteList:
|
|
||||||
sourceRange:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
TCPMiddleware03:
|
|
||||||
inFlightConn:
|
|
||||||
amount: 42
|
|
||||||
serversTransports:
|
|
||||||
TCPServersTransport0:
|
|
||||||
dialKeepAlive: 42s
|
|
||||||
dialTimeout: 42s
|
|
||||||
proxyProtocol:
|
|
||||||
version: 42
|
|
||||||
terminationDelay: 42s
|
|
||||||
tls:
|
|
||||||
serverName: foobar
|
|
||||||
insecureSkipVerify: true
|
|
||||||
rootCAs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
certificates:
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
peerCertURI: foobar
|
|
||||||
spiffe:
|
|
||||||
ids:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
trustDomain: foobar
|
|
||||||
TCPServersTransport1:
|
|
||||||
dialKeepAlive: 42s
|
|
||||||
dialTimeout: 42s
|
|
||||||
proxyProtocol:
|
|
||||||
version: 42
|
|
||||||
terminationDelay: 42s
|
|
||||||
tls:
|
|
||||||
serverName: foobar
|
|
||||||
insecureSkipVerify: true
|
|
||||||
rootCAs:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
certificates:
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
peerCertURI: foobar
|
|
||||||
spiffe:
|
|
||||||
ids:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
trustDomain: foobar
|
|
||||||
udp:
|
|
||||||
routers:
|
|
||||||
UDPRouter0:
|
|
||||||
entryPoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
service: foobar
|
|
||||||
UDPRouter1:
|
|
||||||
entryPoints:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
service: foobar
|
|
||||||
services:
|
|
||||||
UDPService01:
|
|
||||||
loadBalancer:
|
|
||||||
servers:
|
|
||||||
- address: foobar
|
|
||||||
- address: foobar
|
|
||||||
UDPService02:
|
|
||||||
weighted:
|
|
||||||
services:
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
- name: foobar
|
|
||||||
weight: 42
|
|
||||||
tls:
|
|
||||||
certificates:
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
stores:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
- certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
stores:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
options:
|
|
||||||
Options0:
|
|
||||||
minVersion: foobar
|
|
||||||
maxVersion: foobar
|
|
||||||
cipherSuites:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
curvePreferences:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
clientAuth:
|
|
||||||
caFiles:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
clientAuthType: foobar
|
|
||||||
sniStrict: true
|
|
||||||
alpnProtocols:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
disableSessionTickets: true
|
|
||||||
preferServerCipherSuites: true
|
|
||||||
Options1:
|
|
||||||
minVersion: foobar
|
|
||||||
maxVersion: foobar
|
|
||||||
cipherSuites:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
curvePreferences:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
clientAuth:
|
|
||||||
caFiles:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
clientAuthType: foobar
|
|
||||||
sniStrict: true
|
|
||||||
alpnProtocols:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
disableSessionTickets: true
|
|
||||||
preferServerCipherSuites: true
|
|
||||||
stores:
|
|
||||||
Store0:
|
|
||||||
defaultCertificate:
|
|
||||||
certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
defaultGeneratedCert:
|
|
||||||
resolver: foobar
|
|
||||||
domain:
|
|
||||||
main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
Store1:
|
|
||||||
defaultCertificate:
|
|
||||||
certFile: foobar
|
|
||||||
keyFile: foobar
|
|
||||||
defaultGeneratedCert:
|
|
||||||
resolver: foobar
|
|
||||||
domain:
|
|
||||||
main: foobar
|
|
||||||
sans:
|
|
||||||
- foobar
|
|
||||||
- foobar
|
|
||||||
@@ -1,131 +1,22 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
|
||||||
"sort"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/traefik/paerser/flag"
|
"github.com/traefik/paerser/flag"
|
||||||
"github.com/traefik/paerser/generator"
|
"github.com/traefik/paerser/generator"
|
||||||
"github.com/traefik/traefik/v3/cmd"
|
"github.com/traefik/traefik/v3/cmd"
|
||||||
"github.com/traefik/traefik/v3/pkg/collector/hydratation"
|
|
||||||
"github.com/traefik/traefik/v3/pkg/config/dynamic"
|
|
||||||
"gopkg.in/yaml.v3"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var commentGenerated = `## CODE GENERATED AUTOMATICALLY
|
|
||||||
## THIS FILE MUST NOT BE EDITED BY HAND
|
|
||||||
`
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
genRoutingConfDoc()
|
|
||||||
genInstallConfDoc()
|
genInstallConfDoc()
|
||||||
genAnchors()
|
genAnchors()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the Routing Configuration YAML and TOML files.
|
|
||||||
func genRoutingConfDoc() {
|
|
||||||
logger := log.With().Logger()
|
|
||||||
|
|
||||||
dynConf := &dynamic.Configuration{}
|
|
||||||
|
|
||||||
err := hydratation.Hydrate(dynConf)
|
|
||||||
if err != nil {
|
|
||||||
logger.Fatal().Err(err).Send()
|
|
||||||
}
|
|
||||||
|
|
||||||
dynConf.HTTP.Models = map[string]*dynamic.Model{}
|
|
||||||
clean(dynConf.HTTP.Middlewares)
|
|
||||||
clean(dynConf.TCP.Middlewares)
|
|
||||||
clean(dynConf.HTTP.Services)
|
|
||||||
clean(dynConf.TCP.Services)
|
|
||||||
clean(dynConf.UDP.Services)
|
|
||||||
|
|
||||||
err = tomlWrite("./docs/content/reference/routing-configuration/other-providers/file.toml", dynConf)
|
|
||||||
if err != nil {
|
|
||||||
logger.Fatal().Err(err).Send()
|
|
||||||
}
|
|
||||||
err = yamlWrite("./docs/content/reference/routing-configuration/other-providers/file.yaml", dynConf)
|
|
||||||
if err != nil {
|
|
||||||
logger.Fatal().Err(err).Send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func yamlWrite(outputFile string, element any) error {
|
|
||||||
file, err := os.OpenFile(outputFile, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o666)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
// Write the comment at the beginning of the file.
|
|
||||||
if _, err := file.WriteString(commentGenerated); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
buf := new(bytes.Buffer)
|
|
||||||
encoder := yaml.NewEncoder(buf)
|
|
||||||
encoder.SetIndent(2)
|
|
||||||
err = encoder.Encode(element)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = file.Write(buf.Bytes())
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func tomlWrite(outputFile string, element any) error {
|
|
||||||
file, err := os.OpenFile(outputFile, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o666)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
// Write the comment at the beginning of the file.
|
|
||||||
if _, err := file.WriteString(commentGenerated); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return toml.NewEncoder(file).Encode(element)
|
|
||||||
}
|
|
||||||
|
|
||||||
func clean(element any) {
|
|
||||||
valSvcs := reflect.ValueOf(element)
|
|
||||||
|
|
||||||
key := valSvcs.MapKeys()[0]
|
|
||||||
valueSvcRoot := valSvcs.MapIndex(key).Elem()
|
|
||||||
|
|
||||||
var svcFieldNames []string
|
|
||||||
for i := range valueSvcRoot.NumField() {
|
|
||||||
field := valueSvcRoot.Type().Field(i)
|
|
||||||
// do not create empty node for hidden config.
|
|
||||||
if field.Tag.Get("file") == "-" && field.Tag.Get("kv") == "-" && field.Tag.Get("label") == "-" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
svcFieldNames = append(svcFieldNames, field.Name)
|
|
||||||
}
|
|
||||||
|
|
||||||
sort.Strings(svcFieldNames)
|
|
||||||
|
|
||||||
for i, fieldName := range svcFieldNames {
|
|
||||||
v := reflect.New(valueSvcRoot.Type())
|
|
||||||
v.Elem().FieldByName(fieldName).Set(valueSvcRoot.FieldByName(fieldName))
|
|
||||||
|
|
||||||
valSvcs.SetMapIndex(reflect.ValueOf(fmt.Sprintf("%s%.2d", valueSvcRoot.Type().Name(), i+1)), v)
|
|
||||||
}
|
|
||||||
|
|
||||||
valSvcs.SetMapIndex(reflect.ValueOf(fmt.Sprintf("%s0", valueSvcRoot.Type().Name())), reflect.Value{})
|
|
||||||
valSvcs.SetMapIndex(reflect.ValueOf(fmt.Sprintf("%s1", valueSvcRoot.Type().Name())), reflect.Value{})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate the Install Configuration in a table.
|
// Generate the Install Configuration in a table.
|
||||||
func genInstallConfDoc() {
|
func genInstallConfDoc() {
|
||||||
outputFile := "./docs/content/reference/install-configuration/configuration-options.md"
|
outputFile := "./docs/content/reference/install-configuration/configuration-options.md"
|
||||||
|
|||||||
Reference in New Issue
Block a user