Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve routing documentation #5450

Merged
merged 22 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
87 changes: 42 additions & 45 deletions docs/content/contributing/data-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,54 +42,51 @@ Once a day (the first call begins 10 minutes after the start of Traefik), we col
- a hash of the configuration
- an **anonymized version** of the static configuration (token, user name, password, URL, IP, domain, email, etc, are removed).

!!! note
We do not collect the dynamic configuration information (routers & services).
We do not collect these data to run advertising programs.
We do not sell these data to third-parties.

### Example of Collected Data

??? example "Original configuration"

```toml
[entryPoints]
[entryPoints.web]
address = ":80"

[api]

[providers.docker]
endpoint = "tcp://10.10.10.10:2375"
exposedByDefault = true
swarmMode = true
!!! info

[providers.docker.TLS]
ca = "dockerCA"
cert = "dockerCert"
key = "dockerKey"
insecureSkipVerify = true
```
- We do not collect the dynamic configuration information (routers & services).
- We do not collect this data to run advertising programs.
- We do not sell this data to third-parties.

??? example "Resulting Obfuscated Configuration"
### Example of Collected Data

```toml
[entryPoints]
[entryPoints.web]
address = ":80"

[api]

[providers.docker]
endpoint = "xxxx"
exposedByDefault = true
swarmMode = true

[providers.docker.TLS]
ca = "xxxx"
cert = "xxxx"
key = "xxxx"
insecureSkipVerify = false
```
```toml tab="Original configuration"
[entryPoints]
[entryPoints.web]
address = ":80"

[api]

[providers.docker]
endpoint = "tcp://10.10.10.10:2375"
exposedByDefault = true
swarmMode = true

[providers.docker.TLS]
ca = "dockerCA"
cert = "dockerCert"
key = "dockerKey"
insecureSkipVerify = true
```

```toml tab="Resulting Obfuscated Configuration"
[entryPoints]
[entryPoints.web]
address = ":80"

[api]

[providers.docker]
endpoint = "xxxx"
exposedByDefault = true
swarmMode = true

[providers.docker.TLS]
ca = "xxxx"
cert = "xxxx"
key = "xxxx"
insecureSkipVerify = false
```

## The Code for Data Collection

Expand Down
4 changes: 2 additions & 2 deletions docs/content/getting-started/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ The opposite is true: when you remove a service from your infrastructure, the ro

You no longer need to create and synchronize configuration files cluttered with IP addresses or other rules.

!!! note "Many different rules"
!!! info "Many different rules"

In the example above, we used the request [path](../routing/routers/index.md#rule) to determine which service was in charge, but of course you can use many other different [rules](../routing/routers/index.md#rule).

!!! note "Updating the requests"
!!! info "Updating the requests"

In the [middleware](../middlewares/overview.md) section, you can learn about how to update the requests before forwarding them to the services.

Expand Down
18 changes: 10 additions & 8 deletions docs/content/getting-started/configuration-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,25 @@ This configuration can change and is seamlessly hot-reloaded, without any reques

## The Dynamic Configuration

Traefik gets its _dynamic configuration_ from [providers](../providers/overview.md): whether an orchestrator, a service registry, or a plain old configuration file. Since this configuration is specific to your infrastructure choices, we invite you to refer to the [dedicated section of this documentation](../providers/overview.md).
Traefik gets its _dynamic configuration_ from [providers](../providers/overview.md): whether an orchestrator, a service registry, or a plain old configuration file.

!!! Note
Since this configuration is specific to your infrastructure choices, we invite you to refer to the [dedicated section of this documentation](../routing/overview.md).

!!! info ""
ldez marked this conversation as resolved.
Show resolved Hide resolved

In the [Quick Start example](../getting-started/quick-start.md), the dynamic configuration comes from docker in the form of labels attached to your containers.

!!! Note
!!! info "HTTPS Certificates also belong to the dynamic configuration."

HTTPS Certificates also belong to the dynamic configuration. You can add / update / remove them without restarting your Traefik instance.
You can add / update / remove them without restarting your Traefik instance.

## The Static Configuration

There are three different, mutually exclusive, ways to define static configuration options in Traefik:
There are three different, **mutually exclusive**, ways to define static configuration options in Traefik:
ldez marked this conversation as resolved.
Show resolved Hide resolved

- In a configuration file
- In the command-line arguments
- As environment variables
1. In a configuration file
1. In the command-line arguments
1. As environment variables

These ways are evaluated in the order listed above.

Expand Down
8 changes: 4 additions & 4 deletions docs/content/getting-started/install-traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can install Traefik with the following flavors:

Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with the [sample configuration file](https://raw.githubusercontent.com/containous/traefik/v2.0/traefik.sample.toml):

```shell
```bash
docker run -d -p 8080:8080 -p 80:80 \
-v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik:v2.0
```
Expand All @@ -21,14 +21,14 @@ For more details, go to the [Docker provider documentation](../providers/docker.

* Prefer a fixed version than the latest that could be an unexpected version.
ex: `traefik:v2.0.0`
* Docker images comes in 2 flavors: scratch based or alpine based.
* Docker images are alpine based.
ldez marked this conversation as resolved.
Show resolved Hide resolved
* All the orchestrator using docker images could fetch the official Traefik docker image.

## Use the Binary Distribution

Grab the latest binary from the [releases](https://github.com/containous/traefik/releases) page.

??? tip "Check the integrity of the downloaded file"
??? info "Check the integrity of the downloaded file"

```bash tab="Linux"
# Compare this value to the one found in traefik-${traefik_version}_checksums.txt
Expand All @@ -45,7 +45,7 @@ Grab the latest binary from the [releases](https://github.com/containous/traefik
Get-FileHash ./traefik_${traefik_version}_windows_${arch}.zip -Algorithm SHA256
```

??? tip "Extract the downloaded archive"
??? info "Extract the downloaded archive"

```bash tab="Linux"
tar -zxvf traefik_${traefik_version}_linux_${arch}.tar.gz
Expand Down
8 changes: 4 additions & 4 deletions docs/content/https/acme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Traefik automatically tracks the expiry date of ACME certificates it generates.

If there are less than 30 days remaining before the certificate expires, Traefik will attempt to renew it automatically.

!!! note
!!! info ""
Certificates that are no longer used may still be renewed, as Traefik does not currently check if the certificate is being used before renewing.

## The Different ACME Challenges
Expand Down Expand Up @@ -162,7 +162,7 @@ when using the `HTTP-01` challenge, `certificatesResolvers.sample.acme.httpChall
--certificatesResolvers.sample.acme.httpChallenge.entryPoint=web
```

!!! note
!!! info ""
ldez marked this conversation as resolved.
Show resolved Hide resolved
Redirection is fully compatible with the `HTTP-01` challenge.

### `dnsChallenge`
Expand Down Expand Up @@ -278,7 +278,7 @@ For example, `CF_API_EMAIL_FILE=/run/secrets/traefik_cf-api-email` could be used
[^3]: [google/default.go](https://github.com/golang/oauth2/blob/36a7019397c4c86cf59eeab3bc0d188bac444277/google/default.go#L61-L76)
[^4]: `docker stack` remark: there is no way to support terminal attached to container when deploying with `docker stack`, so you might need to run container with `docker run -it` to generate certificates using `manual` provider.

!!! note "`delayBeforeCheck`"
!!! info "`delayBeforeCheck`"
By default, the `provider` verifies the TXT record _before_ letting ACME verify.
You can delay this operation by specifying a delay (in seconds) with `delayBeforeCheck` (value must be greater than zero).
This option is useful when internal networks block external DNS queries.
Expand Down Expand Up @@ -398,5 +398,5 @@ If Let's Encrypt is not reachable, the following certificates will apply:
1. Expired ACME certificates
1. Provided certificates

!!! note
!!! important
For new (sub)domains which need Let's Encrypt authentication, the default Traefik certificate will be used until Traefik is restarted.
2 changes: 1 addition & 1 deletion docs/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Developing Traefik, our main goal is to make it simple to use, and we're sure yo

-- The Traefik Maintainer Team

!!! Note
!!! info

If you're a businness running critical services behind Traefik, know that [Containous](https://containo.us), the company that sponsors Traefik's development, can provide [commercial support](https://containo.us/services/#commercial-support) and develops an [Enterprise Edition](https://containo.us/traefikee/) of Traefik.
4 changes: 2 additions & 2 deletions docs/content/middlewares/basicauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Passwords must be encoded using MD5, SHA1, or BCrypt.

The `users` option is an array of authorized users. Each user will be declared using the `name:encoded-password` format.

!!! Note
!!! note ""

- If both `users` and `usersFile` are provided, the two are merged. The contents of `usersFile` have precedence over the values in `users`.
- For security reasons, the field `users` doesn't exist for Kubernetes IngressRoute, and one should use the `secret` field instead.
Expand Down Expand Up @@ -154,7 +154,7 @@ The `usersFile` option is the path to an external file that contains the authori

The file content is a list of `name:encoded-password`.

!!! Note
!!! note ""

- If both `users` and `usersFile` are provided, the two are merged. The contents of `usersFile` have precedence over the values in `users`.
- Because it does not make much sense to refer to a file path on Kubernetes, the `usersFile` field doesn't exist for Kubernetes IngressRoute, and one should use the `secret` field instead.
Expand Down