Merge branch v2.9 into master
This commit is contained in:
commit
a5c520664a
36 changed files with 854 additions and 947 deletions
|
@ -539,7 +539,7 @@ providers:
|
|||
|
||||
_Optional, Default=true_
|
||||
|
||||
Watch Docker Swarm events.
|
||||
Watch Docker events.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
|
|
|
@ -70,7 +70,7 @@ _Optional, Default=false_
|
|||
|
||||
Search for services in cluster list.
|
||||
|
||||
- If set to `true` service discovery is disabled on configured clusters, but enabled for all other clusters.
|
||||
- If set to `true` service discovery is enabled for all clusters.
|
||||
- If set to `false` service discovery is enabled on configured clusters only.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
|
@ -123,6 +123,7 @@ providers:
|
|||
_Optional, Default=["default"]_
|
||||
|
||||
Search for services in cluster list.
|
||||
This option is ignored if `autoDiscoverClusters` is set to `true`.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
|
@ -169,6 +170,70 @@ providers:
|
|||
# ...
|
||||
```
|
||||
|
||||
### `constraints`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
The `constraints` option can be set to an expression that Traefik matches against the container labels (task),
|
||||
to determine whether to create any route for that container.
|
||||
If none of the container labels match the expression, no route for that container is created.
|
||||
If the expression is empty, all detected containers are included.
|
||||
|
||||
The expression syntax is based on the `Label("key", "value")`, and `LabelRegex("key", "value")` functions,
|
||||
as well as the usual boolean logic, as shown in examples below.
|
||||
|
||||
??? example "Constraints Expression Examples"
|
||||
|
||||
```toml
|
||||
# Includes only containers having a label with key `a.label.name` and value `foo`
|
||||
constraints = "Label(`a.label.name`, `foo`)"
|
||||
```
|
||||
|
||||
```toml
|
||||
# Excludes containers having any label with key `a.label.name` and value `foo`
|
||||
constraints = "!Label(`a.label.name`, `value`)"
|
||||
```
|
||||
|
||||
```toml
|
||||
# With logical AND.
|
||||
constraints = "Label(`a.label.name`, `valueA`) && Label(`another.label.name`, `valueB`)"
|
||||
```
|
||||
|
||||
```toml
|
||||
# With logical OR.
|
||||
constraints = "Label(`a.label.name`, `valueA`) || Label(`another.label.name`, `valueB`)"
|
||||
```
|
||||
|
||||
```toml
|
||||
# With logical AND and OR, with precedence set by parentheses.
|
||||
constraints = "Label(`a.label.name`, `valueA`) && (Label(`another.label.name`, `valueB`) || Label(`yet.another.label.name`, `valueC`))"
|
||||
```
|
||||
|
||||
```toml
|
||||
# Includes only containers having a label with key `a.label.name` and a value matching the `a.+` regular expression.
|
||||
constraints = "LabelRegex(`a.label.name`, `a.+`)"
|
||||
```
|
||||
|
||||
For additional information, refer to [Restrict the Scope of Service Discovery](./overview.md#restrict-the-scope-of-service-discovery).
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
constraints: "Label(`a.label.name`,`foo`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
constraints = "Label(`a.label.name`,`foo`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.constraints=Label(`a.label.name`,`foo`)
|
||||
# ...
|
||||
```
|
||||
|
||||
### `healthyTasksOnly`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
|
|
@ -374,7 +374,7 @@ providers:
|
|||
|
||||
_Optional, Default: ""_
|
||||
|
||||
IP used for Kubernetes Ingress endpoints.
|
||||
This IP will get copied to Ingress `status.loadbalancer.ip`, and currently only supports one IP value (IPv4 or IPv6).
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
|
@ -398,7 +398,9 @@ providers:
|
|||
|
||||
_Optional, Default: ""_
|
||||
|
||||
Published Kubernetes Service to copy status from.
|
||||
The Kubernetes service to copy status from.
|
||||
When using third parties tools like External-DNS, this option can be used to copy the service `loadbalancer.status` (containing the service's endpoints IPs) to the ingresses.
|
||||
|
||||
Format: `namespace/servicename`.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
|
@ -500,6 +502,6 @@ providers:
|
|||
### Further
|
||||
|
||||
To learn more about the various aspects of the Ingress specification that Traefik supports,
|
||||
many examples of Ingresses definitions are located in the test [examples](https://github.com/traefik/traefik/tree/v2.8/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository.
|
||||
many examples of Ingresses definitions are located in the test [examples](https://github.com/traefik/traefik/tree/v2.9/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository.
|
||||
|
||||
{!traefik-for-business-applications.md!}
|
||||
|
|
|
@ -213,6 +213,7 @@ you can do so in two different ways:
|
|||
List of providers that support these features:
|
||||
|
||||
- [Docker](./docker.md#exposedbydefault)
|
||||
- [ECS](./ecs.md#exposedbydefault)
|
||||
- [Consul Catalog](./consul-catalog.md#exposedbydefault)
|
||||
- [Nomad](./nomad.md#exposedbydefault)
|
||||
- [Rancher](./rancher.md#exposedbydefault)
|
||||
|
@ -223,6 +224,7 @@ List of providers that support these features:
|
|||
List of providers that support constraints:
|
||||
|
||||
- [Docker](./docker.md#constraints)
|
||||
- [ECS](./ecs.md#constraints)
|
||||
- [Consul Catalog](./consul-catalog.md#constraints)
|
||||
- [Nomad](./nomad.md#constraints)
|
||||
- [Rancher](./rancher.md#constraints)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue