Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"SA1019: cfg.FeaturePolicy is deprecated",
"SA1019: c.Providers.ConsulCatalog.Namespace is deprecated",
"SA1019: c.Providers.Consul.Namespace is deprecated",
"SA1019: c.Providers.Nomad.Namespace is deprecated",
]
[[issues.exclude-rules]]
path = "(.+)_test.go"
Expand Down
2 changes: 1 addition & 1 deletion .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ blocks:
- name: GH_VERSION
value: 1.12.1
- name: CODENAME
value: "beaufort"
value: "banon"
- name: IN_DOCKER
value: ""
prologue:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [v2.9.0-rc3](https://github.com/traefik/traefik/tree/v2.9.0-rc3) (2022-09-16)
[All Commits](https://github.com/traefik/traefik/compare/v2.9.0-rc2...v2.9.0-rc3)

**Misc:**
- Merge current v2.8 into v2.9 ([#9343](https://github.com/traefik/traefik/pull/9343) by [kevinpollet](https://github.com/kevinpollet))

## [v2.9.0-rc1](https://github.com/traefik/traefik/tree/v2.9.0-rc2) (2022-09-14)
[All Commits](https://github.com/traefik/traefik/compare/v2.8.0-rc1...v2.9.0-rc2)

Expand Down
6 changes: 6 additions & 0 deletions docs/content/deprecation/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This page is maintained and updated periodically to reflect our roadmap and any
| [Pilot](#pilot) | 2.7 | 2.8 | 2.9 |
| [Consul Enterprise Namespace](#consul-enterprise-namespace) | 2.8 | N/A | 3.0 |
| [TLS 1.0 and 1.1 Support](#tls-10-and-11) | N/A | 2.8 | N/A |
| [Nomad Namespace](#nomad-namespace) | 2.10 | N/A | 3.0 |

## Impact

Expand All @@ -26,3 +27,8 @@ please use the `namespaces` options instead.
### TLS 1.0 and 1.1

Starting on 2.8 the default TLS options will use the minimum version of TLS 1.2. Of course, it can still be overridden with custom configuration.

### Nomad Namespace

Starting on 2.10 the `namespace` option of the Nomad provider is deprecated,
please use the `namespaces` options instead.
24 changes: 24 additions & 0 deletions docs/content/getting-started/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,27 @@ By default, the following headers are automatically added when proxying requests

For more details,
please check out the [forwarded header](../routing/entrypoints.md#forwarded-headers) documentation.

## What does the "field not found" error mean?

```shell
error: field not found, node: -badField-
```

The "field not found" error occurs, when an unknown property is encountered in the dynamic or static configuration.

One easy way to check whether a configuration file is well-formed, is to validate it with:

- [JSON Schema of the static configuration](https://json.schemastore.org/traefik-v2.json)
- [JSON Schema of the dynamic configuration](https://json.schemastore.org/traefik-v2-file-provider.json)

## Why are some resources (routers, middlewares, services...) not created/applied?

As a common tip, if a resource is dropped/not created by Traefik after the dynamic configuration was evaluated,
one should look for an error in the logs.

If found, the error obviously confirms that something went wrong while creating the resource,
and the message should help in figuring out the mistake(s) in the configuration, and how to fix it.

When using the file provider,
one easy way to check if the dynamic configuration is well-formed is to validate it with the [JSON Schema of the dynamic configuration](https://json.schemastore.org/traefik-v2-file-provider.json).
8 changes: 7 additions & 1 deletion docs/content/migration/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ To enable HTTP/3 on an EntryPoint, please check out the [HTTP/3 configuration](.
### Kubernetes Gateway API Provider

In `v2.6`, the [Kubernetes Gateway API provider](../providers/kubernetes-gateway.md) now only supports the version [v1alpha2](https://gateway-api.sigs.k8s.io/v1alpha2/guides/getting-started/) of the specification and
[route namespaces](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.RouteNamespaces) selectors, which requires Traefik to fetch and watch the cluster namespaces.
[route namespaces](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.RouteNamespaces) selectors, which requires Traefik to fetch and watch the cluster namespaces.
Therefore, the [RBAC](../reference/dynamic-configuration/kubernetes-gateway.md#rbac) and [CRD](../reference/dynamic-configuration/kubernetes-gateway.md#definitions) definitions must be updated.

## v2.6.0 to v2.6.1
Expand Down Expand Up @@ -490,3 +490,9 @@ In `v2.8.2`, Traefik now reject certificates signed with the SHA-1 hash function
### Traefik Pilot

In `v2.9`, Traefik Pilot support has been removed.

## v2.10

### Nomad Namespace

In `v2.10`, the `namespace` option of the Nomad provider is deprecated, please use the `namespaces` options instead.
24 changes: 24 additions & 0 deletions docs/content/providers/ecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,30 @@ providers:
# ...
```

### `healthyTasksOnly`

_Optional, Default=false_

Determines whether Traefik discovers only healthy tasks (`HEALTHY` healthStatus).

```yaml tab="File (YAML)"
providers:
ecs:
healthyTasksOnly: true
# ...
```

```toml tab="File (TOML)"
[providers.ecs]
healthyTasksOnly = true
# ...
```

```bash tab="CLI"
--providers.ecs.healthyTasksOnly=true
# ...
```

### `defaultRule`

_Optional, Default=```Host(`{{ normalize .Name }}`)```_
Expand Down
49 changes: 45 additions & 4 deletions docs/content/providers/nomad.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,24 +442,65 @@ For additional information, refer to [Restrict the Scope of Service Discovery](.

### `namespace`

??? warning "Deprecated in favor of the [`namespaces`](#namespaces) option."

_Optional, Default=""_

The `namespace` option defines the namespace in which the Nomad services will be discovered.

!!! warning

One should only define either the `namespaces` option or the `namespace` option.

```yaml tab="File (YAML)"
providers:
nomad:
namespace: "production"
# ...
```

```toml tab="File (TOML)"
[providers.nomad]
namespace = "production"
# ...
```

```bash tab="CLI"
--providers.nomad.namespace=production
# ...
```

### `namespaces`

_Optional, Default=""_

The `namespace` option defines the namespace in which the Nomad services will be discovered.
The `namespaces` option defines the namespaces in which the nomad services will be discovered.
When using the `namespaces` option, the discovered object names will be suffixed as shown below:

```text
<resource-name>@nomad-<namespace>
```

!!! warning

One should only define either the `namespaces` option or the `namespace` option.

```yaml tab="File (YAML)"
providers:
nomad:
namespace: "production"
namespaces:
- "ns1"
- "ns2"
# ...
```

```toml tab="File (TOML)"
[providers.nomad]
namespace = "production"
namespaces = ["ns1", "ns2"]
# ...
```

```bash tab="CLI"
--providers.nomad.namespace=production
--providers.nomad.namespaces=ns1,ns2
# ...
```
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
- "traefik.http.services.service01.loadbalancer.healthcheck.method=foobar"
- "traefik.http.services.service01.loadbalancer.healthcheck.port=42"
- "traefik.http.services.service01.loadbalancer.healthcheck.scheme=foobar"
- "traefik.http.services.service01.loadbalancer.healthcheck.mode=foobar"
- "traefik.http.services.service01.loadbalancer.healthcheck.timeout=foobar"
- "traefik.http.services.service01.loadbalancer.passhostheader=true"
- "traefik.http.services.service01.loadbalancer.responseforwarding.flushinterval=foobar"
Expand Down
1 change: 1 addition & 0 deletions docs/content/reference/dynamic-configuration/file.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
url = "foobar"
[http.services.Service01.loadBalancer.healthCheck]
scheme = "foobar"
mode = "foobar"
path = "foobar"
method = "foobar"
port = 42
Expand Down
1 change: 1 addition & 0 deletions docs/content/reference/dynamic-configuration/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ http:
- url: foobar
healthCheck:
scheme: foobar
mode: foobar
path: foobar
method: foobar
port: 42
Expand Down
1 change: 1 addition & 0 deletions docs/content/reference/dynamic-configuration/kv-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
| `traefik/http/services/Service01/loadBalancer/healthCheck/hostname` | `foobar` |
| `traefik/http/services/Service01/loadBalancer/healthCheck/interval` | `foobar` |
| `traefik/http/services/Service01/loadBalancer/healthCheck/method` | `foobar` |
| `traefik/http/services/Service01/loadBalancer/healthCheck/mode` | `foobar` |
| `traefik/http/services/Service01/loadBalancer/healthCheck/path` | `foobar` |
| `traefik/http/services/Service01/loadBalancer/healthCheck/port` | `42` |
| `traefik/http/services/Service01/loadBalancer/healthCheck/scheme` | `foobar` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"traefik.http.services.service01.loadbalancer.healthcheck.method": "foobar",
"traefik.http.services.service01.loadbalancer.healthcheck.port": "42",
"traefik.http.services.service01.loadbalancer.healthcheck.scheme": "foobar",
"traefik.http.services.service01.loadbalancer.healthcheck.mode": "foobar",
"traefik.http.services.service01.loadbalancer.healthcheck.timeout": "foobar",
"traefik.http.services.service01.loadbalancer.passhostheader": "true",
"traefik.http.services.service01.loadbalancer.responseforwarding.flushinterval": "foobar",
Expand Down
22 changes: 14 additions & 8 deletions docs/content/reference/static-configuration/cli-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,13 @@ Watch Docker Swarm events. (Default: ```true```)
Enable AWS ECS backend with default settings. (Default: ```false```)

`--providers.ecs.accesskeyid`:
The AWS credentials access key to use for making requests
AWS credentials access key ID to use for making requests.

`--providers.ecs.autodiscoverclusters`:
Auto discover cluster (Default: ```false```)
Auto discover cluster. (Default: ```false```)

`--providers.ecs.clusters`:
ECS Clusters name (Default: ```default```)
ECS Cluster names. (Default: ```default```)

`--providers.ecs.constraints`:
Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container.
Expand All @@ -574,19 +574,22 @@ Constraints is an expression that Traefik matches against the container's labels
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)

`--providers.ecs.ecsanywhere`:
Enable ECS Anywhere support (Default: ```false```)
Enable ECS Anywhere support. (Default: ```false```)

`--providers.ecs.exposedbydefault`:
Expose services by default (Default: ```true```)
Expose services by default. (Default: ```true```)

`--providers.ecs.healthytasksonly`:
Determines whether to discover only healthy tasks. (Default: ```false```)

`--providers.ecs.refreshseconds`:
Polling interval (in seconds) (Default: ```15```)
Polling interval (in seconds). (Default: ```15```)

`--providers.ecs.region`:
The AWS region to use for requests
AWS region to use for requests.

`--providers.ecs.secretaccesskey`:
The AWS credentials access key to use for making requests
AWS credentials access key to use for making requests.

`--providers.etcd`:
Enable Etcd backend with default settings. (Default: ```false```)
Expand Down Expand Up @@ -855,6 +858,9 @@ Expose Nomad services by default. (Default: ```true```)
`--providers.nomad.namespace`:
Sets the Nomad namespace used to discover services.

`--providers.nomad.namespaces`:
Sets the Nomad namespaces used to discover services.

`--providers.nomad.prefix`:
Prefix for nomad service tags. (Default: ```traefik```)

Expand Down
22 changes: 14 additions & 8 deletions docs/content/reference/static-configuration/env-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,13 @@ Watch Docker Swarm events. (Default: ```true```)
Enable AWS ECS backend with default settings. (Default: ```false```)

`TRAEFIK_PROVIDERS_ECS_ACCESSKEYID`:
The AWS credentials access key to use for making requests
AWS credentials access key ID to use for making requests.

`TRAEFIK_PROVIDERS_ECS_AUTODISCOVERCLUSTERS`:
Auto discover cluster (Default: ```false```)
Auto discover cluster. (Default: ```false```)

`TRAEFIK_PROVIDERS_ECS_CLUSTERS`:
ECS Clusters name (Default: ```default```)
ECS Cluster names. (Default: ```default```)

`TRAEFIK_PROVIDERS_ECS_CONSTRAINTS`:
Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container.
Expand All @@ -574,19 +574,22 @@ Constraints is an expression that Traefik matches against the container's labels
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)

`TRAEFIK_PROVIDERS_ECS_ECSANYWHERE`:
Enable ECS Anywhere support (Default: ```false```)
Enable ECS Anywhere support. (Default: ```false```)

`TRAEFIK_PROVIDERS_ECS_EXPOSEDBYDEFAULT`:
Expose services by default (Default: ```true```)
Expose services by default. (Default: ```true```)

`TRAEFIK_PROVIDERS_ECS_HEALTHYTASKSONLY`:
Determines whether to discover only healthy tasks. (Default: ```false```)

`TRAEFIK_PROVIDERS_ECS_REFRESHSECONDS`:
Polling interval (in seconds) (Default: ```15```)
Polling interval (in seconds). (Default: ```15```)

`TRAEFIK_PROVIDERS_ECS_REGION`:
The AWS region to use for requests
AWS region to use for requests.

`TRAEFIK_PROVIDERS_ECS_SECRETACCESSKEY`:
The AWS credentials access key to use for making requests
AWS credentials access key to use for making requests.

`TRAEFIK_PROVIDERS_ETCD`:
Enable Etcd backend with default settings. (Default: ```false```)
Expand Down Expand Up @@ -855,6 +858,9 @@ Expose Nomad services by default. (Default: ```true```)
`TRAEFIK_PROVIDERS_NOMAD_NAMESPACE`:
Sets the Nomad namespace used to discover services.

`TRAEFIK_PROVIDERS_NOMAD_NAMESPACES`:
Sets the Nomad namespaces used to discover services.

`TRAEFIK_PROVIDERS_NOMAD_PREFIX`:
Prefix for nomad service tags. (Default: ```traefik```)

Expand Down
2 changes: 2 additions & 0 deletions docs/content/reference/static-configuration/file.toml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
prefix = "foobar"
stale = true
namespace = "foobar"
namespaces = ["foobar", "foobar"]
exposedByDefault = true
refreshInterval = "42s"
[providers.nomad.endpoint]
Expand All @@ -205,6 +206,7 @@
accessKeyID = "foobar"
secretAccessKey = "foobar"
ecsAnywhere = true
healthyTasksOnly = true
[providers.consul]
rootKey = "foobar"
endpoints = ["foobar", "foobar"]
Expand Down
4 changes: 4 additions & 0 deletions docs/content/reference/static-configuration/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ providers:
prefix: foobar
stale: true
namespace: foobar
namespaces:
- foobar
- foobar
exposedByDefault: true
refreshInterval: 42s
endpoint:
Expand All @@ -221,6 +224,7 @@ providers:
accessKeyID: foobar
secretAccessKey: foobar
ecsAnywhere: true
healthyTasksOnly: true
consul:
rootKey: foobar
endpoints:
Expand Down
Loading