Fix whitespaces
This commit is contained in:
parent
924e82ab0c
commit
8c5514612f
36 changed files with 126 additions and 126 deletions
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
|
@ -23,7 +23,7 @@ If you intend to ask a support question: DO NOT FILE AN ISSUE.
|
||||||
HOW TO WRITE A GOOD ISSUE?
|
HOW TO WRITE A GOOD ISSUE?
|
||||||
|
|
||||||
- Respect the issue template as more as possible.
|
- Respect the issue template as more as possible.
|
||||||
- If it's possible use the command `traefik bug`. See https://www.youtube.com/watch?v=Lyz62L8m93I.
|
- If it's possible use the command `traefik bug`. See https://www.youtube.com/watch?v=Lyz62L8m93I.
|
||||||
- The title must be short and descriptive.
|
- The title must be short and descriptive.
|
||||||
- Explain the conditions which led you to write this issue: the context.
|
- Explain the conditions which led you to write this issue: the context.
|
||||||
- The context should lead to something, an idea or a problem that you’re facing.
|
- The context should lead to something, an idea or a problem that you’re facing.
|
||||||
|
|
|
@ -52,7 +52,7 @@ GOHOSTOS="linux"
|
||||||
GOOS="linux"
|
GOOS="linux"
|
||||||
GOPATH="/home/<yourusername>/go"
|
GOPATH="/home/<yourusername>/go"
|
||||||
GORACE=""
|
GORACE=""
|
||||||
## more go env's will be listed
|
## more go env's will be listed
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Build Træfik
|
##### Build Træfik
|
||||||
|
@ -63,7 +63,7 @@ Once your environment is set up and the Træfik repository cloned you can build
|
||||||
cd ~/go/src/github.com/containous/traefik
|
cd ~/go/src/github.com/containous/traefik
|
||||||
|
|
||||||
# Get go-bindata. Please note, the ellipses are required
|
# Get go-bindata. Please note, the ellipses are required
|
||||||
go get github.com/jteeuwen/go-bindata/...
|
go get github.com/jteeuwen/go-bindata/...
|
||||||
|
|
||||||
# Start build
|
# Start build
|
||||||
go generate
|
go generate
|
||||||
|
@ -73,7 +73,7 @@ go build ./cmd/traefik
|
||||||
# run other commands like tests
|
# run other commands like tests
|
||||||
```
|
```
|
||||||
|
|
||||||
You will find the Træfik executable in the `~/go/src/github.com/containous/traefik` folder as `traefik`.
|
You will find the Træfik executable in the `~/go/src/github.com/containous/traefik` folder as `traefik`.
|
||||||
|
|
||||||
### Setting up `glide` and `glide-vc` for dependency management
|
### Setting up `glide` and `glide-vc` for dependency management
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ INFO - Cleaning site directory
|
||||||
Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting bugs and feature requests.
|
Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting bugs and feature requests.
|
||||||
|
|
||||||
For end-user related support questions, refer to one of the following:
|
For end-user related support questions, refer to one of the following:
|
||||||
- the Traefik community Slack channel: [![Join the chat at https://traefik.herokuapp.com](https://img.shields.io/badge/style-register-green.svg?style=social&label=Slack)](https://traefik.herokuapp.com)
|
- the Traefik community Slack channel: [![Join the chat at https://traefik.herokuapp.com](https://img.shields.io/badge/style-register-green.svg?style=social&label=Slack)](https://traefik.herokuapp.com)
|
||||||
- [Stack Overflow](https://stackoverflow.com/questions/tagged/traefik) (using the `traefik` tag)
|
- [Stack Overflow](https://stackoverflow.com/questions/tagged/traefik) (using the `traefik` tag)
|
||||||
|
|
||||||
### Title
|
### Title
|
||||||
|
@ -190,7 +190,7 @@ The title must be short and descriptive. (~60 characters)
|
||||||
### Description
|
### Description
|
||||||
|
|
||||||
- Respect the issue template as much as possible. [template](.github/ISSUE_TEMPLATE.md)
|
- Respect the issue template as much as possible. [template](.github/ISSUE_TEMPLATE.md)
|
||||||
- If it's possible use the command `traefik bug`. See https://www.youtube.com/watch?v=Lyz62L8m93I.
|
- If it's possible use the command `traefik bug`. See https://www.youtube.com/watch?v=Lyz62L8m93I.
|
||||||
- Explain the conditions which led you to write this issue: the context.
|
- Explain the conditions which led you to write this issue: the context.
|
||||||
- The context should lead to something, an idea or a problem that you’re facing.
|
- The context should lead to something, an idea or a problem that you’re facing.
|
||||||
- Remain clear and concise.
|
- Remain clear and concise.
|
||||||
|
|
|
@ -37,7 +37,7 @@ If you want to preserve commits you must add `bot/merge-method-rebase` before `s
|
||||||
|
|
||||||
The status `status/4-merge-in-progress` is only for the bot.
|
The status `status/4-merge-in-progress` is only for the bot.
|
||||||
|
|
||||||
If the bot is not able to perform the merge, the label `bot/need-human-merge` is added.
|
If the bot is not able to perform the merge, the label `bot/need-human-merge` is added.
|
||||||
In this case you must solve conflicts/CI/... and after you only need to remove `bot/need-human-merge`.
|
In this case you must solve conflicts/CI/... and after you only need to remove `bot/need-human-merge`.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ Run it and forget it!
|
||||||
You can have a quick look at Træfik in this [Katacoda tutorial](https://www.katacoda.com/courses/traefik/deploy-load-balancer) that shows how to load balance requests between multiple Docker containers. If you are looking for a more comprehensive and real use-case example, you can also check [Play-With-Docker](http://training.play-with-docker.com/traefik-load-balancing/) to see how to load balance between multiple nodes.
|
You can have a quick look at Træfik in this [Katacoda tutorial](https://www.katacoda.com/courses/traefik/deploy-load-balancer) that shows how to load balance requests between multiple Docker containers. If you are looking for a more comprehensive and real use-case example, you can also check [Play-With-Docker](http://training.play-with-docker.com/traefik-load-balancing/) to see how to load balance between multiple nodes.
|
||||||
|
|
||||||
Here is a talk given by [Emile Vauge](https://github.com/emilevauge) at [GopherCon 2017](https://gophercon.com/).
|
Here is a talk given by [Emile Vauge](https://github.com/emilevauge) at [GopherCon 2017](https://gophercon.com/).
|
||||||
You will learn Træfik basics in less than 10 minutes.
|
You will learn Træfik basics in less than 10 minutes.
|
||||||
|
|
||||||
[![Traefik GopherCon 2017](https://img.youtube.com/vi/RgudiksfL-k/0.jpg)](https://www.youtube.com/watch?v=RgudiksfL-k)
|
[![Traefik GopherCon 2017](https://img.youtube.com/vi/RgudiksfL-k/0.jpg)](https://www.youtube.com/watch?v=RgudiksfL-k)
|
||||||
|
|
||||||
|
@ -134,13 +134,13 @@ git clone https://github.com/containous/traefik
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
You can find the complete documentation at [https://docs.traefik.io](https://docs.traefik.io).
|
You can find the complete documentation at [https://docs.traefik.io](https://docs.traefik.io).
|
||||||
A collection of contributions around Træfik can be found at [https://awesome.traefik.io](https://awesome.traefik.io).
|
A collection of contributions around Træfik can be found at [https://awesome.traefik.io](https://awesome.traefik.io).
|
||||||
|
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
To get basic support, you can:
|
To get basic support, you can:
|
||||||
- join the Træfik community Slack channel: [![Join the chat at https://traefik.herokuapp.com](https://img.shields.io/badge/style-register-green.svg?style=social&label=Slack)](https://traefik.herokuapp.com)
|
- join the Træfik community Slack channel: [![Join the chat at https://traefik.herokuapp.com](https://img.shields.io/badge/style-register-green.svg?style=social&label=Slack)](https://traefik.herokuapp.com)
|
||||||
- use [Stack Overflow](https://stackoverflow.com/questions/tagged/traefik) (using the `traefik` tag)
|
- use [Stack Overflow](https://stackoverflow.com/questions/tagged/traefik) (using the `traefik` tag)
|
||||||
|
|
||||||
If you prefer commercial support, please contact [containo.us](https://containo.us) by mail: <mailto:support@containo.us>.
|
If you prefer commercial support, please contact [containo.us](https://containo.us) by mail: <mailto:support@containo.us>.
|
||||||
|
|
|
@ -6,22 +6,22 @@
|
||||||
#
|
#
|
||||||
# Usage - dumpcerts.sh /etc/traefik/acme.json /etc/ssl/
|
# Usage - dumpcerts.sh /etc/traefik/acme.json /etc/ssl/
|
||||||
#
|
#
|
||||||
# Dependencies -
|
# Dependencies -
|
||||||
# util-linux
|
# util-linux
|
||||||
# openssl
|
# openssl
|
||||||
# jq
|
# jq
|
||||||
# The MIT License (MIT)
|
# The MIT License (MIT)
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
# in the Software without restriction, including without limitation the rights
|
# in the Software without restriction, including without limitation the rights
|
||||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
# copies of the Software, and to permit persons to whom the Software is
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
# furnished to do so, subject to the following conditions:
|
# furnished to do so, subject to the following conditions:
|
||||||
#
|
#
|
||||||
# The above copyright notice and this permission notice shall be included in
|
# The above copyright notice and this permission notice shall be included in
|
||||||
# all copies or substantial portions of the Software.
|
# all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
@ -78,7 +78,7 @@ We need to read this file to explode the JSON bundle... exiting.
|
||||||
|
|
||||||
${USAGE}" >&2
|
${USAGE}" >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -d "${certdir}" ]; then
|
if [ ! -d "${certdir}" ]; then
|
||||||
|
@ -88,7 +88,7 @@ We need a directory in which to explode the JSON bundle... exiting.
|
||||||
|
|
||||||
${USAGE}" >&2
|
${USAGE}" >&2
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
jq=$(command -v jq) || exit_jq
|
jq=$(command -v jq) || exit_jq
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ trap 'umask ${oldumask}' EXIT
|
||||||
#
|
#
|
||||||
# openssl:
|
# openssl:
|
||||||
# echo -e "-----BEGIN RSA PRIVATE KEY-----\n${priv}\n-----END RSA PRIVATE KEY-----" \
|
# echo -e "-----BEGIN RSA PRIVATE KEY-----\n${priv}\n-----END RSA PRIVATE KEY-----" \
|
||||||
# | openssl rsa -inform pem -out "${pdir}/letsencrypt.key"
|
# | openssl rsa -inform pem -out "${pdir}/letsencrypt.key"
|
||||||
#
|
#
|
||||||
# and sed:
|
# and sed:
|
||||||
# echo "-----BEGIN RSA PRIVATE KEY-----" > "${pdir}/letsencrypt.key"
|
# echo "-----BEGIN RSA PRIVATE KEY-----" > "${pdir}/letsencrypt.key"
|
||||||
|
@ -142,7 +142,7 @@ echo -e "-----BEGIN RSA PRIVATE KEY-----\n${priv}\n-----END RSA PRIVATE KEY-----
|
||||||
|
|
||||||
# Process the certificates for each of the domains in acme.json
|
# Process the certificates for each of the domains in acme.json
|
||||||
for domain in $(jq -r '.DomainsCertificate.Certs[].Certificate.Domain' acme.json); do
|
for domain in $(jq -r '.DomainsCertificate.Certs[].Certificate.Domain' acme.json); do
|
||||||
# Traefik stores a cert bundle for each domain. Within this cert
|
# Traefik stores a cert bundle for each domain. Within this cert
|
||||||
# bundle there is both proper the certificate and the Let's Encrypt CA
|
# bundle there is both proper the certificate and the Let's Encrypt CA
|
||||||
echo "Extracting cert bundle for ${domain}"
|
echo "Extracting cert bundle for ${domain}"
|
||||||
cert=$(jq -e -r --arg domain "$domain" '.DomainsCertificate.Certs[].Certificate |
|
cert=$(jq -e -r --arg domain "$domain" '.DomainsCertificate.Certs[].Certificate |
|
||||||
|
|
|
@ -355,7 +355,7 @@ requests periodically carried out by Traefik. The check is defined by a path
|
||||||
appended to the backend URL and an interval (given in a format understood by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration)) specifying how
|
appended to the backend URL and an interval (given in a format understood by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration)) specifying how
|
||||||
often the health check should be executed (the default being 30 seconds).
|
often the health check should be executed (the default being 30 seconds).
|
||||||
Each backend must respond to the health check within 5 seconds.
|
Each backend must respond to the health check within 5 seconds.
|
||||||
By default, the port of the backend server is used, however, this may be overridden.
|
By default, the port of the backend server is used, however, this may be overridden.
|
||||||
|
|
||||||
A recovering backend returning 200 OK responses again is being returned to the
|
A recovering backend returning 200 OK responses again is being returned to the
|
||||||
LB rotation pool.
|
LB rotation pool.
|
||||||
|
@ -500,9 +500,9 @@ Usage:
|
||||||
traefik [command] [--flag=flag_argument]
|
traefik [command] [--flag=flag_argument]
|
||||||
```
|
```
|
||||||
|
|
||||||
List of Træfik available commands with description :
|
List of Træfik available commands with description :
|
||||||
|
|
||||||
- `version` : Print version
|
- `version` : Print version
|
||||||
- `storeconfig` : Store the static traefik configuration into a Key-value stores. Please refer to the [Store Træfik configuration](/user-guide/kv-config/#store-trfk-configuration) section to get documentation on it.
|
- `storeconfig` : Store the static traefik configuration into a Key-value stores. Please refer to the [Store Træfik configuration](/user-guide/kv-config/#store-trfk-configuration) section to get documentation on it.
|
||||||
- `bug`: The easiest way to submit a pre-filled issue.
|
- `bug`: The easiest way to submit a pre-filled issue.
|
||||||
- `healthcheck`: Calls traefik `/ping` to check health.
|
- `healthcheck`: Calls traefik `/ping` to check health.
|
||||||
|
|
|
@ -65,8 +65,8 @@ http {
|
||||||
keepalive_requests 10000;
|
keepalive_requests 10000;
|
||||||
types_hash_max_size 2048;
|
types_hash_max_size 2048;
|
||||||
|
|
||||||
open_file_cache max=200000 inactive=300s;
|
open_file_cache max=200000 inactive=300s;
|
||||||
open_file_cache_valid 300s;
|
open_file_cache_valid 300s;
|
||||||
open_file_cache_min_uses 2;
|
open_file_cache_min_uses 2;
|
||||||
open_file_cache_errors on;
|
open_file_cache_errors on;
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,4 @@ prefix = "/traefik"
|
||||||
# Optional
|
# Optional
|
||||||
#
|
#
|
||||||
filename = "boltdb.tmpl"
|
filename = "boltdb.tmpl"
|
||||||
```
|
```
|
||||||
|
|
|
@ -113,4 +113,4 @@ Additional settings can be defined using Consul Catalog tags:
|
||||||
| `traefik.frontend.rule=Host:test.traefik.io` | Override the default frontend rule (Default: `Host:{{.ServiceName}}.{{.Domain}}`). |
|
| `traefik.frontend.rule=Host:test.traefik.io` | Override the default frontend rule (Default: `Host:{{.ServiceName}}.{{.Domain}}`). |
|
||||||
| `traefik.frontend.passHostHeader=true` | Forward client `Host` header to the backend. |
|
| `traefik.frontend.passHostHeader=true` | Forward client `Host` header to the backend. |
|
||||||
| `traefik.frontend.priority=10` | Override default frontend priority |
|
| `traefik.frontend.priority=10` | Override default frontend priority |
|
||||||
| `traefik.frontend.entryPoints=http,https` | Assign this frontend to entry points `http` and `https`. Overrides `defaultEntryPoints`. |
|
| `traefik.frontend.entryPoints=http,https` | Assign this frontend to entry points `http` and `https`. Overrides `defaultEntryPoints`. |
|
||||||
|
|
|
@ -168,4 +168,4 @@ exposedbydefault = false
|
||||||
!!! warning
|
!!! warning
|
||||||
when running inside a container, Træfik will need network access through:
|
when running inside a container, Træfik will need network access through:
|
||||||
|
|
||||||
`docker network connect <network> <traefik-container>`
|
`docker network connect <network> <traefik-container>`
|
||||||
|
|
|
@ -53,7 +53,7 @@ SecretAccessKey = "123"
|
||||||
Endpoint = "http://localhost:8080"
|
Endpoint = "http://localhost:8080"
|
||||||
```
|
```
|
||||||
|
|
||||||
Items in the `dynamodb` table must have three attributes:
|
Items in the `dynamodb` table must have three attributes:
|
||||||
|
|
||||||
- `id` (string): The id is the primary key.
|
- `id` (string): The id is the primary key.
|
||||||
- `name`(string): The name is used as the name of the frontend or backend.
|
- `name`(string): The name is used as the name of the frontend or backend.
|
||||||
|
|
|
@ -148,7 +148,7 @@ filename = "rules.toml"
|
||||||
## Multiple .toml Files
|
## Multiple .toml Files
|
||||||
|
|
||||||
You could have multiple `.toml` files in a directory:
|
You could have multiple `.toml` files in a directory:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[file]
|
[file]
|
||||||
directory = "/path/to/config/"
|
directory = "/path/to/config/"
|
||||||
|
|
|
@ -101,7 +101,7 @@ secretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
If Traefik needs access to the Rancher API, you need to set the `endpoint`, `accesskey` and `secretkey` parameters.
|
If Traefik needs access to the Rancher API, you need to set the `endpoint`, `accesskey` and `secretkey` parameters.
|
||||||
|
|
||||||
To enable traefik to fetch information about the Environment it's deployed in only, you need to create an `Environment API Key`.
|
To enable traefik to fetch information about the Environment it's deployed in only, you need to create an `Environment API Key`.
|
||||||
This can be found within the API Key advanced options.
|
This can be found within the API Key advanced options.
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ You can enable Traefik to export internal metrics to different monitoring system
|
||||||
- DataDog
|
- DataDog
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# DataDog metrics exporter type
|
# DataDog metrics exporter type
|
||||||
[web.metrics.datadog]
|
[web.metrics.datadog]
|
||||||
Address = "localhost:8125"
|
Address = "localhost:8125"
|
||||||
Pushinterval = "10s"
|
Pushinterval = "10s"
|
||||||
|
|
|
@ -35,4 +35,4 @@ prefix = "traefik"
|
||||||
# filename = "zookeeper.tmpl"
|
# filename = "zookeeper.tmpl"
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to the [Key Value storage structure](/user-guide/kv-config/#key-value-storage-structure) section to get documentation on traefik KV structure.
|
Please refer to the [Key Value storage structure](/user-guide/kv-config/#key-value-storage-structure) section to get documentation on traefik KV structure.
|
||||||
|
|
|
@ -154,7 +154,7 @@ logLevel = "ERROR"
|
||||||
|
|
||||||
### Access Logs
|
### Access Logs
|
||||||
|
|
||||||
Access logs are written when `[accessLog]` is defined.
|
Access logs are written when `[accessLog]` is defined.
|
||||||
By default it will write to stdout and produce logs in the textual Common Log Format (CLF), extended with additional fields.
|
By default it will write to stdout and produce logs in the textual Common Log Format (CLF), extended with additional fields.
|
||||||
|
|
||||||
To enable access logs using the default settings just add the `[accessLog]` entry.
|
To enable access logs using the default settings just add the `[accessLog]` entry.
|
||||||
|
@ -197,7 +197,7 @@ This allows the logs to be rotated and processed by an external program, such as
|
||||||
|
|
||||||
Custom error pages can be returned, in lieu of the default, according to frontend-configured ranges of HTTP Status codes.
|
Custom error pages can be returned, in lieu of the default, according to frontend-configured ranges of HTTP Status codes.
|
||||||
In the example below, if a 503 status is returned from the frontend "website", the custom error page at http://2.3.4.5/503.html is returned with the actual status code set in the HTTP header.
|
In the example below, if a 503 status is returned from the frontend "website", the custom error page at http://2.3.4.5/503.html is returned with the actual status code set in the HTTP header.
|
||||||
Note, the `503.html` page itself is not hosted on traefik, but some other infrastructure.
|
Note, the `503.html` page itself is not hosted on traefik, but some other infrastructure.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[frontends]
|
[frontends]
|
||||||
|
@ -275,13 +275,13 @@ The configured status code ranges are inclusive; that is, in the above example,
|
||||||
# If zero, no timeout exists.
|
# If zero, no timeout exists.
|
||||||
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
||||||
# values (digits). If no units are provided, the value is parsed assuming seconds.
|
# values (digits). If no units are provided, the value is parsed assuming seconds.
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# Default: "0s"
|
# Default: "0s"
|
||||||
#
|
#
|
||||||
# readTimeout = "5s"
|
# readTimeout = "5s"
|
||||||
|
|
||||||
# writeTimeout is the maximum duration before timing out writes of the response. It covers the time from the end of
|
# writeTimeout is the maximum duration before timing out writes of the response. It covers the time from the end of
|
||||||
# the request header read to the end of the response write.
|
# the request header read to the end of the response write.
|
||||||
# If zero, no timeout exists.
|
# If zero, no timeout exists.
|
||||||
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
||||||
|
@ -289,7 +289,7 @@ The configured status code ranges are inclusive; that is, in the above example,
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# Default: "0s"
|
# Default: "0s"
|
||||||
#
|
#
|
||||||
# writeTimeout = "5s"
|
# writeTimeout = "5s"
|
||||||
|
|
||||||
# idleTimeout is the maximum duration an idle (keep-alive) connection will remain idle before closing itself.
|
# idleTimeout is the maximum duration an idle (keep-alive) connection will remain idle before closing itself.
|
||||||
|
@ -310,30 +310,30 @@ The configured status code ranges are inclusive; that is, in the above example,
|
||||||
```toml
|
```toml
|
||||||
[forwardingTimeouts]
|
[forwardingTimeouts]
|
||||||
|
|
||||||
# dialTimeout is the amount of time to wait until a connection to a backend server can be established.
|
# dialTimeout is the amount of time to wait until a connection to a backend server can be established.
|
||||||
# If zero, no timeout exists.
|
# If zero, no timeout exists.
|
||||||
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
||||||
# values (digits). If no units are provided, the value is parsed assuming seconds.
|
# values (digits). If no units are provided, the value is parsed assuming seconds.
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# Default: "30s"
|
# Default: "30s"
|
||||||
#
|
#
|
||||||
# dialTimeout = "30s"
|
# dialTimeout = "30s"
|
||||||
|
|
||||||
# responseHeaderTimeout is the amount of time to wait for a server's response headers after fully writing the request (including its body, if any).
|
# responseHeaderTimeout is the amount of time to wait for a server's response headers after fully writing the request (including its body, if any).
|
||||||
# If zero, no timeout exists.
|
# If zero, no timeout exists.
|
||||||
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw
|
||||||
# values (digits). If no units are provided, the value is parsed assuming seconds.
|
# values (digits). If no units are provided, the value is parsed assuming seconds.
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# Default: "0s"
|
# Default: "0s"
|
||||||
#
|
#
|
||||||
# responseHeaderTimeout = "0s"
|
# responseHeaderTimeout = "0s"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Idle Timeout (deprecated)
|
### Idle Timeout (deprecated)
|
||||||
|
|
||||||
Use [respondingTimeouts](/configuration/commons/#responding-timeouts) instead of `IdleTimeout`.
|
Use [respondingTimeouts](/configuration/commons/#responding-timeouts) instead of `IdleTimeout`.
|
||||||
In the case both settings are configured, the deprecated option will be overwritten.
|
In the case both settings are configured, the deprecated option will be overwritten.
|
||||||
|
|
||||||
`IdleTimeout` is the maximum amount of time an idle (keep-alive) connection will remain idle before closing itself.
|
`IdleTimeout` is the maximum amount of time an idle (keep-alive) connection will remain idle before closing itself.
|
||||||
|
@ -344,7 +344,7 @@ If no units are provided, the value is parsed assuming seconds.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# IdleTimeout
|
# IdleTimeout
|
||||||
#
|
#
|
||||||
# DEPRECATED - see [respondingTimeouts] section.
|
# DEPRECATED - see [respondingTimeouts] section.
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
|
@ -388,7 +388,7 @@ filename = "my_custom_config_template.tpml"
|
||||||
|
|
||||||
The template files can be written using functions provided by:
|
The template files can be written using functions provided by:
|
||||||
|
|
||||||
- [go template](https://golang.org/pkg/text/template/)
|
- [go template](https://golang.org/pkg/text/template/)
|
||||||
- [sprig library](https://masterminds.github.io/sprig/)
|
- [sprig library](https://masterminds.github.io/sprig/)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
|
@ -71,7 +71,7 @@ Run it and forget it!
|
||||||
You can have a quick look at Træfik in this [Katacoda tutorial](https://www.katacoda.com/courses/traefik/deploy-load-balancer) that shows how to load balance requests between multiple Docker containers.
|
You can have a quick look at Træfik in this [Katacoda tutorial](https://www.katacoda.com/courses/traefik/deploy-load-balancer) that shows how to load balance requests between multiple Docker containers.
|
||||||
|
|
||||||
Here is a talk given by [Emile Vauge](https://github.com/emilevauge) at [GopherCon 2017](https://gophercon.com).
|
Here is a talk given by [Emile Vauge](https://github.com/emilevauge) at [GopherCon 2017](https://gophercon.com).
|
||||||
You will learn Træfik basics in less than 10 minutes.
|
You will learn Træfik basics in less than 10 minutes.
|
||||||
|
|
||||||
[![Traefik GopherCon 2017](https://img.youtube.com/vi/RgudiksfL-k/0.jpg)](https://www.youtube.com/watch?v=RgudiksfL-k)
|
[![Traefik GopherCon 2017](https://img.youtube.com/vi/RgudiksfL-k/0.jpg)](https://www.youtube.com/watch?v=RgudiksfL-k)
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,4 @@ Once your Træfik configuration is uploaded on your KV store, you can start each
|
||||||
A Træfik cluster is based on a manager/worker model.
|
A Træfik cluster is based on a manager/worker model.
|
||||||
When starting, Træfik will elect a manager.
|
When starting, Træfik will elect a manager.
|
||||||
If this instance fails, another manager will be automatically elected.
|
If this instance fails, another manager will be automatically elected.
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ consul:
|
||||||
- "8301"
|
- "8301"
|
||||||
- "8301/udp"
|
- "8301/udp"
|
||||||
- "8302"
|
- "8302"
|
||||||
- "8302/udp"
|
- "8302/udp"
|
||||||
|
|
||||||
whoami1:
|
whoami1:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
|
@ -303,11 +303,11 @@ Wait, I thought we added the sticky flag to `whoami1`? Traefik relies on a cook
|
||||||
First you need to add `whoami1.traefik` to your hosts file:
|
First you need to add `whoami1.traefik` to your hosts file:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
if [ -n "$(grep whoami1.traefik /etc/hosts)" ];
|
if [ -n "$(grep whoami1.traefik /etc/hosts)" ];
|
||||||
then
|
then
|
||||||
echo "whoami1.traefik already exists (make sure the ip is current)";
|
echo "whoami1.traefik already exists (make sure the ip is current)";
|
||||||
else
|
else
|
||||||
sudo -- sh -c -e "echo '$(docker-machine ip manager)\twhoami1.traefik' >> /etc/hosts";
|
sudo -- sh -c -e "echo '$(docker-machine ip manager)\twhoami1.traefik' >> /etc/hosts";
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -56,4 +56,4 @@ services:
|
||||||
- "mesos-slave:172.17.0.1"
|
- "mesos-slave:172.17.0.1"
|
||||||
environment:
|
environment:
|
||||||
- MARATHON_ZK=zk://zookeeper:2181/marathon
|
- MARATHON_ZK=zk://zookeeper:2181/marathon
|
||||||
- MARATHON_MASTER=zk://zookeeper:2181/mesos
|
- MARATHON_MASTER=zk://zookeeper:2181/mesos
|
||||||
|
|
|
@ -3,4 +3,4 @@ apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: kube-system
|
name: kube-system
|
||||||
labels:
|
labels:
|
||||||
name: kube-system
|
name: kube-system
|
||||||
|
|
|
@ -37,4 +37,4 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
################################################################
|
################################################################
|
||||||
# Global configuration
|
# Global configuration
|
||||||
################################################################
|
################################################################
|
||||||
traefikLogsFile = "traefik.log"
|
traefikLogsFile = "traefik.log"
|
||||||
accessLogsFile = "access.log"
|
accessLogsFile = "access.log"
|
||||||
logLevel = "ERROR"
|
logLevel = "ERROR"
|
||||||
defaultEntryPoints = ["http"]
|
defaultEntryPoints = ["http"]
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Web configuration backend
|
# Web configuration backend
|
||||||
################################################################
|
################################################################
|
||||||
[web]
|
[web]
|
||||||
address = ":7888"
|
address = ":7888"
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# File configuration backend
|
# File configuration backend
|
||||||
################################################################
|
################################################################
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# rules
|
# rules
|
||||||
################################################################
|
################################################################
|
||||||
[backends]
|
[backends]
|
||||||
[backends.backend1]
|
[backends.backend1]
|
||||||
[backends.backend1.servers.server1]
|
[backends.backend1.servers.server1]
|
||||||
url = "http://127.0.0.1:8081"
|
url = "http://127.0.0.1:8081"
|
||||||
[backends.backend2]
|
[backends.backend2]
|
||||||
[backends.backend2.LoadBalancer]
|
[backends.backend2.LoadBalancer]
|
||||||
method = "drr"
|
method = "drr"
|
||||||
[backends.backend2.servers.server1]
|
[backends.backend2.servers.server1]
|
||||||
url = "http://127.0.0.1:8082"
|
url = "http://127.0.0.1:8082"
|
||||||
[backends.backend2.servers.server2]
|
[backends.backend2.servers.server2]
|
||||||
url = "http://127.0.0.1:8083"
|
url = "http://127.0.0.1:8083"
|
||||||
[frontends]
|
[frontends]
|
||||||
[frontends.frontend1]
|
[frontends.frontend1]
|
||||||
backend = "backend1"
|
backend = "backend1"
|
||||||
[frontends.frontend1.routes.test_1]
|
[frontends.frontend1.routes.test_1]
|
||||||
rule = "Path: /test1"
|
rule = "Path: /test1"
|
||||||
[frontends.frontend2]
|
[frontends.frontend2]
|
||||||
backend = "backend2"
|
backend = "backend2"
|
||||||
passHostHeader = true
|
passHostHeader = true
|
||||||
[frontends.frontend2.routes.test_2]
|
[frontends.frontend2.routes.test_2]
|
||||||
rule = "Path: /test2"
|
rule = "Path: /test2"
|
||||||
|
|
|
@ -34,4 +34,4 @@ sudo openssl genrsa -out "$SSL_DIR/wildcard.key" 2048
|
||||||
sudo openssl req -new -subj "$(echo -n "$SUBJ" | tr "\n" "/")" -key "$SSL_DIR/wildcard.key" -out "$SSL_DIR/wildcard.csr" -passin pass:$PASSPHRASE
|
sudo openssl req -new -subj "$(echo -n "$SUBJ" | tr "\n" "/")" -key "$SSL_DIR/wildcard.key" -out "$SSL_DIR/wildcard.csr" -passin pass:$PASSPHRASE
|
||||||
sudo openssl x509 -req -days 3650 -in "$SSL_DIR/wildcard.csr" -signkey "$SSL_DIR/wildcard.key" -out "$SSL_DIR/wildcard.crt"
|
sudo openssl x509 -req -days 3650 -in "$SSL_DIR/wildcard.csr" -signkey "$SSL_DIR/wildcard.key" -out "$SSL_DIR/wildcard.crt"
|
||||||
sudo rm -f "$SSL_DIR/wildcard.csr"
|
sudo rm -f "$SSL_DIR/wildcard.csr"
|
||||||
```
|
```
|
||||||
|
|
|
@ -11,6 +11,6 @@ logLevel = "DEBUG"
|
||||||
endpoint = "{{.ConsulHost}}:8500"
|
endpoint = "{{.ConsulHost}}:8500"
|
||||||
watch = true
|
watch = true
|
||||||
prefix = "traefik"
|
prefix = "traefik"
|
||||||
|
|
||||||
[web]
|
[web]
|
||||||
address = ":8081"
|
address = ":8081"
|
||||||
|
|
|
@ -12,4 +12,4 @@ logLevel = "DEBUG"
|
||||||
endpoint = "{{.DockerHost}}"
|
endpoint = "{{.DockerHost}}"
|
||||||
|
|
||||||
domain = "docker.localhost"
|
domain = "docker.localhost"
|
||||||
exposedbydefault = true
|
exposedbydefault = true
|
||||||
|
|
|
@ -38,4 +38,4 @@ fblo6RBxUQ==
|
||||||
[frontends.frontend1]
|
[frontends.frontend1]
|
||||||
backend = "backend1"
|
backend = "backend1"
|
||||||
[frontends.frontend1.routes.test_1]
|
[frontends.frontend1.routes.test_1]
|
||||||
rule = "Path: /ping"
|
rule = "Path: /ping"
|
||||||
|
|
|
@ -22,4 +22,4 @@ RootCAs = [ "fixtures/https/rootcas/local.crt"]
|
||||||
[frontends.frontend1]
|
[frontends.frontend1]
|
||||||
backend = "backend1"
|
backend = "backend1"
|
||||||
[frontends.frontend1.routes.test_1]
|
[frontends.frontend1.routes.test_1]
|
||||||
rule = "Path: /ping"
|
rule = "Path: /ping"
|
||||||
|
|
|
@ -11,4 +11,4 @@ AAAAATANBgkqhkiG9w0BAQsFAAOBgQCEcetwO59EWk7WiJsG4x8SY+UIAA+flUI9
|
||||||
tyC4lNhbcF2Idq9greZwbYCqTTTr2XiRNSMLCOjKyI7ukPoPjo16ocHj+P3vZGfs
|
tyC4lNhbcF2Idq9greZwbYCqTTTr2XiRNSMLCOjKyI7ukPoPjo16ocHj+P3vZGfs
|
||||||
h1fIw3cSS2OolhloGw/XM6RWPWtPAlGykKLciQrBru5NAPvCMsb/I1DAceTiotQM
|
h1fIw3cSS2OolhloGw/XM6RWPWtPAlGykKLciQrBru5NAPvCMsb/I1DAceTiotQM
|
||||||
fblo6RBxUQ==
|
fblo6RBxUQ==
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
|
|
@ -2,4 +2,4 @@ defaultEntryPoints = ["http"]
|
||||||
|
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
|
@ -10,16 +10,16 @@ consul:
|
||||||
- "8301"
|
- "8301"
|
||||||
- "8301/udp"
|
- "8301/udp"
|
||||||
- "8302"
|
- "8302"
|
||||||
- "8302/udp"
|
- "8302/udp"
|
||||||
|
|
||||||
whoami1:
|
whoami1:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
||||||
whoami2:
|
whoami2:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
||||||
whoami3:
|
whoami3:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
||||||
whoami4:
|
whoami4:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
|
@ -9,6 +9,6 @@ consul:
|
||||||
- "8301"
|
- "8301"
|
||||||
- "8301/udp"
|
- "8301/udp"
|
||||||
- "8302"
|
- "8302"
|
||||||
- "8302/udp"
|
- "8302/udp"
|
||||||
volumes:
|
volumes:
|
||||||
- ../tls:/configs
|
- ../tls:/configs
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
etcd:
|
etcd:
|
||||||
image: containous/docker-etcd
|
image: containous/docker-etcd
|
||||||
|
|
||||||
whoami1:
|
whoami1:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
||||||
whoami2:
|
whoami2:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
||||||
whoami3:
|
whoami3:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
||||||
whoami4:
|
whoami4:
|
||||||
image: emilevauge/whoami
|
image: emilevauge/whoami
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
"cert_file": "/configs/consul.cert",
|
"cert_file": "/configs/consul.cert",
|
||||||
"key_file": "/configs/consul.key",
|
"key_file": "/configs/consul.key",
|
||||||
"verify_outgoing": true
|
"verify_outgoing": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
td, th {
|
td, th {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue