Use the same case everywhere
This commit is contained in:
parent
f6436663eb
commit
c7d336f958
179 changed files with 5118 additions and 4436 deletions
|
@ -18,7 +18,7 @@ Attach labels to your containers and let Traefik do the rest!
|
|||
|
||||
```toml
|
||||
[providers.docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
```
|
||||
|
||||
Attaching labels to containers (in your docker compose file)
|
||||
|
@ -136,8 +136,8 @@ Traefik requires access to the docker socket to get its dynamic configuration.
|
|||
```toml
|
||||
# ...
|
||||
[providers]
|
||||
[providers.docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
[providers.docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
```
|
||||
|
||||
### `usebindportip`
|
||||
|
@ -194,8 +194,8 @@ and the template has access to all the labels defined on this container.
|
|||
|
||||
```toml tab="File"
|
||||
[providers.docker]
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
|
|
@ -45,7 +45,7 @@ You can write these configuration elements:
|
|||
|
||||
# Add the middleware
|
||||
[http.middlewares]
|
||||
[http.middlewares.my-basic-auth.BasicAuth]
|
||||
[http.middlewares.my-basic-auth.basicAuth]
|
||||
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/",
|
||||
"test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
||||
usersFile = "etc/traefik/.htpasswd"
|
||||
|
@ -53,37 +53,42 @@ You can write these configuration elements:
|
|||
# Add the service
|
||||
[http.services]
|
||||
[http.services.service-foo]
|
||||
[http.services.service-foo.LoadBalancer]
|
||||
[[http.services.service-foo.LoadBalancer.Servers]]
|
||||
[http.services.service-foo.loadBalancer]
|
||||
[[http.services.service-foo.loadBalancer.servers]]
|
||||
url = "http://foo/"
|
||||
[[http.services.service-foo.LoadBalancer.Servers]]
|
||||
[[http.services.service-foo.loadBalancer.servers]]
|
||||
url = "http://bar/"
|
||||
```
|
||||
|
||||
```yaml tab="YAML"
|
||||
http:
|
||||
# Add the router
|
||||
routers:
|
||||
router0:
|
||||
entrypoints:
|
||||
entryPoints:
|
||||
- web
|
||||
middlewares:
|
||||
- my-basic-auth
|
||||
service: service-foo
|
||||
rule: Path(`foo`)
|
||||
|
||||
# Add the middleware
|
||||
middlewares:
|
||||
my-basic-auth:
|
||||
basicAuth:
|
||||
users:
|
||||
- test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/
|
||||
- test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0
|
||||
usersfile: etc/traefik/.htpasswd
|
||||
headerfield: ""
|
||||
usersFile: etc/traefik/.htpasswd
|
||||
|
||||
# Add the service
|
||||
services:
|
||||
service-foo:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://foo/
|
||||
- url: http://bar/
|
||||
passHostHeader: false
|
||||
```
|
||||
|
||||
## Provider Configuration Options
|
||||
|
@ -170,7 +175,7 @@ Thus, it's possible to define easily lot of routers, services and TLS certificat
|
|||
{{ end }}
|
||||
|
||||
|
||||
[http.Services]
|
||||
[http.services]
|
||||
{{ range $i, $e := until 100 }}
|
||||
[http.services.service{{ $e }}]
|
||||
# ...
|
||||
|
@ -185,7 +190,7 @@ Thus, it's possible to define easily lot of routers, services and TLS certificat
|
|||
{{ end }}
|
||||
|
||||
|
||||
[tcp.Services]
|
||||
[tcp.services]
|
||||
{{ range $i, $e := until 100 }}
|
||||
[http.services.service{{ $e }}]
|
||||
# ...
|
||||
|
@ -193,9 +198,9 @@ Thus, it's possible to define easily lot of routers, services and TLS certificat
|
|||
|
||||
{{ range $i, $e := until 10 }}
|
||||
[[tls.certificates]]
|
||||
CertFile = "/etc/traefik/cert-{{ $e }}.pem"
|
||||
KeyFile = "/etc/traefik/cert-{{ $e }}.key"
|
||||
Store = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
|
||||
certFile = "/etc/traefik/cert-{{ $e }}.pem"
|
||||
keyFile = "/etc/traefik/cert-{{ $e }}.key"
|
||||
store = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
|
||||
{{ end }}
|
||||
|
||||
[tls.config]
|
||||
|
@ -237,8 +242,8 @@ Thus, it's possible to define easily lot of routers, services and TLS certificat
|
|||
{{ range $i, $e := until 10 }}
|
||||
tls:
|
||||
certificates:
|
||||
- certfile: "/etc/traefik/cert-{{ $e }}.pem"
|
||||
keyfile: "/etc/traefik/cert-{{ $e }}.key"
|
||||
- certFile: "/etc/traefik/cert-{{ $e }}.pem"
|
||||
keyFile: "/etc/traefik/cert-{{ $e }}.key"
|
||||
store:
|
||||
- "my-store-foo-{{ $e }}"
|
||||
- "my-store-bar-{{ $e }}"
|
||||
|
|
|
@ -33,7 +33,7 @@ In this case, the endpoint is required.
|
|||
Specifically, it may be set to the URL used by `kubectl proxy` to connect to a Kubernetes cluster using the granted authentication and authorization of the associated kubeconfig.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.KubernetesCRD]
|
||||
[providers.kubernetesCRD]
|
||||
endpoint = "http://localhost:8080"
|
||||
# ...
|
||||
```
|
||||
|
@ -50,7 +50,7 @@ _Optional, Default=empty_
|
|||
Bearer token used for the Kubernetes client configuration.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.KubernetesCRD]
|
||||
[providers.kubernetesCRD]
|
||||
token = "mytoken"
|
||||
# ...
|
||||
```
|
||||
|
@ -68,7 +68,7 @@ Path to the certificate authority file.
|
|||
Used for the Kubernetes client configuration.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.KubernetesCRD]
|
||||
[providers.kubernetesCRD]
|
||||
certAuthFilePath = "/my/ca.crt"
|
||||
# ...
|
||||
```
|
||||
|
@ -85,7 +85,7 @@ _Optional, Default: all namespaces (empty array)_
|
|||
Array of namespaces to watch.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.KubernetesCRD]
|
||||
[providers.kubernetesCRD]
|
||||
namespaces = ["default", "production"]
|
||||
# ...
|
||||
```
|
||||
|
@ -105,7 +105,7 @@ A label selector can be defined to filter on specific Ingress objects only.
|
|||
See [label-selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) for details.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.KubernetesCRD]
|
||||
[providers.kubernetesCRD]
|
||||
labelselector = "A and not B"
|
||||
# ...
|
||||
```
|
||||
|
@ -125,7 +125,7 @@ If the parameter is non-empty, only Ingresses containing an annotation with the
|
|||
Otherwise, Ingresses missing the annotation, having an empty value, or the value `traefik` are processed.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.KubernetesCRD]
|
||||
[providers.kubernetesCRD]
|
||||
ingressClass = "traefik-internal"
|
||||
# ...
|
||||
```
|
||||
|
|
|
@ -13,7 +13,7 @@ See also [Marathon user guide](../user-guides/marathon.md).
|
|||
|
||||
```toml tab="File"
|
||||
[providers.marathon]
|
||||
endpoint = "http://127.0.0.1:8080"
|
||||
endpoint = "http://127.0.0.1:8080"
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
@ -58,9 +58,9 @@ _Optional_
|
|||
Enables Marathon basic authentication.
|
||||
|
||||
```toml tab="File"
|
||||
[marathon.basic]
|
||||
httpBasicAuthUser = "foo"
|
||||
httpBasicPassword = "bar"
|
||||
[providers.marathon.basic]
|
||||
httpBasicAuthUser = "foo"
|
||||
httpBasicPassword = "bar"
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
@ -79,8 +79,8 @@ If set, it overrides the Authorization header.
|
|||
|
||||
```toml tab="File"
|
||||
[providers.marathon]
|
||||
dcosToken = "xxxxxx"
|
||||
# ...
|
||||
dcosToken = "xxxxxx"
|
||||
# ...
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
@ -102,8 +102,8 @@ and the template has access to all the labels defined on this Marathon applicati
|
|||
|
||||
```toml tab="File"
|
||||
[providers.marathon]
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
@ -133,8 +133,8 @@ You can optionally specify multiple endpoints:
|
|||
|
||||
```toml tab="File"
|
||||
[providers.marathon]
|
||||
endpoint = "http://10.241.1.71:8080,10.241.1.72:8080,10.241.1.73:8080"
|
||||
# ...
|
||||
endpoint = "http://10.241.1.71:8080,10.241.1.72:8080,10.241.1.73:8080"
|
||||
# ...
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
@ -247,11 +247,11 @@ _Optional_
|
|||
TLS client configuration. [tls/#Config](https://golang.org/pkg/crypto/tls/#Config).
|
||||
|
||||
```toml tab="File"
|
||||
[marathon.TLS]
|
||||
CA = "/etc/ssl/ca.crt"
|
||||
Cert = "/etc/ssl/marathon.cert"
|
||||
Key = "/etc/ssl/marathon.key"
|
||||
insecureSkipVerify = true
|
||||
[providers.marathon.tls]
|
||||
ca = "/etc/ssl/ca.crt"
|
||||
cert = "/etc/ssl/marathon.cert"
|
||||
key = "/etc/ssl/marathon.key"
|
||||
insecureSkipVerify = true
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
@ -296,23 +296,23 @@ and the router automatically gets a rule defined by defaultRule (if no rule for
|
|||
### Routers
|
||||
|
||||
To update the configuration of the Router automatically attached to the application,
|
||||
add labels starting with `traefik.HTTP.Routers.{router-name-of-your-choice}.` and followed by the option you want to change.
|
||||
For example, to change the routing rule, you could add the label ```traefik.HTTP.Routers.Routername.Rule=Host(`my-domain`)```.
|
||||
add labels starting with `traefik.http.routers.{router-name-of-your-choice}.` and followed by the option you want to change.
|
||||
For example, to change the routing rule, you could add the label ```traefik.http.routers.routername.rule=Host(`my-domain`)```.
|
||||
|
||||
Every [Router](../routing/routers/index.md) parameter can be updated this way.
|
||||
|
||||
### Services
|
||||
|
||||
To update the configuration of the Service automatically attached to the container,
|
||||
add labels starting with `traefik.HTTP.Services.{service-name-of-your-choice}.`, followed by the option you want to change.
|
||||
For example, to change the passhostheader behavior, you'd add the label `traefik.HTTP.Services.Servicename.LoadBalancer.PassHostHeader=false`.
|
||||
add labels starting with `traefik.http.services.{service-name-of-your-choice}.`, followed by the option you want to change.
|
||||
For example, to change the passHostHeader behavior, you'd add the label `traefik.http.services.servicename.loadbalancer.passhostheader=false`.
|
||||
|
||||
Every [Service](../routing/services/index.md) parameter can be updated this way.
|
||||
|
||||
### Middleware
|
||||
|
||||
You can declare pieces of middleware using labels starting with `traefik.HTTP.Middlewares.{middleware-name-of-your-choice}.`, followed by the middleware type/options.
|
||||
For example, to declare a middleware [`redirectscheme`](../middlewares/redirectscheme.md) named `my-redirect`, you'd write `traefik.HTTP.Middlewares.my-redirect.RedirectScheme.Scheme: https`.
|
||||
You can declare pieces of middleware using labels starting with `traefik.http.middlewares.{middleware-name-of-your-choice}.`, followed by the middleware type/options.
|
||||
For example, to declare a middleware [`redirectscheme`](../middlewares/redirectscheme.md) named `my-redirect`, you'd write `traefik.http.middlewares.my-redirect.redirectscheme.scheme: https`.
|
||||
|
||||
??? example "Declaring and Referencing a Middleware"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Attach labels to your services and let Traefik do the rest!
|
|||
Enabling the rancher provider
|
||||
|
||||
```toml
|
||||
[Providers.Rancher]
|
||||
[providers.rancher]
|
||||
```
|
||||
|
||||
Attaching labels to services
|
||||
|
@ -58,9 +58,9 @@ The service name can be accessed as the `Name` identifier,
|
|||
and the template has access to all the labels defined on this container.
|
||||
|
||||
```toml tab="File"
|
||||
[Providers.Rancher]
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
[providers.rancher]
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```txt tab="CLI"
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
# Enable Rancher Provider.
|
||||
[Providers.Rancher]
|
||||
[providers.rancher]
|
||||
|
||||
# Expose Rancher services by default in Traefik.
|
||||
ExposedByDefault = true
|
||||
exposedByDefault = true
|
||||
|
||||
# Enable watch Rancher changes.
|
||||
Watch = true
|
||||
watch = true
|
||||
|
||||
# Filter services with unhealthy states and inactive states.
|
||||
EnableServiceHealthFilter = true
|
||||
enableServiceHealthFilter = true
|
||||
|
||||
# Defines the polling interval (in seconds).
|
||||
RefreshSeconds = true
|
||||
refreshSeconds = true
|
||||
|
||||
# Poll the Rancher metadata service for changes every `rancher.refreshSeconds`, which is less accurate
|
||||
IntervalPoll = false
|
||||
intervalPoll = false
|
||||
|
||||
# Prefix used for accessing the Rancher metadata service
|
||||
Prefix = "/latest"
|
||||
prefix = "/latest"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue