Adds a reference to the middleware overview.

This commit is contained in:
Ludovic Fernandez 2019-04-29 19:36:07 +02:00 committed by Traefiker Bot
parent 21dec70971
commit 4b5c3ccf58
5 changed files with 29 additions and 7 deletions

View file

@ -142,7 +142,7 @@ If you use multiple `providers` and wish to reference a middleware declared in a
| [Headers](headers.md) | Add / Update headers | Security | | [Headers](headers.md) | Add / Update headers | Security |
| [IPWhiteList](ipwhitelist.md) | Limit the allowed client IPs | Security, Request lifecycle | | [IPWhiteList](ipwhitelist.md) | Limit the allowed client IPs | Security, Request lifecycle |
| [MaxConnection](maxconnection.md) | Limit the number of simultaneous connections | Security, Request lifecycle | | [MaxConnection](maxconnection.md) | Limit the number of simultaneous connections | Security, Request lifecycle |
| [PassTLSClientCert](passtlsclientcert.md) | TODO | Security | | [PassTLSClientCert](passtlsclientcert.md) | Adding Client Certificates in a Header | Security |
| [RateLimit](ratelimit.md) | Limit the call frequency | Security, Request lifecycle | | [RateLimit](ratelimit.md) | Limit the call frequency | Security, Request lifecycle |
| [RedirectScheme](redirectscheme.md) | Redirect easily the client elsewhere | Request lifecycle | | [RedirectScheme](redirectscheme.md) | Redirect easily the client elsewhere | Request lifecycle |
| [RedirectRegex](redirectregex.md) | Redirect the client elsewhere | Request lifecycle | | [RedirectRegex](redirectregex.md) | Redirect the client elsewhere | Request lifecycle |

View file

@ -182,7 +182,7 @@ This option can be overridden on a container basis with the `traefik.docker.netw
### `defaultRule` ### `defaultRule`
_Optional, Default=Host(`{{ normalize .Name }}`)_ _Optional, Default=```Host(`{{ normalize .Name }}`)```_
For a given container if no routing rule was defined by a label, it is defined by this defaultRule instead. For a given container if no routing rule was defined by a label, it is defined by this defaultRule instead.
It must be a valid [Go template](https://golang.org/pkg/text/template/), It must be a valid [Go template](https://golang.org/pkg/text/template/),
@ -190,8 +190,15 @@ augmented with the [sprig template functions](http://masterminds.github.io/sprig
The container service name can be accessed as the `Name` identifier, The container service name can be accessed as the `Name` identifier,
and the template has access to all the labels defined on this container. and the template has access to all the labels defined on this container.
```toml ```toml tab="File"
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)" [docker]
defaultRule = ""
# ...
```
```txt tab="CLI"
--providers.docker
--providers.docker.defaultRule="Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
``` ```
### `swarmMode` ### `swarmMode`
@ -246,6 +253,8 @@ You can declare pieces of middleware using labels starting with `traefik.http.mi
If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared. If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared.
More information about available middlewares in the dedicated [middlewares section](../middlewares/overview.md).
### TCP ### TCP
You can declare TCP Routers and/or Services using labels. You can declare TCP Routers and/or Services using labels.

View file

@ -212,6 +212,8 @@ spec:
- name: stripprefix - name: stripprefix
``` ```
More information about available middlewares in the dedicated [middlewares section](../middlewares/overview.md).
### TLS ### TLS
To allow for TLS, we made use of the `Secret` kind, as it was already defined, and it can be directly used in an `IngressRoute`: To allow for TLS, we made use of the `Secret` kind, as it was already defined, and it can be directly used in an `IngressRoute`:

View file

@ -287,6 +287,8 @@ For example, to declare a middleware [`schemeredirect`](../middlewares/redirects
If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared. If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared.
More information about available middlewares in the dedicated [middlewares section](../middlewares/overview.md).
### TCP ### TCP
You can declare TCP Routers and/or Services using labels. You can declare TCP Routers and/or Services using labels.

View file

@ -83,7 +83,7 @@ If set to false, services that don't have a `traefik.enable=true` label will be
### `DefaultRule` ### `DefaultRule`
_Optional, Default=Host(`{{ normalize .Name }}`)_ _Optional, Default=```Host(`{{ normalize .Name }}`)```_
The default host rule for all services. The default host rule for all services.
@ -93,8 +93,15 @@ augmented with the [sprig template functions](http://masterminds.github.io/sprig
The service name can be accessed as the `Name` identifier, The service name can be accessed as the `Name` identifier,
and the template has access to all the labels defined on this container. and the template has access to all the labels defined on this container.
```toml ```toml tab="File"
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)" [rancher]
defaultRule = ""
# ...
```
```txt tab="CLI"
--providers.rancher
--providers.rancher.defaultRule="Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
``` ```
This option can be overridden on a container basis with the `traefik.http.routers.Router1.rule` label. This option can be overridden on a container basis with the `traefik.http.routers.Router1.rule` label.
@ -163,6 +170,8 @@ For example, to declare a middleware [`schemeredirect`](../middlewares/redirects
If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared. If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared.
More information about available middlewares in the dedicated [middlewares section](../middlewares/overview.md).
### Specific Options ### Specific Options
#### `traefik.enable` #### `traefik.enable`