mirror of
https://github.com/containous/traefik.git
synced 2025-09-08 13:44:22 +03:00
Compare commits
260 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3ff83fc1f8 | ||
|
63f65e5b2a | ||
|
ac8e47579b | ||
|
5487015a83 | ||
|
418cccd307 | ||
|
2a0760412c | ||
|
42d8e6d60d | ||
|
7ba907f261 | ||
|
c72769e2ea | ||
|
02d856b8a5 | ||
|
0d15ac8861 | ||
|
134a767a7f | ||
|
7403b6fb82 | ||
|
121eaced49 | ||
|
512ed086bd | ||
|
76e35a09b7 | ||
|
d2c1d39d42 | ||
|
e9cccf6504 | ||
|
1c505903ff | ||
|
53ed8e04ae | ||
|
be0845af02 | ||
|
f83a57b3da | ||
|
08264749f0 | ||
|
a75819cae3 | ||
|
9fb32a47ca | ||
|
4f43c9ebb4 | ||
|
9177982334 | ||
|
52eeff9f9f | ||
|
0fcccd35ff | ||
|
598dcf6b62 | ||
|
459200dd01 | ||
|
af22cabc6f | ||
|
920e82f11a | ||
|
9bdf9e1e02 | ||
|
3a45f05e36 | ||
|
8e3e387be7 | ||
|
267d0b7b5a | ||
|
f5b290b093 | ||
|
4ea1c98ac9 | ||
|
db007efe00 | ||
|
a0c02f62a3 | ||
|
ff7b814edc | ||
|
ea459e9af0 | ||
|
2dd5a53db2 | ||
|
fc97ea7ee0 | ||
|
582d2540af | ||
|
6ad79dcd45 | ||
|
721896ba70 | ||
|
228270414c | ||
|
2683df7b5b | ||
|
3e61d1f233 | ||
|
04c07227f2 | ||
|
2e8d99c5b8 | ||
|
c07301473b | ||
|
b1ba42410b | ||
|
b80f89e3db | ||
|
5c853766e8 | ||
|
d2435cf43b | ||
|
556f7608db | ||
|
a4df4b028e | ||
|
63683d35fc | ||
|
495344591f | ||
|
4e508499da | ||
|
e4a3df3516 | ||
|
3506cbd5e9 | ||
|
ab13019bde | ||
|
ddc663eac0 | ||
|
fc7002fbab | ||
|
c5b4e589ff | ||
|
c9bbfa1272 | ||
|
8ca0d804d8 | ||
|
54e5a3607e | ||
|
2477e18c87 | ||
|
ef08e8b8a0 | ||
|
f59bf16e82 | ||
|
118c31eb8d | ||
|
476f16f0aa | ||
|
b40d35b779 | ||
|
8e016cf672 | ||
|
7e482e9f8b | ||
|
6445befe87 | ||
|
79af433381 | ||
|
c0f1e74bed | ||
|
9df89e66e3 | ||
|
660375d6e4 | ||
|
230c2e5cc2 | ||
|
3e60863e2d | ||
|
4592626bbb | ||
|
b980c87eff | ||
|
0f7c322623 | ||
|
93b3d601d5 | ||
|
56329e89bb | ||
|
5c8b8149eb | ||
|
ddf53494f0 | ||
|
cd1f03d4f4 | ||
|
8474a61f21 | ||
|
4ad0ab5433 | ||
|
66d151df77 | ||
|
2045b250fd | ||
|
1dbee90d34 | ||
|
eb7a6d925b | ||
|
3678bd5a93 | ||
|
2d1a973ee5 | ||
|
322f7b2ad4 | ||
|
41aa2672cd | ||
|
f3090a452a | ||
|
52790d3c37 | ||
|
3677252e17 | ||
|
235d1d655d | ||
|
69c0f38305 | ||
|
0399d0c4d6 | ||
|
3e3b7238e0 | ||
|
532b5865de | ||
|
54b94f29e1 | ||
|
b67a7215f6 | ||
|
e424cc7608 | ||
|
229008e76a | ||
|
584f4bc596 | ||
|
1502d20def | ||
|
eecc2f4dd7 | ||
|
6fc110a71a | ||
|
ca6b46533a | ||
|
a1fe29347a | ||
|
6e5dd35ee3 | ||
|
0d5d14d41a | ||
|
3a42e457cf | ||
|
5b05c990b0 | ||
|
9df0a6208b | ||
|
3214904cc7 | ||
|
ec775a016a | ||
|
a2ca235fee | ||
|
3942962ef5 | ||
|
675655d437 | ||
|
dafb14ff37 | ||
|
fc52d1cfba | ||
|
fdf2a68a11 | ||
|
3908ef611a | ||
|
e63db782c1 | ||
|
a6c6127e33 | ||
|
207d0bec78 | ||
|
1443c8d4c6 | ||
|
a136c46148 | ||
|
bbbc18fd84 | ||
|
2c7f6e4def | ||
|
dcd0cda0c6 | ||
|
ff16925f63 | ||
|
0b7aaa3643 | ||
|
44a244b1cb | ||
|
1dc6f39b55 | ||
|
45f52ca29c | ||
|
fae2d93525 | ||
|
25b74ce1f3 | ||
|
4957e498af | ||
|
54ca1abd2b | ||
|
8f2951b275 | ||
|
720bef97e6 | ||
|
c42f1b7a50 | ||
|
0186c31d59 | ||
|
58bf1a2ca5 | ||
|
4a31544024 | ||
|
cb6ec507e2 | ||
|
1ef93fead7 | ||
|
285ded6e49 | ||
|
6e4f5821dc | ||
|
a3df5b9a94 | ||
|
04f0ebf776 | ||
|
0e97a3becd | ||
|
77a0cef9ce | ||
|
143e9b6f9c | ||
|
06dcf8d8aa | ||
|
c315b4e064 | ||
|
73ca7ad0c1 | ||
|
d7f517fbf5 | ||
|
b10cb84f33 | ||
|
a55f0cabdd | ||
|
d73c7ccf50 | ||
|
2b35397169 | ||
|
416c367778 | ||
|
a20e90aa17 | ||
|
d698eba1e7 | ||
|
fe8e9414cf | ||
|
ed216bea4d | ||
|
3350b56057 | ||
|
4d71f682b3 | ||
|
607cda779d | ||
|
b61de07ca0 | ||
|
295ed76a1a | ||
|
7669f41e8e | ||
|
8da051789f | ||
|
30e0778ed2 | ||
|
7b1a256546 | ||
|
cc4879fb76 | ||
|
7c54a45950 | ||
|
73513f8371 | ||
|
dabf69abc7 | ||
|
8d3d5c068c | ||
|
cb1d0441e9 | ||
|
8d827f98da | ||
|
e5e46bf4ed | ||
|
9f32292473 | ||
|
7affeae480 | ||
|
b0f7b71453 | ||
|
c0c540dc09 | ||
|
7694ff1761 | ||
|
0d902671e5 | ||
|
fb90a7889a | ||
|
48c73d6a34 | ||
|
12e462f383 | ||
|
b7fe55b6be | ||
|
a1270d6cc7 | ||
|
f874c389bd | ||
|
8c5846c478 | ||
|
dce807a329 | ||
|
7928e6d0cd | ||
|
a98b726263 | ||
|
42ec4e4e98 | ||
|
635e3fb9a8 | ||
|
5f0b6fde92 | ||
|
04257afab7 | ||
|
b673969a0f | ||
|
c52c40f061 | ||
|
abdb5cc6cb | ||
|
4a6817c64b | ||
|
328611c619 | ||
|
f12c27aa7c | ||
|
e22c62baba | ||
|
6b1158235e | ||
|
efcaf64a43 | ||
|
f120301bc8 | ||
|
4da63c9237 | ||
|
97294df84f | ||
|
de42fc10b5 | ||
|
e5c6b0d4ea | ||
|
7c7ca7ef2b | ||
|
a813d32c53 | ||
|
2f18e20cb0 | ||
|
2ce2d63bda | ||
|
367e797d5f | ||
|
4fcf7bf2de | ||
|
e1d51b51f2 | ||
|
40b4032ea0 | ||
|
756aa82aa9 | ||
|
fe5a4a26f8 | ||
|
2171cb7f3d | ||
|
f55a09862e | ||
|
d0b21efd36 | ||
|
daf4258472 | ||
|
619bc95b2b | ||
|
76c2fa6d9a | ||
|
77bf3ac6ce | ||
|
0d7761f097 | ||
|
6c08d0b20b | ||
|
148400ae0a | ||
|
ac1657d86e | ||
|
332c314d53 | ||
|
5c8d386881 | ||
|
6f749c6414 | ||
|
a6b6e1d101 | ||
|
aa68cc2e63 | ||
|
f624449ccb |
24
.github/CODEOWNERS
vendored
24
.github/CODEOWNERS
vendored
@@ -1,24 +0,0 @@
|
||||
provider/kubernetes/** @containous/kubernetes
|
||||
provider/rancher/** @containous/rancher
|
||||
provider/marathon/** @containous/marathon
|
||||
provider/docker/** @containous/docker
|
||||
|
||||
docs/user-guide/kubernetes.md @containous/kubernetes
|
||||
docs/user-guide/marathon.md @containous/marathon
|
||||
docs/user-guide/swarm.md @containous/docker
|
||||
docs/user-guide/swarm-mode.md @containous/docker
|
||||
|
||||
docs/configuration/backends/docker.md @containous/docker
|
||||
docs/configuration/backends/kubernetes.md @containous/kubernetes
|
||||
docs/configuration/backends/marathon.md @containous/marathon
|
||||
docs/configuration/backends/rancher.md @containous/rancher
|
||||
|
||||
examples/k8s/ @containous/kubernetes
|
||||
examples/compose-k8s.yaml @containous/kubernetes
|
||||
examples/k8s.namespace.yaml @containous/kubernetes
|
||||
examples/compose-rancher.yml @containous/rancher
|
||||
examples/compose-marathon.yml @containous/marathon
|
||||
|
||||
vendor/github.com/gambol99/go-marathon @containous/marathon
|
||||
vendor/github.com/rancher @containous/rancher
|
||||
vendor/k8s.io/ @containous/kubernetes
|
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -17,7 +17,7 @@ Bug
|
||||
<!--
|
||||
|
||||
The configurations between 1.X and 2.X are NOT compatible.
|
||||
Please have a look here https://docs.traefik.io/v2.0/getting-started/configuration-overview/.
|
||||
Please have a look here https://doc.traefik.io/traefik/getting-started/configuration-overview/.
|
||||
|
||||
-->
|
||||
|
||||
|
2
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
@@ -22,7 +22,7 @@ Bug
|
||||
<!--
|
||||
|
||||
The configurations between 1.X and 2.X are NOT compatible.
|
||||
Please have a look here https://docs.traefik.io/v2.0/getting-started/configuration-overview/.
|
||||
Please have a look here https://doc.traefik.io/traefik/getting-started/configuration-overview/.
|
||||
|
||||
-->
|
||||
|
||||
|
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -3,17 +3,17 @@ PLEASE READ THIS MESSAGE.
|
||||
|
||||
Documentation fixes or enhancements:
|
||||
- for Traefik v1: use branch v1.7
|
||||
- for Traefik v2: use branch v2.2
|
||||
- for Traefik v2: use branch v2.3
|
||||
|
||||
Bug fixes:
|
||||
- for Traefik v1: use branch v1.7
|
||||
- for Traefik v2: use branch v2.2
|
||||
- for Traefik v2: use branch v2.3
|
||||
|
||||
Enhancements:
|
||||
- for Traefik v1: we only accept bug fixes
|
||||
- for Traefik v2: use branch master
|
||||
|
||||
HOW TO WRITE A GOOD PULL REQUEST? https://docs.traefik.io/contributing/submitting-pull-requests/
|
||||
HOW TO WRITE A GOOD PULL REQUEST? https://doc.traefik.io/traefik/contributing/submitting-pull-requests/
|
||||
|
||||
-->
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,3 +16,5 @@
|
||||
*.exe
|
||||
cover.out
|
||||
vendor/
|
||||
plugins-storage/
|
||||
traefik_changelog.md
|
||||
|
@@ -49,6 +49,15 @@
|
||||
"wsl", # Too strict
|
||||
"gomnd", # Too strict
|
||||
"stylecheck", # skip because report issues related to some generated files.
|
||||
"testpackage", # Too strict
|
||||
"goerr113", # Too strict
|
||||
"nestif", # Too many false-positive.
|
||||
"noctx", # Too strict
|
||||
"exhaustive", # Too strict
|
||||
"nlreturn", # Not relevant
|
||||
"wrapcheck", # Too strict
|
||||
"tparallel", # Not relevant
|
||||
"exhaustivestruct", # Not relevant
|
||||
]
|
||||
|
||||
[issues]
|
||||
@@ -62,7 +71,7 @@
|
||||
]
|
||||
[[issues.exclude-rules]]
|
||||
path = "(.+)_test.go"
|
||||
linters = ["goconst", "funlen"]
|
||||
linters = ["goconst", "funlen", "godot"]
|
||||
[[issues.exclude-rules]]
|
||||
path = "integration/.+_test.go"
|
||||
text = "Error return value of `cmd\\.Process\\.Kill` is not checked"
|
||||
@@ -95,7 +104,7 @@
|
||||
text = "string `traefik` has (\\d) occurrences, make it a constant"
|
||||
[[issues.exclude-rules]]
|
||||
path = "pkg/server/middleware/middlewares.go"
|
||||
text = "Function 'buildConstructor' is too long \\(\\d+ > 230\\)"
|
||||
text = "Function 'buildConstructor' has too many statements"
|
||||
[[issues.exclude-rules]] # FIXME must be fixed
|
||||
path = "cmd/context.go"
|
||||
text = "S1000: should use a simple channel send/receive instead of `select` with a single case"
|
||||
@@ -105,3 +114,6 @@
|
||||
[[issues.exclude-rules]]
|
||||
path = "pkg/tracing/tracing.go"
|
||||
text = "printf-like formatting function 'SetErrorWithEvent' should be named 'SetErrorWithEventf'"
|
||||
[[issues.exclude-rules]]
|
||||
path = "pkg/log/deprecated.go"
|
||||
linters = ["godot"]
|
@@ -7,11 +7,11 @@ before:
|
||||
builds:
|
||||
- binary: traefik
|
||||
|
||||
main: ./cmd/traefik/traefik.go
|
||||
main: ./cmd/traefik/
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
ldflags:
|
||||
- -s -w -X github.com/containous/traefik/v2/pkg/version.Version={{.Version}} -X github.com/containous/traefik/v2/pkg/version.Codename={{.Env.CODENAME}} -X github.com/containous/traefik/v2/pkg/version.BuildDate={{.Date}}
|
||||
- -s -w -X github.com/traefik/traefik/v2/pkg/version.Version={{.Version}} -X github.com/traefik/traefik/v2/pkg/version.Codename={{.Env.CODENAME}} -X github.com/traefik/traefik/v2/pkg/version.BuildDate={{.Date}}
|
||||
|
||||
goos:
|
||||
- linux
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# For personnal CI
|
||||
# mv /home/runner/workspace/src/github.com/<username>/ /home/runner/workspace/src/github.com/containous/
|
||||
# cd /home/runner/workspace/src/github.com/containous/traefik/
|
||||
# mv /home/runner/workspace/src/github.com/<username>/ /home/runner/workspace/src/github.com/traefik/
|
||||
# cd /home/runner/workspace/src/github.com/traefik/traefik/
|
||||
for s in apache2 cassandra elasticsearch memcached mysql mongod postgresql sphinxsearch rethinkdb rabbitmq-server redis-server; do sudo service $s stop; done
|
||||
sudo swapoff -a
|
||||
sudo dd if=/dev/zero of=/swapfile bs=1M count=3072
|
||||
@@ -10,7 +10,7 @@ sudo rm -rf /home/runner/.rbenv
|
||||
sudo rm -rf /usr/local/golang/{1.4.3,1.5.4,1.6.4,1.7.6,1.8.6,1.9.7,1.10.3,1.11}
|
||||
#export DOCKER_VERSION=18.06.3
|
||||
source .semaphoreci/vars
|
||||
if [ -z "${PULL_REQUEST_NUMBER}" ]; then SHOULD_TEST="-*-"; else TEMP_STORAGE=$(curl --silent https://patch-diff.githubusercontent.com/raw/containous/traefik/pull/${PULL_REQUEST_NUMBER}.diff | patch --dry-run -p1 -R || true); fi
|
||||
if [ -z "${PULL_REQUEST_NUMBER}" ]; then SHOULD_TEST="-*-"; else TEMP_STORAGE=$(curl --silent https://patch-diff.githubusercontent.com/raw/traefik/traefik/pull/${PULL_REQUEST_NUMBER}.diff | patch --dry-run -p1 -R || true); fi
|
||||
echo ${SHOULD_TEST}
|
||||
if [ -n "$TEMP_STORAGE" ]; then SHOULD_TEST=$(echo "$TEMP_STORAGE" | grep -Ev '(.md|.yaml|.yml)' || :); fi
|
||||
echo ${TEMP_STORAGE}
|
||||
@@ -20,7 +20,7 @@ echo ${SHOULD_TEST}
|
||||
if [ -n "$SHOULD_TEST" ]; then docker version; fi
|
||||
export GO_VERSION=1.13
|
||||
if [ -f "./go.mod" ]; then GO_VERSION="$(grep '^go .*' go.mod | awk '{print $2}')"; export GO_VERSION; fi
|
||||
#if [ "${GO_VERSION}" == '1.14' ]; then export GO_VERSION=1.14rc2; fi
|
||||
#if [ "${GO_VERSION}" == '1.15' ]; then export GO_VERSION=1.15rc2; fi
|
||||
echo "Selected Go version: ${GO_VERSION}"
|
||||
|
||||
if [ -f "./.semaphoreci/golang.sh" ]; then ./.semaphoreci/golang.sh; fi
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
export REPO='containous/traefik'
|
||||
export REPO='traefik/traefik'
|
||||
|
||||
if VERSION=$(git describe --exact-match --abbrev=0 --tags);
|
||||
then
|
||||
@@ -10,7 +10,7 @@ else
|
||||
export VERSION=''
|
||||
fi
|
||||
|
||||
export CODENAME=chevrotin
|
||||
export CODENAME=picodon
|
||||
|
||||
export N_MAKE_JOBS=2
|
||||
|
||||
|
21
.travis.yml
21
.travis.yml
@@ -11,7 +11,7 @@ env:
|
||||
global:
|
||||
- REPO=$TRAVIS_REPO_SLUG
|
||||
- VERSION=$TRAVIS_TAG
|
||||
- CODENAME=chevrotin
|
||||
- CODENAME=picodon
|
||||
- GO111MODULE=on
|
||||
|
||||
script:
|
||||
@@ -29,8 +29,9 @@ before_deploy:
|
||||
if [ "$TRAVIS_TAG" ]; then
|
||||
make release-packages;
|
||||
fi;
|
||||
curl -sfL https://raw.githubusercontent.com/containous/structor/master/godownloader.sh | bash -s -- -b "${GOPATH}/bin" ${STRUCTOR_VERSION}
|
||||
structor -o containous -r traefik --dockerfile-url="https://raw.githubusercontent.com/containous/traefik/v1.7/docs.Dockerfile" --menu.js-url="https://raw.githubusercontent.com/containous/structor/master/traefik-menu.js.gotmpl" --rqts-url="https://raw.githubusercontent.com/containous/structor/master/requirements-override.txt" --force-edit-url --exp-branch=master --debug;
|
||||
curl -sfL https://raw.githubusercontent.com/traefik/structor/master/godownloader.sh | bash -s -- -b "${GOPATH}/bin" ${STRUCTOR_VERSION}
|
||||
curl -sSfL https://raw.githubusercontent.com/traefik/mixtus/master/godownloader.sh | sh -s -- -b "${GOPATH}/bin" ${MIXTUS_VERSION}
|
||||
structor -o traefik -r traefik --dockerfile-url="https://raw.githubusercontent.com/traefik/traefik/v1.7/docs.Dockerfile" --menu.js-url="https://raw.githubusercontent.com/traefik/structor/master/traefik-menu.js.gotmpl" --rqts-url="https://raw.githubusercontent.com/traefik/structor/master/requirements-override.txt" --force-edit-url --exp-branch=master --debug;
|
||||
fi
|
||||
|
||||
deploy:
|
||||
@@ -40,19 +41,17 @@ deploy:
|
||||
skip_cleanup: true
|
||||
file_glob: true
|
||||
on:
|
||||
repo: containous/traefik
|
||||
repo: traefik/traefik
|
||||
tags: true
|
||||
- provider: script
|
||||
script: sh script/deploy.sh
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: containous/traefik
|
||||
repo: traefik/traefik
|
||||
tags: true
|
||||
- provider: pages
|
||||
edge: false
|
||||
github_token: ${GITHUB_TOKEN}
|
||||
local_dir: site
|
||||
- provider: script
|
||||
script: mixtus --dst-doc-path="./traefik" --dst-owner=traefik --dst-repo-name=doc --git-user-email="30906710+traefiker@users.noreply.github.com" --git-user-name=traefiker --src-doc-path="./site" --src-owner=containous --src-repo-name=traefik
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: containous/traefik
|
||||
all_branches: true
|
||||
repo: traefik/traefik
|
||||
all_branches: true
|
Binary file not shown.
8135
CHANGELOG.md
8135
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@ Representation of a project may be further defined and clarified by project main
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@containo.us
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@traefik.io
|
||||
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
|
||||
The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
@@ -48,4 +48,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Contributing
|
||||
|
||||
- https://docs.traefik.io/contributing/submitting-pull-requests/
|
||||
- https://docs.traefik.io/contributing/submitting-issues/
|
||||
- https://doc.traefik.io/traefik/contributing/submitting-pull-requests/
|
||||
- https://doc.traefik.io/traefik/contributing/submitting-issues/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-2020 Containous SAS
|
||||
Copyright (c) 2016-2020 Containous SAS; 2020 Traefik Labs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
10
Makefile
10
Makefile
@@ -13,7 +13,7 @@ GIT_BRANCH := $(subst heads/,,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/nul
|
||||
TRAEFIK_DEV_IMAGE := traefik-dev$(if $(GIT_BRANCH),:$(subst /,-,$(GIT_BRANCH)))
|
||||
|
||||
REPONAME := $(shell echo $(REPO) | tr '[:upper:]' '[:lower:]')
|
||||
TRAEFIK_IMAGE := $(if $(REPONAME),$(REPONAME),"containous/traefik")
|
||||
TRAEFIK_IMAGE := $(if $(REPONAME),$(REPONAME),"traefik/traefik")
|
||||
|
||||
INTEGRATION_OPTS := $(if $(MAKE_DOCKER_HOST),-e "DOCKER_HOST=$(MAKE_DOCKER_HOST)", -e "TEST_CONTAINER=1" -v "/var/run/docker.sock:/var/run/docker.sock")
|
||||
DOCKER_BUILD_ARGS := $(if $(DOCKER_VERSION), "--build-arg=DOCKER_VERSION=$(DOCKER_VERSION)",)
|
||||
@@ -29,14 +29,16 @@ TRAEFIK_ENVS := \
|
||||
-e CI \
|
||||
-e CONTAINER=DOCKER # Indicator for integration tests that we are running inside a container.
|
||||
|
||||
TRAEFIK_MOUNT := -v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/containous/traefik/$(BIND_DIR)"
|
||||
TRAEFIK_MOUNT := -v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/traefik/traefik/$(BIND_DIR)"
|
||||
DOCKER_RUN_OPTS := $(TRAEFIK_ENVS) $(TRAEFIK_MOUNT) "$(TRAEFIK_DEV_IMAGE)"
|
||||
DOCKER_NON_INTERACTIVE ?= false
|
||||
DOCKER_RUN_TRAEFIK := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS)
|
||||
DOCKER_RUN_TRAEFIK := docker run --add-host=host.docker.internal:127.0.0.1 $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS)
|
||||
DOCKER_RUN_TRAEFIK_NOTTY := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -i) $(DOCKER_RUN_OPTS)
|
||||
|
||||
PRE_TARGET ?= build-dev-image
|
||||
|
||||
PLATFORM_URL := $(if $(PLATFORM_URL),$(PLATFORM_URL),"https://pilot.traefik.io")
|
||||
|
||||
default: binary
|
||||
|
||||
## Build Dev Docker image
|
||||
@@ -53,7 +55,7 @@ dist:
|
||||
|
||||
## Build WebUI Docker image
|
||||
build-webui-image:
|
||||
docker build -t traefik-webui -f webui/Dockerfile webui
|
||||
docker build -t traefik-webui --build-arg ARG_PLATFORM_URL=$(PLATFORM_URL) -f webui/Dockerfile webui
|
||||
|
||||
## Generate WebUI
|
||||
generate-webui: build-webui-image
|
||||
|
44
README.md
44
README.md
@@ -4,11 +4,11 @@
|
||||
</p>
|
||||
|
||||
[](https://semaphoreci.com/containous/traefik)
|
||||
[](https://docs.traefik.io)
|
||||
[](https://goreportcard.com/report/containous/traefik)
|
||||
[](https://doc.traefik.io/traefik)
|
||||
[](https://goreportcard.com/report/traefik/traefik)
|
||||
[](https://microbadger.com/images/traefik)
|
||||
[](https://github.com/containous/traefik/blob/master/LICENSE.md)
|
||||
[](https://community.containo.us/)
|
||||
[](https://github.com/traefik/traefik/blob/master/LICENSE.md)
|
||||
[](https://community.traefik.io/)
|
||||
[](https://twitter.com/intent/follow?screen_name=traefik)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Pointing Traefik at your orchestrator should be the _only_ configuration step yo
|
||||
|
||||
---
|
||||
|
||||
:warning: Please be aware that the old configurations for Traefik v1.x are NOT compatible with the v2.x config as of now. If you're running v2, please ensure you are using a [v2 configuration](https://docs.traefik.io/).
|
||||
:warning: Please be aware that the old configurations for Traefik v1.x are NOT compatible with the v2.x config as of now. If you're running v2, please ensure you are using a [v2 configuration](https://doc.traefik.io/traefik/).
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -69,15 +69,15 @@ _(But if you'd rather configure some of your routes manually, Traefik supports t
|
||||
|
||||
## Supported Backends
|
||||
|
||||
- [Docker](https://docs.traefik.io/providers/docker/) / [Swarm mode](https://docs.traefik.io/providers/docker/)
|
||||
- [Kubernetes](https://docs.traefik.io/providers/kubernetes-crd/)
|
||||
- [Marathon](https://docs.traefik.io/providers/marathon/)
|
||||
- [Rancher](https://docs.traefik.io/providers/rancher/) (Metadata)
|
||||
- [File](https://docs.traefik.io/providers/file/)
|
||||
- [Docker](https://doc.traefik.io/traefik/providers/docker/) / [Swarm mode](https://doc.traefik.io/traefik/providers/docker/)
|
||||
- [Kubernetes](https://doc.traefik.io/traefik/providers/kubernetes-crd/)
|
||||
- [Marathon](https://doc.traefik.io/traefik/providers/marathon/)
|
||||
- [Rancher](https://doc.traefik.io/traefik/providers/rancher/) (Metadata)
|
||||
- [File](https://doc.traefik.io/traefik/providers/file/)
|
||||
|
||||
## Quickstart
|
||||
|
||||
To get your hands on Traefik, you can use the [5-Minute Quickstart](https://docs.traefik.io/getting-started/quick-start/) in our documentation (you will need Docker).
|
||||
To get your hands on Traefik, you can use the [5-Minute Quickstart](https://doc.traefik.io/traefik/getting-started/quick-start/) in our documentation (you will need Docker).
|
||||
|
||||
## Web UI
|
||||
|
||||
@@ -87,28 +87,28 @@ You can access the simple HTML frontend of Traefik.
|
||||
|
||||
## Documentation
|
||||
|
||||
You can find the complete documentation of Traefik v2 at [https://docs.traefik.io](https://docs.traefik.io).
|
||||
You can find the complete documentation of Traefik v2 at [https://doc.traefik.io/traefik/](https://doc.traefik.io/traefik/).
|
||||
|
||||
If you are using Traefik v1, you can find the complete documentation at [https://docs.traefik.io/v1.7/](https://docs.traefik.io/v1.7/).
|
||||
If you are using Traefik v1, you can find the complete documentation at [https://doc.traefik.io/traefik/v1.7/](https://doc.traefik.io/traefik/v1.7/).
|
||||
|
||||
A collection of contributions around Traefik can be found at [https://awesome.traefik.io](https://awesome.traefik.io).
|
||||
|
||||
## Support
|
||||
|
||||
To get community support, you can:
|
||||
- join the Traefik community forum: [](https://community.containo.us/)
|
||||
- join the Traefik community forum: [](https://community.traefik.io/)
|
||||
|
||||
If you need commercial support, please contact [Containo.us](https://containo.us) by mail: <mailto:support@containo.us>.
|
||||
If you need commercial support, please contact [Traefik.io](https://traefik.io) by mail: <mailto:support@traefik.io>.
|
||||
|
||||
## Download
|
||||
|
||||
- Grab the latest binary from the [releases](https://github.com/containous/traefik/releases) page and run it with the [sample configuration file](https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml):
|
||||
- Grab the latest binary from the [releases](https://github.com/traefik/traefik/releases) page and run it with the [sample configuration file](https://raw.githubusercontent.com/traefik/traefik/master/traefik.sample.toml):
|
||||
|
||||
```shell
|
||||
./traefik --configFile=traefik.toml
|
||||
```
|
||||
|
||||
- Or use the official tiny Docker image and run it with the [sample configuration file](https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml):
|
||||
- Or use the official tiny Docker image and run it with the [sample configuration file](https://raw.githubusercontent.com/traefik/traefik/master/traefik.sample.toml):
|
||||
|
||||
```shell
|
||||
docker run -d -p 8080:8080 -p 80:80 -v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik
|
||||
@@ -117,12 +117,12 @@ docker run -d -p 8080:8080 -p 80:80 -v $PWD/traefik.toml:/etc/traefik/traefik.to
|
||||
- Or get the sources:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/containous/traefik
|
||||
git clone https://github.com/traefik/traefik
|
||||
```
|
||||
|
||||
## Introductory Videos
|
||||
|
||||
You can find high level and deep dive videos on [videos.containo.us](https://videos.containo.us).
|
||||
You can find high level and deep dive videos on [videos.traefik.io](https://videos.traefik.io).
|
||||
|
||||
## Maintainers
|
||||
|
||||
@@ -152,9 +152,9 @@ We use [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## Credits
|
||||
|
||||
Kudos to [Peka](http://peka.byethost11.com/photoblog/) for his awesome work on the logo .
|
||||
Kudos to [Peka](http://peka.byethost11.com/photoblog/) for his awesome work on the gopher's logo!.
|
||||
|
||||
Traefik's logo is licensed under the Creative Commons 3.0 Attributions license.
|
||||
The gopher's logo of Traefik is licensed under the Creative Commons 3.0 Attributions license.
|
||||
|
||||
Traefik's logo was inspired by the gopher stickers made by [Takuya Ueda](https://twitter.com/tenntenn).
|
||||
The gopher's logo of Traefik was inspired by the gopher stickers made by [Takuya Ueda](https://twitter.com/tenntenn).
|
||||
The original Go gopher was designed by [Renee French](https://reneefrench.blogspot.com/).
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.14-alpine
|
||||
FROM golang:1.15-alpine
|
||||
|
||||
RUN apk --update upgrade \
|
||||
&& apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \
|
||||
@@ -19,7 +19,7 @@ RUN mkdir -p /usr/local/bin \
|
||||
&& chmod +x /usr/local/bin/go-bindata
|
||||
|
||||
# Download golangci-lint binary to bin folder in $GOPATH
|
||||
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.23.8
|
||||
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.32.2
|
||||
|
||||
# Download misspell binary to bin folder in $GOPATH
|
||||
RUN curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | bash -s -- -b $GOPATH/bin v0.3.4
|
||||
@@ -27,11 +27,11 @@ RUN curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install
|
||||
# Download goreleaser binary to bin folder in $GOPATH
|
||||
RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
|
||||
|
||||
WORKDIR /go/src/github.com/containous/traefik
|
||||
WORKDIR /go/src/github.com/traefik/traefik
|
||||
|
||||
# Download go modules
|
||||
COPY go.mod .
|
||||
COPY go.sum .
|
||||
RUN GO111MODULE=on GOPROXY=https://proxy.golang.org go mod download
|
||||
|
||||
COPY . /go/src/github.com/containous/traefik
|
||||
COPY . /go/src/github.com/traefik/traefik
|
||||
|
@@ -3,8 +3,8 @@ package cmd
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/containous/traefik/v2/pkg/config/static"
|
||||
"github.com/containous/traefik/v2/pkg/types"
|
||||
ptypes "github.com/traefik/paerser/types"
|
||||
"github.com/traefik/traefik/v2/pkg/config/static"
|
||||
)
|
||||
|
||||
// TraefikCmdConfiguration wraps the static configuration and extra parameters.
|
||||
@@ -23,7 +23,7 @@ func NewTraefikConfiguration() *TraefikCmdConfiguration {
|
||||
},
|
||||
EntryPoints: make(static.EntryPoints),
|
||||
Providers: &static.Providers{
|
||||
ProvidersThrottleDuration: types.Duration(2 * time.Second),
|
||||
ProvidersThrottleDuration: ptypes.Duration(2 * time.Second),
|
||||
},
|
||||
ServersTransport: &static.ServersTransport{
|
||||
MaxIdleConnsPerHost: 200,
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// ContextWithSignal creates a context canceled when SIGINT or SIGTERM are notified
|
||||
// ContextWithSignal creates a context canceled when SIGINT or SIGTERM are notified.
|
||||
func ContextWithSignal(ctx context.Context) context.Context {
|
||||
newCtx, cancel := context.WithCancel(ctx)
|
||||
signals := make(chan os.Signal)
|
||||
|
@@ -7,8 +7,8 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/containous/traefik/v2/pkg/cli"
|
||||
"github.com/containous/traefik/v2/pkg/config/static"
|
||||
"github.com/traefik/paerser/cli"
|
||||
"github.com/traefik/traefik/v2/pkg/config/static"
|
||||
)
|
||||
|
||||
// NewCmd builds a new HealthCheck command.
|
||||
@@ -45,7 +45,7 @@ func runCmd(traefikConfiguration *static.Configuration) func(_ []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Do try to do a healthcheck
|
||||
// Do try to do a healthcheck.
|
||||
func Do(staticConfiguration static.Configuration) (*http.Response, error) {
|
||||
if staticConfiguration.Ping == nil {
|
||||
return nil, errors.New("please enable `ping` to use health check")
|
||||
|
40
cmd/traefik/plugins.go
Normal file
40
cmd/traefik/plugins.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/traefik/traefik/v2/pkg/config/static"
|
||||
"github.com/traefik/traefik/v2/pkg/plugins"
|
||||
)
|
||||
|
||||
const outputDir = "./plugins-storage/"
|
||||
|
||||
func initPlugins(staticCfg *static.Configuration) (*plugins.Client, map[string]plugins.Descriptor, *plugins.DevPlugin, error) {
|
||||
if !isPilotEnabled(staticCfg) || !hasPlugins(staticCfg) {
|
||||
return nil, map[string]plugins.Descriptor{}, nil, nil
|
||||
}
|
||||
|
||||
opts := plugins.ClientOptions{
|
||||
Output: outputDir,
|
||||
Token: staticCfg.Pilot.Token,
|
||||
}
|
||||
|
||||
client, err := plugins.NewClient(opts)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
err = plugins.Setup(client, staticCfg.Experimental.Plugins, staticCfg.Experimental.DevPlugin)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
return client, staticCfg.Experimental.Plugins, staticCfg.Experimental.DevPlugin, nil
|
||||
}
|
||||
|
||||
func isPilotEnabled(staticCfg *static.Configuration) bool {
|
||||
return staticCfg.Pilot != nil && staticCfg.Pilot.Token != ""
|
||||
}
|
||||
|
||||
func hasPlugins(staticCfg *static.Configuration) bool {
|
||||
return staticCfg.Experimental != nil &&
|
||||
(len(staticCfg.Experimental.Plugins) > 0 || staticCfg.Experimental.DevPlugin != nil)
|
||||
}
|
@@ -11,30 +11,34 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containous/traefik/v2/autogen/genstatic"
|
||||
"github.com/containous/traefik/v2/cmd"
|
||||
"github.com/containous/traefik/v2/cmd/healthcheck"
|
||||
cmdVersion "github.com/containous/traefik/v2/cmd/version"
|
||||
"github.com/containous/traefik/v2/pkg/cli"
|
||||
"github.com/containous/traefik/v2/pkg/collector"
|
||||
"github.com/containous/traefik/v2/pkg/config/dynamic"
|
||||
"github.com/containous/traefik/v2/pkg/config/static"
|
||||
"github.com/containous/traefik/v2/pkg/log"
|
||||
"github.com/containous/traefik/v2/pkg/metrics"
|
||||
"github.com/containous/traefik/v2/pkg/middlewares/accesslog"
|
||||
"github.com/containous/traefik/v2/pkg/provider/acme"
|
||||
"github.com/containous/traefik/v2/pkg/provider/aggregator"
|
||||
"github.com/containous/traefik/v2/pkg/provider/traefik"
|
||||
"github.com/containous/traefik/v2/pkg/safe"
|
||||
"github.com/containous/traefik/v2/pkg/server"
|
||||
"github.com/containous/traefik/v2/pkg/server/middleware"
|
||||
"github.com/containous/traefik/v2/pkg/server/service"
|
||||
traefiktls "github.com/containous/traefik/v2/pkg/tls"
|
||||
"github.com/containous/traefik/v2/pkg/types"
|
||||
"github.com/containous/traefik/v2/pkg/version"
|
||||
"github.com/coreos/go-systemd/daemon"
|
||||
assetfs "github.com/elazarl/go-bindata-assetfs"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/traefik/paerser/cli"
|
||||
"github.com/traefik/traefik/v2/autogen/genstatic"
|
||||
"github.com/traefik/traefik/v2/cmd"
|
||||
"github.com/traefik/traefik/v2/cmd/healthcheck"
|
||||
cmdVersion "github.com/traefik/traefik/v2/cmd/version"
|
||||
tcli "github.com/traefik/traefik/v2/pkg/cli"
|
||||
"github.com/traefik/traefik/v2/pkg/collector"
|
||||
"github.com/traefik/traefik/v2/pkg/config/dynamic"
|
||||
"github.com/traefik/traefik/v2/pkg/config/runtime"
|
||||
"github.com/traefik/traefik/v2/pkg/config/static"
|
||||
"github.com/traefik/traefik/v2/pkg/log"
|
||||
"github.com/traefik/traefik/v2/pkg/metrics"
|
||||
"github.com/traefik/traefik/v2/pkg/middlewares/accesslog"
|
||||
"github.com/traefik/traefik/v2/pkg/pilot"
|
||||
"github.com/traefik/traefik/v2/pkg/plugins"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/acme"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/aggregator"
|
||||
"github.com/traefik/traefik/v2/pkg/provider/traefik"
|
||||
"github.com/traefik/traefik/v2/pkg/safe"
|
||||
"github.com/traefik/traefik/v2/pkg/server"
|
||||
"github.com/traefik/traefik/v2/pkg/server/middleware"
|
||||
"github.com/traefik/traefik/v2/pkg/server/service"
|
||||
traefiktls "github.com/traefik/traefik/v2/pkg/tls"
|
||||
"github.com/traefik/traefik/v2/pkg/types"
|
||||
"github.com/traefik/traefik/v2/pkg/version"
|
||||
"github.com/vulcand/oxy/roundrobin"
|
||||
)
|
||||
|
||||
@@ -42,7 +46,7 @@ func main() {
|
||||
// traefik config inits
|
||||
tConfig := cmd.NewTraefikConfiguration()
|
||||
|
||||
loaders := []cli.ResourceLoader{&cli.FileLoader{}, &cli.FlagLoader{}, &cli.EnvLoader{}}
|
||||
loaders := []cli.ResourceLoader{&tcli.FileLoader{}, &tcli.FlagLoader{}, &tcli.EnvLoader{}}
|
||||
|
||||
cmdTraefik := &cli.Command{
|
||||
Name: "traefik",
|
||||
@@ -117,6 +121,12 @@ func runCmd(staticConfiguration *static.Configuration) error {
|
||||
|
||||
ctx := cmd.ContextWithSignal(context.Background())
|
||||
|
||||
if staticConfiguration.Experimental != nil && staticConfiguration.Experimental.DevPlugin != nil {
|
||||
var cancel context.CancelFunc
|
||||
ctx, cancel = context.WithTimeout(ctx, 30*time.Minute)
|
||||
defer cancel()
|
||||
}
|
||||
|
||||
if staticConfiguration.Ping != nil {
|
||||
staticConfiguration.Ping.WithContext(ctx)
|
||||
}
|
||||
@@ -186,11 +196,36 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
|
||||
ctx := context.Background()
|
||||
routinesPool := safe.NewPool(ctx)
|
||||
|
||||
metricsRegistry := registerMetricClients(staticConfiguration.Metrics)
|
||||
metricRegistries := registerMetricClients(staticConfiguration.Metrics)
|
||||
|
||||
var aviator *pilot.Pilot
|
||||
if isPilotEnabled(staticConfiguration) {
|
||||
pilotRegistry := metrics.RegisterPilot()
|
||||
|
||||
aviator = pilot.New(staticConfiguration.Pilot.Token, pilotRegistry, routinesPool)
|
||||
routinesPool.GoCtx(func(ctx context.Context) {
|
||||
aviator.Tick(ctx)
|
||||
})
|
||||
|
||||
metricRegistries = append(metricRegistries, pilotRegistry)
|
||||
}
|
||||
|
||||
metricsRegistry := metrics.NewMultiRegistry(metricRegistries)
|
||||
accessLog := setupAccessLog(staticConfiguration.AccessLog)
|
||||
chainBuilder := middleware.NewChainBuilder(*staticConfiguration, metricsRegistry, accessLog)
|
||||
managerFactory := service.NewManagerFactory(*staticConfiguration, routinesPool, metricsRegistry)
|
||||
routerFactory := server.NewRouterFactory(*staticConfiguration, managerFactory, tlsManager, chainBuilder)
|
||||
|
||||
client, plgs, devPlugin, err := initPlugins(staticConfiguration)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pluginBuilder, err := plugins.NewBuilder(client, plgs, devPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
routerFactory := server.NewRouterFactory(*staticConfiguration, managerFactory, tlsManager, chainBuilder, pluginBuilder)
|
||||
|
||||
var defaultEntryPoints []string
|
||||
for name, cfg := range staticConfiguration.EntryPoints {
|
||||
@@ -224,7 +259,7 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
|
||||
metricsRegistry.LastConfigReloadSuccessGauge().Set(float64(time.Now().Unix()))
|
||||
})
|
||||
|
||||
watcher.AddListener(switchRouter(routerFactory, acmeProviders, serverEntryPointsTCP, serverEntryPointsUDP))
|
||||
watcher.AddListener(switchRouter(routerFactory, acmeProviders, serverEntryPointsTCP, serverEntryPointsUDP, aviator))
|
||||
|
||||
watcher.AddListener(func(conf dynamic.Configuration) {
|
||||
if metricsRegistry.IsEpEnabled() || metricsRegistry.IsSvcEnabled() {
|
||||
@@ -258,9 +293,12 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
|
||||
return server.NewServer(routinesPool, serverEntryPointsTCP, serverEntryPointsUDP, watcher, chainBuilder, accessLog), nil
|
||||
}
|
||||
|
||||
func switchRouter(routerFactory *server.RouterFactory, acmeProviders []*acme.Provider, serverEntryPointsTCP server.TCPEntryPoints, serverEntryPointsUDP server.UDPEntryPoints) func(conf dynamic.Configuration) {
|
||||
func switchRouter(routerFactory *server.RouterFactory, acmeProviders []*acme.Provider, serverEntryPointsTCP server.TCPEntryPoints, serverEntryPointsUDP server.UDPEntryPoints, aviator *pilot.Pilot) func(conf dynamic.Configuration) {
|
||||
return func(conf dynamic.Configuration) {
|
||||
routers, udpRouters := routerFactory.CreateRouters(conf)
|
||||
rtConf := runtime.NewConfig(conf)
|
||||
|
||||
routers, udpRouters := routerFactory.CreateRouters(rtConf)
|
||||
|
||||
for entryPointName, rt := range routers {
|
||||
for _, p := range acmeProviders {
|
||||
if p != nil && p.HTTPChallenge != nil && p.HTTPChallenge.EntryPoint == entryPointName {
|
||||
@@ -269,12 +307,17 @@ func switchRouter(routerFactory *server.RouterFactory, acmeProviders []*acme.Pro
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if aviator != nil {
|
||||
aviator.SetRuntimeConfiguration(rtConf)
|
||||
}
|
||||
|
||||
serverEntryPointsTCP.Switch(routers)
|
||||
serverEntryPointsUDP.Switch(udpRouters)
|
||||
}
|
||||
}
|
||||
|
||||
// initACMEProvider creates an acme provider from the ACME part of globalConfiguration
|
||||
// initACMEProvider creates an acme provider from the ACME part of globalConfiguration.
|
||||
func initACMEProvider(c *static.Configuration, providerAggregator *aggregator.ProviderAggregator, tlsManager *traefiktls.Manager) []*acme.Provider {
|
||||
challengeStore := acme.NewLocalChallengeStore()
|
||||
localStores := map[string]*acme.LocalStore{}
|
||||
@@ -312,9 +355,9 @@ func initACMEProvider(c *static.Configuration, providerAggregator *aggregator.Pr
|
||||
return resolvers
|
||||
}
|
||||
|
||||
func registerMetricClients(metricsConfig *types.Metrics) metrics.Registry {
|
||||
func registerMetricClients(metricsConfig *types.Metrics) []metrics.Registry {
|
||||
if metricsConfig == nil {
|
||||
return metrics.NewVoidRegistry()
|
||||
return nil
|
||||
}
|
||||
|
||||
var registries []metrics.Registry
|
||||
@@ -349,7 +392,7 @@ func registerMetricClients(metricsConfig *types.Metrics) metrics.Registry {
|
||||
metricsConfig.InfluxDB.Address, metricsConfig.InfluxDB.PushInterval)
|
||||
}
|
||||
|
||||
return metrics.NewMultiRegistry(registries)
|
||||
return registries
|
||||
}
|
||||
|
||||
func setupAccessLog(conf *types.AccessLog) *accesslog.Handler {
|
||||
@@ -403,7 +446,7 @@ func configureLogging(staticConfiguration *static.Configuration) {
|
||||
if len(logFile) > 0 {
|
||||
dir := filepath.Dir(logFile)
|
||||
|
||||
if err := os.MkdirAll(dir, 0755); err != nil {
|
||||
if err := os.MkdirAll(dir, 0o755); err != nil {
|
||||
log.WithoutContext().Errorf("Failed to create log path %s: %s", dir, err)
|
||||
}
|
||||
|
||||
@@ -435,13 +478,13 @@ func stats(staticConfiguration *static.Configuration) {
|
||||
logger.Info(`Stats collection is enabled.`)
|
||||
logger.Info(`Many thanks for contributing to Traefik's improvement by allowing us to receive anonymous information from your configuration.`)
|
||||
logger.Info(`Help us improve Traefik by leaving this feature on :)`)
|
||||
logger.Info(`More details on: https://docs.traefik.io/contributing/data-collection/`)
|
||||
logger.Info(`More details on: https://doc.traefik.io/traefik/contributing/data-collection/`)
|
||||
collect(staticConfiguration)
|
||||
} else {
|
||||
logger.Info(`
|
||||
Stats collection is disabled.
|
||||
Help us improve Traefik by turning this feature on :)
|
||||
More details on: https://docs.traefik.io/contributing/data-collection/
|
||||
More details on: https://doc.traefik.io/traefik/contributing/data-collection/
|
||||
`)
|
||||
}
|
||||
}
|
||||
|
@@ -7,8 +7,8 @@ import (
|
||||
"runtime"
|
||||
"text/template"
|
||||
|
||||
"github.com/containous/traefik/v2/pkg/cli"
|
||||
"github.com/containous/traefik/v2/pkg/version"
|
||||
"github.com/traefik/paerser/cli"
|
||||
"github.com/traefik/traefik/v2/pkg/version"
|
||||
)
|
||||
|
||||
var versionTemplate = `Version: {{.Version}}
|
||||
@@ -17,7 +17,7 @@ Go version: {{.GoVersion}}
|
||||
Built: {{.BuildTime}}
|
||||
OS/Arch: {{.Os}}/{{.Arch}}`
|
||||
|
||||
// NewCmd builds a new Version command
|
||||
// NewCmd builds a new Version command.
|
||||
func NewCmd() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
@@ -33,7 +33,7 @@ func NewCmd() *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// GetPrint write Printable version
|
||||
// GetPrint write Printable version.
|
||||
func GetPrint(wr io.Writer) error {
|
||||
tmpl, err := template.New("").Parse(versionTemplate)
|
||||
if err != nil {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Traefik
|
||||
Documentation=https://docs.traefik.io
|
||||
Documentation=https://doc.traefik.io/traefik/
|
||||
#After=network-online.target
|
||||
#AssertFileIsExecutable=/usr/bin/traefik
|
||||
#AssertPathExists=/etc/traefik/traefik.toml
|
||||
|
@@ -1 +0,0 @@
|
||||
docs.traefik.io
|
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB |
BIN
docs/content/assets/img/traefikproxy-icon-color.png
Normal file
BIN
docs/content/assets/img/traefikproxy-icon-color.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 20 KiB |
70
docs/content/assets/styles/content.css
Normal file
70
docs/content/assets/styles/content.css
Normal file
@@ -0,0 +1,70 @@
|
||||
.md-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.md-content h1 {
|
||||
color: var(--dark) !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.md-content a {
|
||||
color: var(--blue) !important;
|
||||
}
|
||||
|
||||
.md-content a:hover {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.md-typeset p code,
|
||||
.md-typeset .codehilite,
|
||||
.md-typeset .highlight {
|
||||
background-color: var(--light-blue) !important;
|
||||
}
|
||||
|
||||
.md-typeset table:not([class]) th {
|
||||
background: var(--dark) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* Front page image size */
|
||||
img[src$='#small'] {
|
||||
width: 150px;
|
||||
}
|
||||
img[src$='#medium'] {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
/* Center table and objects */
|
||||
.center,
|
||||
img,
|
||||
.md-typeset__table {
|
||||
display: block !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.md-typeset table:not([class]) tr td:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
.md-typeset table:not([class]) th:not([align]),
|
||||
.md-typeset table:not([class]) td:not([align]) {
|
||||
text-align: center;
|
||||
}
|
||||
article p:not([class]),
|
||||
article ul:not([class]),
|
||||
article ol:not([class]) {
|
||||
padding-left: 0.8em !important;
|
||||
}
|
||||
|
||||
/* Fix for Chrome */
|
||||
.md-typeset__table td code {
|
||||
word-break: unset;
|
||||
}
|
||||
|
||||
.md-typeset__table tr :nth-child(1) {
|
||||
word-wrap: break-word;
|
||||
max-width: 30em;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
@@ -1,63 +0,0 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Serif');
|
||||
|
||||
.md-logo img {
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
/* Fix for Chrome */
|
||||
.md-typeset__table td code {
|
||||
word-break: unset;
|
||||
}
|
||||
|
||||
.md-typeset__table tr :nth-child(1) {
|
||||
word-wrap: break-word;
|
||||
max-width: 30em;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: bold !important;
|
||||
color: rgba(0,0,0,.9) !important;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.md-typeset h5 {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
font-style: italic;
|
||||
color: #8D909F;
|
||||
}
|
||||
|
||||
p.subtitle {
|
||||
color: rgba(0,0,0,.54);
|
||||
padding-top: 0;
|
||||
margin-top: -2em;
|
||||
font-weight: bold;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item {
|
||||
list-style-type: none !important;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item input[type="checkbox"] {
|
||||
margin: 0 4px 0.25em -20px;
|
||||
vertical-align: middle;
|
||||
}
|
10
docs/content/assets/styles/footer.css
Normal file
10
docs/content/assets/styles/footer.css
Normal file
@@ -0,0 +1,10 @@
|
||||
.md-footer-meta {
|
||||
background-color: var(--dark);
|
||||
}
|
||||
|
||||
.md-footer-privacy-policy {
|
||||
margin: 0 .6rem;
|
||||
padding: .4rem 0;
|
||||
color: hsla(0,0%,100%,.3);
|
||||
font-size: .64rem;
|
||||
}
|
484
docs/content/assets/styles/header.css
Normal file
484
docs/content/assets/styles/header.css
Normal file
@@ -0,0 +1,484 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Rubik:300i,400,400i,500,500i,700&display=swap');
|
||||
|
||||
.wrapper-1200 {
|
||||
width: 100%;
|
||||
max-width: 61rem;
|
||||
margin: 0 auto;
|
||||
padding: 0 .6rem;
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.wrapper-1200 {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-type-1 {
|
||||
outline: none;
|
||||
border: none;
|
||||
background-color: #1e54d5;
|
||||
line-height: 1em;
|
||||
border-radius: 8px;
|
||||
padding: 12px 15px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 1.25rem;
|
||||
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.28) 1%, #1e54d5 99%);
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: white;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.button--secondary {
|
||||
outline: none;
|
||||
border: 2px solid #1e54d5 !important;
|
||||
background: transparent;
|
||||
line-height: 1em;
|
||||
border-radius: 8px;
|
||||
padding: 9px 13px;
|
||||
letter-spacing: 0;
|
||||
font-size: 1.3rem;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: #1e54d5;
|
||||
transition: all 0.2s;
|
||||
display: inline-block;
|
||||
}
|
||||
.button--secondary:hover {
|
||||
color: white !important;
|
||||
background: #1e54d5;
|
||||
}
|
||||
.button--secondary:focus {
|
||||
color: white !important;
|
||||
background: #1e54d5;
|
||||
}
|
||||
|
||||
.site-header-and-placeholder-wrapper {
|
||||
position: relative;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transition: height 0.1s;
|
||||
z-index: 100;
|
||||
background: white;
|
||||
box-shadow: 0 0 7px 0 #00000021;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 10px;
|
||||
font-family: 'Rubik', -apple-system, 'BlinkMacSystemFont', 'Segoe UI',
|
||||
'Helvetica Neue', sans-serif;
|
||||
color: #06102a;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.site-header.scrolled {
|
||||
box-shadow: 0 0 5px 0 #00000028;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
height: 52px;
|
||||
}
|
||||
.site-header.scrolled .site-header__title a {
|
||||
font-size: 2.2em;
|
||||
}
|
||||
|
||||
.header-placeholder {
|
||||
background: none;
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
position: absolute;
|
||||
}
|
||||
.header-placeholder.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-header .wrapper-1200 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.site-header .wrapper-1200 .left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.site-header__logo {
|
||||
max-width: 145px;
|
||||
}
|
||||
|
||||
.site-header__title a {
|
||||
color: #06102a;
|
||||
font-size: 2.2em;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
.site-header__nav .menu-item-wrapper {
|
||||
display: inline-block;
|
||||
padding-left: 30px;
|
||||
}
|
||||
.site-header__nav .menu-item {
|
||||
color: #06102a;
|
||||
transition: all 0.05s;
|
||||
font-size: 1.45em;
|
||||
line-height: 1em;
|
||||
font-weight: 500;
|
||||
}
|
||||
.site-header__nav .menu-item:hover {
|
||||
color: #8a959e;
|
||||
}
|
||||
.site-header__nav .menu-item--with-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.site-header__nav .menu-item--with-icon .title {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.site-header__nav .menu-item--with-icon .icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transition: all 0.1s;
|
||||
}
|
||||
.site-header__nav .menu-item--with-icon .icon svg {
|
||||
stroke-width: 2.5 !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.site-header__nav .menu-item-wrapper--dropdown {
|
||||
position: relative;
|
||||
}
|
||||
.site-header__nav .menu-item-wrapper--dropdown:hover .nav-dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.site-header__nav .nav-dropdown-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-dropdown-menu {
|
||||
position: absolute;
|
||||
z-index: 500;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.nav-dropdown-menu-wrapper {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 12px 40px 0 rgba(1, 10, 32, 0.24);
|
||||
background: white;
|
||||
margin: 8px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Products, Solutions dropdown menu */
|
||||
.nav-dropdown-menu--products,
|
||||
.nav-dropdown-menu--solutions {
|
||||
width: 500px;
|
||||
}
|
||||
.nav-dropdown-menu--products .nav-dropdown-menu-wrapper,
|
||||
.nav-dropdown-menu--solutions .nav-dropdown-menu-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
.nav-dropdown-menu--products .nav-dropdown-menu-wrapper {
|
||||
height: 430px;
|
||||
}
|
||||
|
||||
.nav-dropdown-menu--products .dm-header,
|
||||
.nav-dropdown-menu--solutions .dm-header {
|
||||
font-size: 1.1em;
|
||||
font-weight: 500;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: 3.67px;
|
||||
color: #505769;
|
||||
margin-bottom: 20px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item,
|
||||
.nav-dropdown-menu--solutions .dm-item {
|
||||
border: none;
|
||||
margin: 0 0 24px;
|
||||
color: #06102a;
|
||||
transition: all 0.1s;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item:last-child,
|
||||
.nav-dropdown-menu--solutions .dm-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item .dmi-image {
|
||||
width: 104px;
|
||||
height: 72px;
|
||||
position: absolute;
|
||||
/*background: #f4f4f4;*/
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
border-radius: 4px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-image {
|
||||
width: 65px;
|
||||
padding: 10px;
|
||||
background: white;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-image img {
|
||||
width: 100%;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item .dmi-details,
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-details {
|
||||
padding: 6px 0 0 127px;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
display: block;
|
||||
color: #06102a;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item .dmi-details:hover,
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-details:hover {
|
||||
color: #1e54d5;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item .dmi-title,
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-title {
|
||||
font-size: 1.6em;
|
||||
font-weight: 500;
|
||||
margin: 0 0 2px;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item .dmi-description,
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-description {
|
||||
font-size: 1.4em;
|
||||
opacity: 0.7;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
.nav-dropdown-menu--products .dm-item--traefikee .dmi-image img,
|
||||
.nav-dropdown-menu--solutions .dm-item--traefikee .dmi-image img {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.nav-dropdown-menu--solutions .dm-item .dmi-details {
|
||||
padding: 5px 0 0 80px;
|
||||
}
|
||||
.nav-dropdown-menu--solutions .dm-item:last-child {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Dropdown menu: Learn and Company */
|
||||
.nav-dropdown-menu--learn {
|
||||
width: 250px;
|
||||
}
|
||||
.nav-dropdown-menu--company {
|
||||
width: 500px;
|
||||
}
|
||||
.nav-dropdown-menu--company .nav-dropdown-menu-wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: 50% 50%;
|
||||
}
|
||||
.nav-dropdown-menu--learn .dm-left,
|
||||
.nav-dropdown-menu--company .dm-left {
|
||||
padding: 25px;
|
||||
}
|
||||
.nav-dropdown-menu--learn .dm-header,
|
||||
.nav-dropdown-menu--company .dm-header {
|
||||
font-size: 1.1em;
|
||||
font-weight: 500;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: 3.67px;
|
||||
color: #505769;
|
||||
margin-bottom: 20px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.nav-dropdown-menu--learn .dm-item,
|
||||
.nav-dropdown-menu--company .dm-item {
|
||||
display: block;
|
||||
font-size: 1.6em;
|
||||
font-weight: 500;
|
||||
color: #06102a;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.nav-dropdown-menu--learn .dm-item:last-child,
|
||||
.nav-dropdown-menu--company .dm-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.nav-dropdown-menu--learn .dm-item:hover,
|
||||
.nav-dropdown-menu--company .dm-item:hover {
|
||||
color: #1e54d5;
|
||||
}
|
||||
|
||||
.dm-preview {
|
||||
background: #edeff4;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.dm-preview__feature-image {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dm-preview__feature-image img {
|
||||
width: 100%;
|
||||
height: 145px;
|
||||
background: #ffffff no-repeat 50%;
|
||||
object-fit: cover;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.dm-preview__content {
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dm-preview__tag {
|
||||
display: block;
|
||||
font-size: 1.2em;
|
||||
color: #db7d11;
|
||||
letter-spacing: 2.5px;
|
||||
font-weight: 500;
|
||||
margin: 0 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.dm-preview__title {
|
||||
font-size: 1.6em;
|
||||
font-weight: 500;
|
||||
line-height: 1.6em;
|
||||
margin: 0;
|
||||
color: #06102a;
|
||||
display: block;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.dm-preview .arrow-link {
|
||||
justify-content: flex-start;
|
||||
font-size: 1.4em;
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* Dropdown menu: Company */
|
||||
.nav-dropdown-menu--company {
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
.nav-dropdown-menu--company .dm-right {
|
||||
background: #06102a;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
color: white;
|
||||
padding: 20px;
|
||||
}
|
||||
.nav-dropdown-menu--company .dm-right p {
|
||||
font-size: 1.6em;
|
||||
font-weight: 500;
|
||||
margin: 0 0 15px;
|
||||
text-align: center;
|
||||
}
|
||||
.nav-dropdown-menu--company .dm-right a {
|
||||
text-transform: uppercase;
|
||||
line-height: 1.5em;
|
||||
padding: 9px 12px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Demo */
|
||||
.site-header__demo-button .button--secondary {
|
||||
font-size: 1.4em;
|
||||
padding: 8px 12px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Drawer */
|
||||
.site-header .drawer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1219px) {
|
||||
.site-header__nav .menu-item-wrapper {
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 980px) {
|
||||
.site-header__nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-header .drawer {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-header .right .site-header__demo-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html [data-md-color-primary=indigo] .md-nav--primary .md-nav__title--site {
|
||||
background-color: #06102a;
|
||||
}
|
||||
|
||||
html .md-nav--primary .md-nav__title {
|
||||
padding: 64px .8rem .2rem;
|
||||
}
|
||||
|
||||
.md-search__inner {
|
||||
top: 64px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.md-header .md-search {
|
||||
margin-right: 12.1rem;
|
||||
}
|
||||
|
||||
.site-header__main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dmi-image.proxy {
|
||||
background-color: #24a1c1;
|
||||
}
|
||||
|
||||
.dmi-image.mesh {
|
||||
background-color: #9d0fb0;
|
||||
}
|
||||
|
||||
.dmi-image.enterprise {
|
||||
background-color: #0060e0;
|
||||
}
|
||||
|
||||
.dmi-image.pilot {
|
||||
background-color: #db7d11;
|
||||
}
|
105
docs/content/assets/styles/menu.css
Normal file
105
docs/content/assets/styles/menu.css
Normal file
@@ -0,0 +1,105 @@
|
||||
.md-nav__link {
|
||||
margin-left: -0.4rem;
|
||||
padding: 0 0.4rem;
|
||||
line-height: 32px;
|
||||
color: var(--dark) !important;
|
||||
}
|
||||
|
||||
.md-nav__link::after {
|
||||
font-size: 16px;
|
||||
vertical-align: -.25em;
|
||||
}
|
||||
|
||||
.md-nav__toggle:checked + .md-nav__link,
|
||||
.md-nav__link--active,
|
||||
.md-nav__link:hover {
|
||||
border-radius: 8px;
|
||||
background-color: var(--light-blue) !important;
|
||||
color: var(--dark) !important;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.md-nav__link--active {
|
||||
color: var(--blue) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.md-sidebar--primary {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-nav__title {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 0.4rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.md-sidebar__scrollwrap {
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-sidebar__scrollwrap {
|
||||
border-radius: 8px;
|
||||
background-color: var(--light-blue) !important;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-nav__title {
|
||||
padding: 0.8rem 0.4rem 0.8rem;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-nav__list {
|
||||
padding: 0 0.4rem 0.8rem 1.2rem;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-sidebar__scrollwrap .md-nav__link {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary
|
||||
.md-sidebar__scrollwrap
|
||||
.md-nav__link[data-md-state='blur'],
|
||||
.md-sidebar--secondary .md-sidebar__scrollwrap .md-nav__link:hover {
|
||||
color: var(--blue) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-nav__item {
|
||||
padding: 0 0 0 0.4rem;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .md-nav__link {
|
||||
margin-top: 0.225em;
|
||||
padding: 0.1rem 0.2rem;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary li {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
.md-sidebar--secondary .repo_url {
|
||||
padding: 10px 0 14px 0;
|
||||
}
|
||||
|
||||
|
||||
.md-search__inner {
|
||||
width: inherit;
|
||||
float: inherit;
|
||||
}
|
||||
|
||||
.md-search__input {
|
||||
margin-bottom: 10px;
|
||||
border-radius: 4px;
|
||||
background-color: inherit;
|
||||
border: 1px solid rgba(0,0,0,.07);
|
||||
}
|
||||
|
||||
.md-search__input::placeholder {
|
||||
color: rgba(0,0,0,.07);
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 60em) {
|
||||
[data-md-toggle=search]:checked~.md-header .md-search__inner {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
24
docs/content/assets/styles/product-switcher.css
Normal file
24
docs/content/assets/styles/product-switcher.css
Normal file
@@ -0,0 +1,24 @@
|
||||
.product-switcher {
|
||||
font-size: 10px;
|
||||
font-family: 'Rubik', -apple-system, 'BlinkMacSystemFont', 'Segoe UI',
|
||||
'Helvetica Neue', sans-serif;
|
||||
color: #06102a;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.product-switcher .menu-item-wrapper {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.product-switcher img {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.product-switcher img.gopher {
|
||||
margin: 0 2px 0 16px;
|
||||
}
|
||||
|
||||
.product-switcher .nav-dropdown-menu--products .nav-dropdown-menu-wrapper {
|
||||
width: auto;
|
||||
height: 335px;
|
||||
}
|
10
docs/content/assets/styles/root.css
Normal file
10
docs/content/assets/styles/root.css
Normal file
@@ -0,0 +1,10 @@
|
||||
:root {
|
||||
--dark: #06102a;
|
||||
--blue: #04B5D1;
|
||||
--light-blue: #E4F7FA;
|
||||
|
||||
--input-bg-color: white;
|
||||
--input-color: black;
|
||||
--input-placeholder-color: #bbb;
|
||||
--input-border-color: #dcdcdc;
|
||||
}
|
@@ -5,6 +5,6 @@ Spread the Love & Tell Us about It
|
||||
|
||||
There are many ways to contribute to the project, and there is one that always spark joy: when we see/read about users talking about how Traefik helps them solve their problems.
|
||||
|
||||
If you're talking about Traefik, [let us know](https://blog.containo.us/spread-the-love-ba5a40aa72e7) and we'll promote your enthusiasm!
|
||||
If you're talking about Traefik, [let us know](https://blog.traefik.io/spread-the-love-ba5a40aa72e7) and we'll promote your enthusiasm!
|
||||
|
||||
Also, if you've written about Traefik or shared useful information you'd like to promote, feel free to add links in the [dedicated wiki page on Github](https://github.com/containous/traefik/wiki/Awesome-Traefik).
|
||||
Also, if you've written about Traefik or shared useful information you'd like to promote, feel free to add links in the [dedicated wiki page on Github](https://github.com/traefik/traefik/wiki/Awesome-Traefik).
|
||||
|
@@ -35,7 +35,7 @@ Step 1/10 : FROM golang:1.14-alpine
|
||||
[...]
|
||||
Successfully built 5c3c1a911277
|
||||
Successfully tagged traefik-dev:4475--feature-documentation
|
||||
docker run -e "TEST_CONTAINER=1" -v "/var/run/docker.sock:/var/run/docker.sock" -it -e OS_ARCH_ARG -e OS_PLATFORM_ARG -e TESTFLAGS -e VERBOSE -e VERSION -e CODENAME -e TESTDIRS -e CI -e CONTAINER=DOCKER -v "/home/ldez/sources/go/src/github.com/containous/traefik/"dist":/go/src/github.com/containous/traefik/"dist"" "traefik-dev:4475--feature-documentation" ./script/make.sh generate binary
|
||||
docker run -e "TEST_CONTAINER=1" -v "/var/run/docker.sock:/var/run/docker.sock" -it -e OS_ARCH_ARG -e OS_PLATFORM_ARG -e TESTFLAGS -e VERBOSE -e VERSION -e CODENAME -e TESTDIRS -e CI -e CONTAINER=DOCKER -v "/home/ldez/sources/go/src/github.com/traefik/traefik/"dist":/go/src/github.com/traefik/traefik/"dist"" "traefik-dev:4475--feature-documentation" ./script/make.sh generate binary
|
||||
---> Making bundle: generate (in .)
|
||||
removed 'autogen/genstatic/gen.go'
|
||||
|
||||
@@ -68,7 +68,7 @@ Requirements:
|
||||
|
||||
!!! tip "Source Directory"
|
||||
|
||||
It is recommended that you clone Traefik into the `~/go/src/github.com/containous/traefik` directory.
|
||||
It is recommended that you clone Traefik into the `~/go/src/github.com/traefik/traefik` directory.
|
||||
This is the official golang workspace hierarchy that will allow dependencies to be properly resolved.
|
||||
|
||||
!!! note "Environment"
|
||||
@@ -104,7 +104,7 @@ Once you've set up your go environment and cloned the source repository, you can
|
||||
Beforehand, you need to get [go-bindata](https://github.com/containous/go-bindata) (the first time) in order to be able to use the `go generate` command (which is part of the build process).
|
||||
|
||||
```bash
|
||||
cd ~/go/src/github.com/containous/traefik
|
||||
cd ~/go/src/github.com/traefik/traefik
|
||||
|
||||
# Get go-bindata. (Important: the ellipses are required.)
|
||||
GO111MODULE=off go get github.com/containous/go-bindata/...
|
||||
@@ -124,7 +124,7 @@ go generate
|
||||
go build ./cmd/traefik
|
||||
```
|
||||
|
||||
You will find the Traefik executable (`traefik`) in the `~/go/src/github.com/containous/traefik` directory.
|
||||
You will find the Traefik executable (`traefik`) in the `~/go/src/github.com/traefik/traefik` directory.
|
||||
|
||||
## Testing
|
||||
|
||||
@@ -138,13 +138,13 @@ Run all tests (unit and integration) using the `test` target.
|
||||
$ make test-unit
|
||||
docker build -t "traefik-dev:your-feature-branch" -f build.Dockerfile .
|
||||
# […]
|
||||
docker run --rm -it -e OS_ARCH_ARG -e OS_PLATFORM_ARG -e TESTFLAGS -v "/home/user/go/src/github/containous/traefik/dist:/go/src/github.com/containous/traefik/dist" "traefik-dev:your-feature-branch" ./script/make.sh generate test-unit
|
||||
docker run --rm -it -e OS_ARCH_ARG -e OS_PLATFORM_ARG -e TESTFLAGS -v "/home/user/go/src/github/traefik/traefik/dist:/go/src/github.com/traefik/traefik/dist" "traefik-dev:your-feature-branch" ./script/make.sh generate test-unit
|
||||
---> Making bundle: generate (in .)
|
||||
removed 'gen.go'
|
||||
|
||||
---> Making bundle: test-unit (in .)
|
||||
+ go test -cover -coverprofile=cover.out .
|
||||
ok github.com/containous/traefik 0.005s coverage: 4.1% of statements
|
||||
ok github.com/traefik/traefik 0.005s coverage: 4.1% of statements
|
||||
|
||||
Test success
|
||||
```
|
||||
@@ -172,7 +172,7 @@ More: https://labix.org/gocheck
|
||||
Unit tests can be run from the cloned directory using `$ go test ./...` which should return `ok`, similar to:
|
||||
|
||||
```test
|
||||
ok _/home/user/go/src/github/containous/traefik 0.004s
|
||||
ok _/home/user/go/src/github/traefik/traefik 0.004s
|
||||
```
|
||||
|
||||
Integration tests must be run from the `integration/` directory and require the `-integration` switch: `$ cd integration && go test -integration ./...`.
|
||||
|
@@ -29,7 +29,7 @@ For this very reason, the sendAnonymousUsage option is mandatory: we want you to
|
||||
|
||||
## Collected Data
|
||||
|
||||
This feature comes from the public proposal [here](https://github.com/containous/traefik/issues/2369).
|
||||
This feature comes from the public proposal [here](https://github.com/traefik/traefik/issues/2369).
|
||||
|
||||
In order to help us learn more about how Traefik is being used and improve it, we collect anonymous usage statistics from running instances.
|
||||
Those data help us prioritize our developments and focus on what's important for our users (for example, which provider is popular, and which is not).
|
||||
@@ -85,11 +85,11 @@ Once a day (the first call begins 10 minutes after the start of Traefik), we col
|
||||
ca = "xxxx"
|
||||
cert = "xxxx"
|
||||
key = "xxxx"
|
||||
insecureSkipVerify = false
|
||||
insecureSkipVerify = true
|
||||
```
|
||||
|
||||
## The Code for Data Collection
|
||||
|
||||
If you want to dig into more details, here is the source code of the collecting system: [collector.go](https://github.com/containous/traefik/blob/master/pkg/collector/collector.go)
|
||||
If you want to dig into more details, here is the source code of the collecting system: [collector.go](https://github.com/traefik/traefik/blob/master/pkg/collector/collector.go)
|
||||
|
||||
By default we anonymize all configuration fields, except fields tagged with `export=true`.
|
||||
|
@@ -10,7 +10,7 @@ Let's see how.
|
||||
|
||||
### General
|
||||
|
||||
This [documentation](https://docs.traefik.io/) is built with [mkdocs](https://mkdocs.org/).
|
||||
This [documentation](https://doc.traefik.io/traefik/) is built with [mkdocs](https://mkdocs.org/).
|
||||
|
||||
### Method 1: `Docker` and `make`
|
||||
|
||||
@@ -20,7 +20,7 @@ You can build the documentation and test it locally (with live reloading), using
|
||||
$ make docs
|
||||
docker build -t traefik-docs -f docs.Dockerfile .
|
||||
# […]
|
||||
docker run --rm -v /home/user/go/github/containous/traefik:/mkdocs -p 8000:8000 traefik-docs mkdocs serve
|
||||
docker run --rm -v /home/user/go/github/traefik/traefik:/mkdocs -p 8000:8000 traefik-docs mkdocs serve
|
||||
# […]
|
||||
[I 170828 20:47:48 server:283] Serving on http://0.0.0.0:8000
|
||||
[I 170828 20:47:48 handlers:60] Start watching changes
|
||||
@@ -75,7 +75,7 @@ To check that the documentation meets standard expectations (no dead links, html
|
||||
$ make docs-verify
|
||||
docker build -t traefik-docs-verify ./script/docs-verify-docker-image ## Build Validator image
|
||||
...
|
||||
docker run --rm -v /home/travis/build/containous/traefik:/app traefik-docs-verify ## Check for dead links and w3c compliance
|
||||
docker run --rm -v /home/travis/build/traefik/traefik:/app traefik-docs-verify ## Check for dead links and w3c compliance
|
||||
=== Checking HTML content...
|
||||
Running ["HtmlCheck", "ImageCheck", "ScriptCheck", "LinkCheck"] on /app/site/basics/index.html on *.html...
|
||||
```
|
||||
|
@@ -11,74 +11,20 @@
|
||||
* Ludovic Fernandez [@ldez](https://github.com/ldez)
|
||||
* Julien Salleyron [@juliens](https://github.com/juliens)
|
||||
* Nicolas Mengin [@nmengin](https://github.com/nmengin)
|
||||
* Marco Jantke [@marco-jantke](https://github.com/marco-jantke)
|
||||
* Marco Jantke [@mjantke](https://github.com/mjeri)
|
||||
* Michaël Matur [@mmatur](https://github.com/mmatur)
|
||||
* Gérald Croës [@geraldcroes](https://github.com/geraldcroes)
|
||||
* Jean-Baptiste Doumenjou [@jbdoumenjou](https://github.com/jbdoumenjou)
|
||||
* Mathieu Lonjaret [@mpl](https://github.com/mpl)
|
||||
* Romain Tribotté [@rtribotte](https://github.com/rtribotte)
|
||||
|
||||
## Contributions Daily Meeting
|
||||
## Issue Triage
|
||||
|
||||
* 3 Maintainers should attend to a Contributions Daily Meeting where we sort and label new issues ([is:issue label:status/0-needs-triage](https://github.com/containous/traefik/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Astatus%2F0-needs-triage+)), and review every Pull Requests
|
||||
* Every pull request should be checked during the Contributions Daily Meeting
|
||||
* Even if it’s already assigned
|
||||
* Even PR labelled with `contributor/waiting-for-corrections` or `contributor/waiting-for-feedback`
|
||||
* Issues labeled with `priority/P0` and `priority/P1` should be assigned.
|
||||
* Modifying an issue or a pull request (labels, assignees, milestone) is only possible:
|
||||
* During the Contributions Daily Meeting
|
||||
* By an assigned maintainer
|
||||
* In case of emergency, if a change proposal is approved by 2 other maintainers (on Slack, Discord, Discourse, etc)
|
||||
Issues and PRs are triaged daily and the process for triaging may be found under [triaging issues](https://github.com/traefik/contributors-guide/blob/master/issue_triage.md) in our [contributors guide repository](https://github.com/traefik/contributors-guide).
|
||||
|
||||
## PR review process:
|
||||
|
||||
* The status `needs-design-review` is only used in complex/heavy/tricky PRs.
|
||||
* From `1` to `2`: 1 comment that says “design LGTM” (by a senior maintainer).
|
||||
* From `2` to `3`: 3 LGTM approvals by any maintainer.
|
||||
* If needed, a specific maintainer familiar with a particular domain can be requested for the review.
|
||||
* If a PR has been implemented in pair programming, one peer's LGTM goes into the review for free
|
||||
* Amending someone else's pull request is authorized only in emergency, if a rebase is needed, or if the initial contributor is silent
|
||||
|
||||
We use [PRM](https://github.com/ldez/prm) to manage locally pull requests.
|
||||
|
||||
## Bots
|
||||
|
||||
### [Myrmica Lobicornis](https://github.com/containous/lobicornis/)
|
||||
|
||||
Update and Merge Pull Request.
|
||||
|
||||
The maintainer giving the final LGTM must add the `status/3-needs-merge` label to trigger the merge bot.
|
||||
|
||||
By default, a squash-rebase merge will be carried out.
|
||||
To preserve commits, add `bot/merge-method-rebase` before `status/3-needs-merge`.
|
||||
|
||||
The status `status/4-merge-in-progress` is only used by the bot.
|
||||
|
||||
If the bot is not able to perform the merge, the label `bot/need-human-merge` is added.
|
||||
In such a situation, solve the conflicts/CI/... and then remove the label `bot/need-human-merge`.
|
||||
|
||||
To prevent the bot from automatically merging a PR, add the label `bot/no-merge`.
|
||||
|
||||
The label `bot/light-review` decreases the number of required LGTM from 3 to 1.
|
||||
|
||||
This label is used when:
|
||||
|
||||
* Updating the vendors from previously reviewed PRs
|
||||
* Merging branches into the master
|
||||
* Preparing the release
|
||||
|
||||
### [Myrmica Bibikoffi](https://github.com/containous/bibikoffi/)
|
||||
|
||||
* closes stale issues [cron]
|
||||
* use some criterion as number of days between creation, last update, labels, ...
|
||||
|
||||
### [Myrmica Aloba](https://github.com/containous/aloba)
|
||||
|
||||
Manage GitHub labels.
|
||||
|
||||
* Add labels on new PR [GitHub WebHook]
|
||||
* Add milestone to a new PR based on a branch version (1.4, 1.3, ...) [GitHub WebHook]
|
||||
* Add and remove `contributor/waiting-for-corrections` label when a review request changes [GitHub WebHook]
|
||||
* Weekly report of PR status on Slack (CaptainPR) [cron]
|
||||
The process for reviewing PRs may be found under [review guidelines](https://github.com/traefik/contributors-guide/blob/master/review_guidelines.md) in our contributors guide repository.
|
||||
|
||||
## Labels
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
Help Us Help You!
|
||||
{: .subtitle }
|
||||
|
||||
We use the [GitHub issue tracker](https://github.com/containous/traefik/issues) to keep track of issues in Traefik.
|
||||
We use the [GitHub issue tracker](https://github.com/traefik/traefik/issues) to keep track of issues in Traefik.
|
||||
|
||||
The process of sorting and checking the issues is a daunting task, and requires a lot of work (more than an hour a day ... just for sorting).
|
||||
To save us some time and get quicker feedback, be sure to follow the guide lines below.
|
||||
@@ -14,7 +14,7 @@ To save us some time and get quicker feedback, be sure to follow the guide lines
|
||||
|
||||
For end-user related support questions, try using first:
|
||||
|
||||
- the Traefik community forum: [](https://community.containo.us/)
|
||||
- the Traefik community forum: [](https://community.traefik.io/)
|
||||
|
||||
## Issue Title
|
||||
|
||||
@@ -22,7 +22,7 @@ The title must be short and descriptive. (~60 characters)
|
||||
|
||||
## Description
|
||||
|
||||
Follow the [issue template](https://github.com/containous/traefik/blob/master/.github/ISSUE_TEMPLATE.md) as much as possible.
|
||||
Follow the [issue template](https://github.com/traefik/traefik/blob/master/.github/ISSUE_TEMPLATE.md) as much as possible.
|
||||
|
||||
Explain us in which conditions you encountered the issue, what is your context.
|
||||
|
||||
|
@@ -5,41 +5,5 @@ A Quick Guide for Efficient Contributions
|
||||
|
||||
So you've decided to improve Traefik?
|
||||
Thank You!
|
||||
Now the last step is to submit your Pull Request in a way that makes sure it gets the attention it deserves.
|
||||
|
||||
Let's go through the classic pitfalls to make sure everything is right.
|
||||
|
||||
## Title
|
||||
|
||||
The title must be short and descriptive. (~60 characters)
|
||||
|
||||
## Description
|
||||
|
||||
Follow the [pull request template](https://github.com/containous/traefik/blob/master/.github/PULL_REQUEST_TEMPLATE.md) as much as possible.
|
||||
|
||||
Explain the conditions which led you to write this PR: give us context.
|
||||
The context should lead to something, an idea or a problem that you’re facing.
|
||||
|
||||
Remain clear and concise.
|
||||
|
||||
Take time to polish the format of your message so we'll enjoy reading it and working on it.
|
||||
Help the readers focus on what matters, and help them understand the structure of your message (see the [Github Markdown Syntax](https://help.github.com/articles/github-flavored-markdown)).
|
||||
|
||||
## PR Content
|
||||
|
||||
- Make it small.
|
||||
- One feature per Pull Request.
|
||||
- Write useful descriptions and titles.
|
||||
- Avoid re-formatting code that is not on the path of your PR.
|
||||
- Make sure the [code builds](building-testing.md).
|
||||
- Make sure [all tests pass](building-testing.md).
|
||||
- Add tests.
|
||||
- Address review comments in terms of additional commits (and don't amend/squash existing ones unless the PR is trivial).
|
||||
|
||||
!!! note "Third-Party Dependencies"
|
||||
|
||||
If a PR involves changes to third-party dependencies, the commits pertaining to the vendor folder and the manifest/lock file(s) should be committed separated.
|
||||
|
||||
!!! tip "10 Tips for Better Pull Requests"
|
||||
|
||||
We enjoyed this article, maybe you will too! [10 tips for better pull requests](https://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/).
|
||||
Please review the [guidelines on creating PRs](https://github.com/traefik/contributors-guide/blob/master/pr_guidelines.md) for Traefik in our [contributors guide repository](https://github.com/traefik/contributors-guide).
|
||||
|
@@ -3,8 +3,8 @@
|
||||
_You_ Made It
|
||||
{: .subtitle}
|
||||
|
||||
Traefik truly is an [open-source project](https://github.com/containous/traefik/),
|
||||
and wouldn't have become what it is today without the help of our [many contributors](https://github.com/containous/traefik/graphs/contributors) (at the time of writing this),
|
||||
Traefik truly is an [open-source project](https://github.com/traefik/traefik/),
|
||||
and wouldn't have become what it is today without the help of our [many contributors](https://github.com/traefik/traefik/graphs/contributors) (at the time of writing this),
|
||||
not accounting for people having helped with issues, tests, comments, articles, ... or just enjoying it and letting others know.
|
||||
|
||||
So once again, thank you for your invaluable help on making Traefik such a good product.
|
||||
|
@@ -9,11 +9,14 @@ You can install Traefik with the following flavors:
|
||||
|
||||
## Use the Official Docker Image
|
||||
|
||||
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.2/traefik.sample.toml):
|
||||
Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with one sample configuration file:
|
||||
|
||||
* [TOML](https://raw.githubusercontent.com/traefik/traefik/v2.3/traefik.sample.toml)
|
||||
* [YAML](https://raw.githubusercontent.com/traefik/traefik/v2.3/traefik.sample.yml)
|
||||
|
||||
```bash
|
||||
docker run -d -p 8080:8080 -p 80:80 \
|
||||
-v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik:v2.2
|
||||
-v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik:v2.3
|
||||
```
|
||||
|
||||
For more details, go to the [Docker provider documentation](../providers/docker.md)
|
||||
@@ -30,9 +33,9 @@ For more details, go to the [Docker provider documentation](../providers/docker.
|
||||
!!! warning
|
||||
|
||||
The Traefik Chart from
|
||||
[Helm's default charts repository](https://github.com/helm/charts/tree/master/stable/traefik) is still using [Traefik v1.7](https://docs.traefik.io/v1.7).
|
||||
[Helm's default charts repository](https://github.com/helm/charts/tree/master/stable/traefik) is still using [Traefik v1.7](https://doc.traefik.io/traefik/v1.7).
|
||||
|
||||
Traefik can be installed in Kubernetes using the Helm chart from <https://github.com/containous/traefik-helm-chart>.
|
||||
Traefik can be installed in Kubernetes using the Helm chart from <https://github.com/traefik/traefik-helm-chart>.
|
||||
|
||||
Ensure that the following requirements are met:
|
||||
|
||||
@@ -42,7 +45,7 @@ Ensure that the following requirements are met:
|
||||
Add Traefik's chart repository to Helm:
|
||||
|
||||
```bash
|
||||
helm repo add traefik https://containous.github.io/traefik-helm-chart
|
||||
helm repo add traefik https://helm.traefik.io/traefik
|
||||
```
|
||||
|
||||
You can update the chart repository by running:
|
||||
@@ -76,26 +79,59 @@ helm install traefik traefik/traefik
|
||||
{: #helm-custom-values }
|
||||
|
||||
The values are not (yet) documented, but are self-explanatory:
|
||||
you can look at the [default `values.yaml`](https://github.com/containous/traefik-helm-chart/blob/master/traefik/values.yaml) file to explore possibilities.
|
||||
you can look at the [default `values.yaml`](https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml) file to explore possibilities.
|
||||
|
||||
You can also set Traefik command line flags using `additionalArguments`.
|
||||
Example of installation with logging set to `DEBUG`:
|
||||
|
||||
```bash tab="Using Helm CLI"
|
||||
helm install --namespace=traefik-v2 \
|
||||
--set="logs.loglevel=DEBUG" \
|
||||
--set="additionalArguments={--log.level=DEBUG}" \
|
||||
traefik traefik/traefik
|
||||
```
|
||||
|
||||
```yml tab="With a custom values file"
|
||||
# File custom-values.yml
|
||||
## Install with "helm install --values=./custom-values.yml traefik traefik/traefik
|
||||
logs:
|
||||
loglevel: DEBUG
|
||||
additionalArguments:
|
||||
- "--log.level=DEBUG"
|
||||
```
|
||||
|
||||
### Exposing the Traefik dashboard
|
||||
|
||||
This HelmChart does not expose the Traefik dashboard by default, for security concerns.
|
||||
Thus, there are multiple ways to expose the dashboard.
|
||||
For instance, the dashboard access could be achieved through a port-forward :
|
||||
|
||||
```shell
|
||||
kubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000
|
||||
```
|
||||
|
||||
Accessible with the url: http://127.0.0.1:9000/dashboard/
|
||||
|
||||
Another way would be to apply your own configuration, for instance,
|
||||
by defining and applying an IngressRoute CRD (`kubectl apply -f dashboard.yaml`):
|
||||
|
||||
```yaml
|
||||
# dashboard.yaml
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: dashboard
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`traefik.localhost`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
|
||||
kind: Rule
|
||||
services:
|
||||
- name: api@internal
|
||||
kind: TraefikService
|
||||
```
|
||||
|
||||
## Use the Binary Distribution
|
||||
|
||||
Grab the latest binary from the [releases](https://github.com/containous/traefik/releases) page.
|
||||
Grab the latest binary from the [releases](https://github.com/traefik/traefik/releases) page.
|
||||
|
||||
??? info "Check the integrity of the downloaded file"
|
||||
|
||||
|
@@ -15,7 +15,7 @@ version: '3'
|
||||
services:
|
||||
reverse-proxy:
|
||||
# The official v2 Traefik docker image
|
||||
image: traefik:v2.2
|
||||
image: traefik:v2.3
|
||||
# Enables the web UI and tells Traefik to listen to docker
|
||||
command: --api.insecure=true --providers.docker
|
||||
ports:
|
||||
@@ -48,7 +48,7 @@ Edit your `docker-compose.yml` file and add the following at the end of your fil
|
||||
# ...
|
||||
whoami:
|
||||
# A container that exposes an API to show its IP address
|
||||
image: containous/whoami
|
||||
image: traefik/whoami
|
||||
labels:
|
||||
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
|
||||
```
|
||||
|
@@ -12,7 +12,7 @@ Where Every Technical Word finds its Definition`
|
||||
- [ ] [Static configuration](getting-started/configuration-overview.md#the-static-configuration)
|
||||
- [ ] [Dynamic configuration](getting-started/configuration-overview.md#the-dynamic-configuration)
|
||||
- [ ] ACME
|
||||
- [ ] TraefikEE
|
||||
- [ ] Traefik Enterprise
|
||||
- [ ] Tracing
|
||||
- [ ] Metrics
|
||||
- [ ] Orchestrator
|
||||
|
@@ -105,13 +105,13 @@ Please check the [configuration examples below](#configuration-examples) for mor
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--entryPoints.web.address=:80
|
||||
--entryPoints.websecure.address=:443
|
||||
--entrypoints.web.address=:80
|
||||
--entrypoints.websecure.address=:443
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.email=your-email@example.com
|
||||
--certificatesResolvers.myresolver.acme.storage=acme.json
|
||||
--certificatesresolvers.myresolver.acme.email=your-email@example.com
|
||||
--certificatesresolvers.myresolver.acme.storage=acme.json
|
||||
# used during the challenge
|
||||
--certificatesResolvers.myresolver.acme.httpChallenge.entryPoint=web
|
||||
--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
|
||||
```
|
||||
|
||||
!!! important "Defining a certificates resolver does not result in all routers automatically using it. Each router that is supposed to use the resolver must [reference](../routing/routers/index.md#certresolver) it."
|
||||
@@ -181,7 +181,7 @@ when using the `TLS-ALPN-01` challenge, Traefik must be reachable by Let's Encry
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.tlsChallenge=true
|
||||
--certificatesresolvers.myresolver.acme.tlschallenge=true
|
||||
```
|
||||
|
||||
### `httpChallenge`
|
||||
@@ -189,7 +189,7 @@ when using the `TLS-ALPN-01` challenge, Traefik must be reachable by Let's Encry
|
||||
Use the `HTTP-01` challenge to generate and renew ACME certificates by provisioning an HTTP resource under a well-known URI.
|
||||
|
||||
As described on the Let's Encrypt [community forum](https://community.letsencrypt.org/t/support-for-ports-other-than-80-and-443/3419/72),
|
||||
when using the `HTTP-01` challenge, `certificatesResolvers.myresolver.acme.httpChallenge.entryPoint` must be reachable by Let's Encrypt through port 80.
|
||||
when using the `HTTP-01` challenge, `certificatesresolvers.myresolver.acme.httpchallenge.entrypoint` must be reachable by Let's Encrypt through port 80.
|
||||
|
||||
??? example "Using an EntryPoint Called web for the `httpChallenge`"
|
||||
|
||||
@@ -224,10 +224,10 @@ when using the `HTTP-01` challenge, `certificatesResolvers.myresolver.acme.httpC
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--entryPoints.web.address=:80
|
||||
--entryPoints.websecure.address=:443
|
||||
--entrypoints.web.address=:80
|
||||
--entrypoints.websecure.address=:443
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.httpChallenge.entryPoint=web
|
||||
--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
|
||||
```
|
||||
|
||||
!!! info ""
|
||||
@@ -261,8 +261,8 @@ Use the `DNS-01` challenge to generate and renew ACME certificates by provisioni
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.provider=digitalocean
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.delayBeforeCheck=0
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.provider=digitalocean
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.delaybeforecheck=0
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -275,24 +275,29 @@ Here is a list of supported `providers`, that can automate the DNS verification,
|
||||
along with the required environment variables and their [wildcard & root domain support](#wildcard-domains).
|
||||
Do not hesitate to complete it.
|
||||
|
||||
Every lego environment variable can be overridden by their respective `_FILE` counterpart, which should have a filepath to a file that contains the secret as its value.
|
||||
Many lego environment variables can be overridden by their respective `_FILE` counterpart, which should have a filepath to a file that contains the secret as its value.
|
||||
For example, `CF_API_EMAIL_FILE=/run/secrets/traefik_cf-api-email` could be used to provide a Cloudflare API email address as a Docker secret named `traefik_cf-api-email`.
|
||||
|
||||
For complete details, refer to your provider's _Additional configuration_ link.
|
||||
|
||||
| Provider Name | Provider Code | Environment Variables | |
|
||||
|-------------------------------------------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
|
||||
| [ACME DNS](https://github.com/joohoi/acme-dns) | `acme-dns` | `ACME_DNS_API_BASE`, `ACME_DNS_STORAGE_PATH` | [Additional configuration](https://go-acme.github.io/lego/dns/acme-dns) |
|
||||
| [Alibaba Cloud](https://www.alibabacloud.com) | `alidns` | `ALICLOUD_ACCESS_KEY`, `ALICLOUD_SECRET_KEY`, `ALICLOUD_REGION_ID` | [Additional configuration](https://go-acme.github.io/lego/dns/alidns) |
|
||||
| [Auroradns](https://www.pcextreme.com/aurora/dns) | `auroradns` | `AURORA_USER_ID`, `AURORA_KEY`, `AURORA_ENDPOINT` | [Additional configuration](https://go-acme.github.io/lego/dns/auroradns) |
|
||||
| [ArvanCloud](https://www.arvancloud.com/en) | `arvancloud` | `ARVANCLOUD_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/arvancloud) |
|
||||
| [Auroradns](https://www.pcextreme.com/dns-health-checks) | `auroradns` | `AURORA_USER_ID`, `AURORA_KEY`, `AURORA_ENDPOINT` | [Additional configuration](https://go-acme.github.io/lego/dns/auroradns) |
|
||||
| [Autodns](https://www.internetx.com/domains/autodns/) | `autodns` | `AUTODNS_API_USER`, `AUTODNS_API_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/autodns) |
|
||||
| [Azure](https://azure.microsoft.com/services/dns/) | `azure` | `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID`, `AZURE_TENANT_ID`, `AZURE_RESOURCE_GROUP`, `[AZURE_METADATA_ENDPOINT]` | [Additional configuration](https://go-acme.github.io/lego/dns/azure) |
|
||||
| [Bindman](https://github.com/labbsr0x/bindman-dns-webhook) | `bindman` | `BINDMAN_MANAGER_ADDRESS` | [Additional configuration](https://go-acme.github.io/lego/dns/bindman) |
|
||||
| [Blue Cat](https://www.bluecatnetworks.com/) | `bluecat` | `BLUECAT_SERVER_URL`, `BLUECAT_USER_NAME`, `BLUECAT_PASSWORD`, `BLUECAT_CONFIG_NAME`, `BLUECAT_DNS_VIEW` | [Additional configuration](https://go-acme.github.io/lego/dns/bluecat) |
|
||||
| [Checkdomain](https://www.checkdomain.de/) | `checkdomain` | `CHECKDOMAIN_TOKEN`, | [Additional configuration](https://go-acme.github.io/lego/dns/checkdomain/) |
|
||||
| [CloudDNS](https://vshosting.eu/) | `clouddns` | `CLOUDDNS_CLIENT_ID`, `CLOUDDNS_EMAIL`, `CLOUDDNS_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/clouddns) |
|
||||
| [ClouDNS](https://www.cloudns.net/) | `cloudns` | `CLOUDNS_AUTH_ID`, `CLOUDNS_AUTH_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudns) |
|
||||
| [Cloudflare](https://www.cloudflare.com) | `cloudflare` | `CF_API_EMAIL`, `CF_API_KEY` [^5] or `CF_DNS_API_TOKEN`, `[CF_ZONE_API_TOKEN]` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudflare) |
|
||||
| [CloudXNS](https://www.cloudxns.net) | `cloudxns` | `CLOUDXNS_API_KEY`, `CLOUDXNS_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudxns) |
|
||||
| [ConoHa](https://www.conoha.jp) | `conoha` | `CONOHA_TENANT_ID`, `CONOHA_API_USERNAME`, `CONOHA_API_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/conoha) |
|
||||
| [Constellix](https://constellix.com) | `constellix` | `CONSTELLIX_API_KEY`, `CONSTELLIX_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/constellix) |
|
||||
| [deSEC](https://desec.io) | `desec` | `DESEC_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/desec) |
|
||||
| [DigitalOcean](https://www.digitalocean.com) | `digitalocean` | `DO_AUTH_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/digitalocean) |
|
||||
| [DNSimple](https://dnsimple.com) | `dnsimple` | `DNSIMPLE_OAUTH_TOKEN`, `DNSIMPLE_BASE_URL` | [Additional configuration](https://go-acme.github.io/lego/dns/dnsimple) |
|
||||
| [DNS Made Easy](https://dnsmadeeasy.com) | `dnsmadeeasy` | `DNSMADEEASY_API_KEY`, `DNSMADEEASY_API_SECRET`, `DNSMADEEASY_SANDBOX` | [Additional configuration](https://go-acme.github.io/lego/dns/dnsmadeeasy) |
|
||||
@@ -303,31 +308,37 @@ For example, `CF_API_EMAIL_FILE=/run/secrets/traefik_cf-api-email` could be used
|
||||
| [Dyn](https://dyn.com) | `dyn` | `DYN_CUSTOMER_NAME`, `DYN_USER_NAME`, `DYN_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/dyn) |
|
||||
| [Dynu](https://www.dynu.com) | `dynu` | `DYNU_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/dynu) |
|
||||
| [EasyDNS](https://easydns.com/) | `easydns` | `EASYDNS_TOKEN`, `EASYDNS_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/easydns) |
|
||||
| [EdgeDNS](https://www.akamai.com/) | `edgedns` | `AKAMAI_CLIENT_TOKEN`, `AKAMAI_CLIENT_SECRET`, `AKAMAI_ACCESS_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/edgedns) |
|
||||
| External Program | `exec` | `EXEC_PATH` | [Additional configuration](https://go-acme.github.io/lego/dns/exec) |
|
||||
| [Exoscale](https://www.exoscale.com) | `exoscale` | `EXOSCALE_API_KEY`, `EXOSCALE_API_SECRET`, `EXOSCALE_ENDPOINT` | [Additional configuration](https://go-acme.github.io/lego/dns/exoscale) |
|
||||
| [Fast DNS](https://www.akamai.com/) | `fastdns` | `AKAMAI_CLIENT_TOKEN`, `AKAMAI_CLIENT_SECRET`, `AKAMAI_ACCESS_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/fastdns) |
|
||||
| [Fast DNS](https://www.akamai.com/) | `fastdns` | `AKAMAI_CLIENT_TOKEN`, `AKAMAI_CLIENT_SECRET`, `AKAMAI_ACCESS_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/edgedns) |
|
||||
| [Gandi](https://www.gandi.net) | `gandi` | `GANDI_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/gandi) |
|
||||
| [Gandi v5](http://doc.livedns.gandi.net) | `gandiv5` | `GANDIV5_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/gandiv5) |
|
||||
| [Glesys](https://glesys.com/) | `glesys` | `GLESYS_API_USER`, `GLESYS_API_KEY`, `GLESYS_DOMAIN` | [Additional configuration](https://go-acme.github.io/lego/dns/glesys) |
|
||||
| [GoDaddy](https://godaddy.com/) | `godaddy` | `GODADDY_API_KEY`, `GODADDY_API_SECRET` | [Additional configuration](https://go-acme.github.io/lego/dns/godaddy) |
|
||||
| [Google Cloud DNS](https://cloud.google.com/dns/docs/) | `gcloud` | `GCE_PROJECT`, Application Default Credentials [^2] [^3], [`GCE_SERVICE_ACCOUNT_FILE`] | [Additional configuration](https://go-acme.github.io/lego/dns/gcloud) |
|
||||
| [Hetzner](https://hetzner.com) | `hetzner` | `HETZNER_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/hetzner) |
|
||||
| [hosting.de](https://www.hosting.de) | `hostingde` | `HOSTINGDE_API_KEY`, `HOSTINGDE_ZONE_NAME` | [Additional configuration](https://go-acme.github.io/lego/dns/hostingde) |
|
||||
| HTTP request | `httpreq` | `HTTPREQ_ENDPOINT`, `HTTPREQ_MODE`, `HTTPREQ_USERNAME`, `HTTPREQ_PASSWORD` [^1] | [Additional configuration](https://go-acme.github.io/lego/dns/httpreq) |
|
||||
| [HyperOne](https://www.hyperone.com) | `hyperone` | `HYPERONE_PASSPORT_LOCATION`, `HYPERONE_LOCATION_ID` | [Additional configuration](https://go-acme.github.io/lego/dns/hyperone) |
|
||||
| [IIJ](https://www.iij.ad.jp/) | `iij` | `IIJ_API_ACCESS_KEY`, `IIJ_API_SECRET_KEY`, `IIJ_DO_SERVICE_CODE` | [Additional configuration](https://go-acme.github.io/lego/dns/iij) |
|
||||
| [Infomaniak](https://www.infomaniak.com) | `infomaniak` | `INFOMANIAK_ACCESS_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/infomaniak) |
|
||||
| [INWX](https://www.inwx.de/en) | `inwx` | `INWX_USERNAME`, `INWX_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/inwx) |
|
||||
| [Joker.com](https://joker.com) | `joker` | `JOKER_API_KEY` or `JOKER_USERNAME`, `JOKER_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/joker) |
|
||||
| [Joker.com](https://joker.com) | `joker` | `JOKER_API_MODE` with `JOKER_API_KEY` or `JOKER_USERNAME`, `JOKER_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/joker) |
|
||||
| [Lightsail](https://aws.amazon.com/lightsail/) | `lightsail` | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `DNS_ZONE` | [Additional configuration](https://go-acme.github.io/lego/dns/lightsail) |
|
||||
| [Linode](https://www.linode.com) | `linode` | `LINODE_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/linode) |
|
||||
| [Linode v4](https://www.linode.com) | `linodev4` | `LINODE_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/linodev4) |
|
||||
| [Linode v4](https://www.linode.com) | `linode` | `LINODE_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/linode) |
|
||||
| [Liquid Web](https://www.liquidweb.com/) | `liquidweb` | `LIQUID_WEB_PASSWORD`, `LIQUID_WEB_USERNAME`, `LIQUID_WEB_ZONE` | [Additional configuration](https://go-acme.github.io/lego/dns/liquidweb) |
|
||||
| [LuaDNS](https://luadns.com) | `luadns` | `LUADNS_API_USERNAME`, `LUADNS_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/luadns) |
|
||||
| manual | `manual` | none, but you need to run Traefik interactively [^4], turn on debug log to see instructions and press <kbd>Enter</kbd>. | |
|
||||
| [MyDNS.jp](https://www.mydns.jp/) | `mydnsjp` | `MYDNSJP_MASTER_ID`, `MYDNSJP_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/mydnsjp) |
|
||||
| [Mythic Beasts](https://www.mythic-beasts.com) | `mythicbeasts` | `MYTHICBEASTS_USER_NAME`, `MYTHICBEASTS_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/mythicbeasts) |
|
||||
| [Namecheap](https://www.namecheap.com) | `namecheap` | `NAMECHEAP_API_USER`, `NAMECHEAP_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/namecheap) |
|
||||
| [name.com](https://www.name.com/) | `namedotcom` | `NAMECOM_USERNAME`, `NAMECOM_API_TOKEN`, `NAMECOM_SERVER` | [Additional configuration](https://go-acme.github.io/lego/dns/namedotcom) |
|
||||
| [Namesilo](https://www.namesilo.com/) | `namesilo` | `NAMESILO_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/namesilo) |
|
||||
| [Netcup](https://www.netcup.eu/) | `netcup` | `NETCUP_CUSTOMER_NUMBER`, `NETCUP_API_KEY`, `NETCUP_API_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/netcup) |
|
||||
| [Netlify](https://www.netlify.com) | `netlify` | `NETLIFY_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/netlify) |
|
||||
| [NIFCloud](https://cloud.nifty.com/service/dns.htm) | `nifcloud` | `NIFCLOUD_ACCESS_KEY_ID`, `NIFCLOUD_SECRET_ACCESS_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/nifcloud) |
|
||||
| [Ns1](https://ns1.com/) | `ns1` | `NS1_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/ns1) |
|
||||
| [NS1](https://ns1.com/) | `ns1` | `NS1_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/ns1) |
|
||||
| [Open Telekom Cloud](https://cloud.telekom.de) | `otc` | `OTC_DOMAIN_NAME`, `OTC_USER_NAME`, `OTC_PASSWORD`, `OTC_PROJECT_NAME`, `OTC_IDENTITY_ENDPOINT` | [Additional configuration](https://go-acme.github.io/lego/dns/otc) |
|
||||
| [OVH](https://www.ovh.com) | `ovh` | `OVH_ENDPOINT`, `OVH_APPLICATION_KEY`, `OVH_APPLICATION_SECRET`, `OVH_CONSUMER_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/ovh) |
|
||||
| [Openstack Designate](https://docs.openstack.org/designate) | `designate` | `OS_AUTH_URL`, `OS_USERNAME`, `OS_PASSWORD`, `OS_TENANT_NAME`, `OS_REGION_NAME` | [Additional configuration](https://go-acme.github.io/lego/dns/designate) |
|
||||
@@ -348,11 +359,12 @@ For example, `CF_API_EMAIL_FILE=/run/secrets/traefik_cf-api-email` could be used
|
||||
| [Versio](https://www.versio.nl/domeinnamen) | `versio` | `VERSIO_USERNAME`, `VERSIO_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/versio) |
|
||||
| [Vscale](https://vscale.io/) | `vscale` | `VSCALE_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/vscale) |
|
||||
| [VULTR](https://www.vultr.com) | `vultr` | `VULTR_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/vultr) |
|
||||
| [Yandex](https://yandex.com) | `yandex` | `YANDEX_PDD_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/yandex) |
|
||||
| [Zone.ee](https://www.zone.ee) | `zoneee` | `ZONEEE_API_USER`, `ZONEEE_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/zoneee) |
|
||||
| [Zonomi](https://zonomi.com) | `zonomi` | `ZONOMI_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/zonomi) |
|
||||
|
||||
[^1]: more information about the HTTP message format can be found [here](https://go-acme.github.io/lego/dns/httpreq/)
|
||||
[^2]: [providing_credentials_to_your_application](https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application)
|
||||
[^2]: [providing_credentials_to_your_application](https://cloud.google.com/docs/authentication/production)
|
||||
[^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.
|
||||
[^5]: The `Global API Key` needs to be used, not the `Origin CA Key`.
|
||||
@@ -388,7 +400,7 @@ certificatesResolvers:
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.resolvers=1.1.1.1:53,8.8.8.8:53
|
||||
```
|
||||
|
||||
#### Wildcard Domains
|
||||
@@ -427,7 +439,7 @@ The CA server to use:
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -455,7 +467,7 @@ certificatesResolvers:
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesResolvers.myresolver.acme.storage=acme.json
|
||||
--certificatesresolvers.myresolver.acme.storage=acme.json
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -472,7 +484,66 @@ docker run -v "/my/host/acme:/etc/traefik/acme" traefik
|
||||
```
|
||||
|
||||
!!! warning
|
||||
For concurrency reason, this file cannot be shared across multiple instances of Traefik.
|
||||
For concurrency reasons, this file cannot be shared across multiple instances of Traefik.
|
||||
|
||||
### `preferredChain`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Preferred chain to use.
|
||||
|
||||
If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
If no match, the default offered chain will be used.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[certificatesResolvers.myresolver.acme]
|
||||
# ...
|
||||
preferredChain = "ISRG Root X1"
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
certificatesResolvers:
|
||||
myresolver:
|
||||
acme:
|
||||
# ...
|
||||
preferredChain: 'ISRG Root X1'
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesresolvers.myresolver.acme.preferredChain="ISRG Root X1"
|
||||
# ...
|
||||
```
|
||||
|
||||
### `keyType`
|
||||
|
||||
_Optional, Default="RSA4096"_
|
||||
|
||||
KeyType used for generating certificate private key. Allow value 'EC256', 'EC384', 'RSA2048', 'RSA4096', 'RSA8192'.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[certificatesResolvers.myresolver.acme]
|
||||
# ...
|
||||
keyType = "RSA4096"
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
certificatesResolvers:
|
||||
myresolver:
|
||||
acme:
|
||||
# ...
|
||||
keyType: 'RSA4096'
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesresolvers.myresolver.acme.keyType="RSA4096"
|
||||
# ...
|
||||
```
|
||||
|
||||
## Fallback
|
||||
|
||||
|
@@ -40,7 +40,7 @@ spec:
|
||||
domains:
|
||||
- main: example.org
|
||||
sans:
|
||||
- *.example.org
|
||||
- '*.example.org'
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
|
@@ -32,7 +32,7 @@ spec:
|
||||
- name: blog
|
||||
port: 8080
|
||||
tls:
|
||||
certresolver: myresolver
|
||||
certResolver: myresolver
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
|
@@ -32,7 +32,7 @@ spec:
|
||||
- name: blog
|
||||
port: 8080
|
||||
tls:
|
||||
certresolver: myresolver
|
||||
certResolver: myresolver
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
|
@@ -22,6 +22,16 @@
|
||||
#
|
||||
# caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
|
||||
# Preferred chain to use.
|
||||
#
|
||||
# If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
# If no match, the default offered chain will be used.
|
||||
#
|
||||
# Optional
|
||||
# Default: ""
|
||||
#
|
||||
# preferredChain = "ISRG Root X1"
|
||||
|
||||
# KeyType to use.
|
||||
#
|
||||
# Optional
|
||||
|
@@ -4,13 +4,13 @@
|
||||
#
|
||||
# Required
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.email=test@example.com
|
||||
--certificatesresolvers.myresolver.acme.email=test@example.com
|
||||
|
||||
# File or key used for certificates storage.
|
||||
#
|
||||
# Required
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.storage=acme.json
|
||||
--certificatesresolvers.myresolver.acme.storage=acme.json
|
||||
|
||||
# CA server to use.
|
||||
# Uncomment the line to use Let's Encrypt's staging server,
|
||||
@@ -19,7 +19,17 @@
|
||||
# Optional
|
||||
# Default: "https://acme-v02.api.letsencrypt.org/directory"
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
|
||||
# Preferred chain to use.
|
||||
#
|
||||
# If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
# If no match, the default offered chain will be used.
|
||||
#
|
||||
# Optional
|
||||
# Default: ""
|
||||
#
|
||||
--certificatesresolvers.myresolver.acme.preferredchain="ISRG Root X1"
|
||||
|
||||
# KeyType to use.
|
||||
#
|
||||
@@ -28,38 +38,38 @@
|
||||
#
|
||||
# Available values : "EC256", "EC384", "RSA2048", "RSA4096", "RSA8192"
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.keyType=RSA4096
|
||||
--certificatesresolvers.myresolver.acme.keytype=RSA4096
|
||||
|
||||
# Use a TLS-ALPN-01 ACME challenge.
|
||||
#
|
||||
# Optional (but recommended)
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.tlsChallenge=true
|
||||
--certificatesresolvers.myresolver.acme.tlschallenge=true
|
||||
|
||||
# Use a HTTP-01 ACME challenge.
|
||||
#
|
||||
# Optional
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.httpChallenge=true
|
||||
--certificatesresolvers.myresolver.acme.httpchallenge=true
|
||||
|
||||
# EntryPoint to use for the HTTP-01 challenges.
|
||||
#
|
||||
# Required
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.httpChallenge.entryPoint=web
|
||||
--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
|
||||
|
||||
# Use a DNS-01 ACME challenge rather than HTTP-01 challenge.
|
||||
# Note: mandatory for wildcard certificate generation.
|
||||
#
|
||||
# Optional
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge=true
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge=true
|
||||
|
||||
# DNS provider used.
|
||||
#
|
||||
# Required
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.provider=digitalocean
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.provider=digitalocean
|
||||
|
||||
# By default, the provider will verify the TXT DNS challenge record before letting ACME verify.
|
||||
# If delayBeforeCheck is greater than zero, this check is delayed for the configured duration in seconds.
|
||||
@@ -68,14 +78,14 @@
|
||||
# Optional
|
||||
# Default: 0
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.delayBeforeCheck=0
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.delaybeforecheck=0
|
||||
|
||||
# Use following DNS servers to resolve the FQDN authority.
|
||||
#
|
||||
# Optional
|
||||
# Default: empty
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.resolvers=1.1.1.1:53,8.8.8.8:53
|
||||
|
||||
# Disable the DNS propagation checks before notifying ACME that the DNS challenge is ready.
|
||||
#
|
||||
@@ -85,4 +95,4 @@
|
||||
# Optional
|
||||
# Default: false
|
||||
#
|
||||
--certificatesResolvers.myresolver.acme.dnsChallenge.disablePropagationCheck=true
|
||||
--certificatesresolvers.myresolver.acme.dnschallenge.disablepropagationcheck=true
|
||||
|
@@ -24,6 +24,16 @@ certificatesResolvers:
|
||||
#
|
||||
# caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
|
||||
# Preferred chain to use.
|
||||
#
|
||||
# If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
# If no match, the default offered chain will be used.
|
||||
#
|
||||
# Optional
|
||||
# Default: ""
|
||||
#
|
||||
# preferredChain: 'ISRG Root X1'
|
||||
|
||||
# KeyType to use.
|
||||
#
|
||||
# Optional
|
||||
|
@@ -64,7 +64,7 @@ tls:
|
||||
!!! important "Restriction"
|
||||
|
||||
Any store definition other than the default one (named `default`) will be ignored,
|
||||
and there is thefore only one globally available TLS store.
|
||||
and there is therefore only one globally available TLS store.
|
||||
|
||||
In the `tls.certificates` section, a list of stores can then be specified to indicate where the certificates should be stored:
|
||||
|
||||
@@ -134,6 +134,25 @@ If no default certificate is provided, Traefik generates and uses a self-signed
|
||||
|
||||
The TLS options allow one to configure some parameters of the TLS connection.
|
||||
|
||||
!!! important "'default' TLS Option"
|
||||
|
||||
The `default` option is special.
|
||||
When no tls options are specified in a tls router, the `default` option is used.
|
||||
When specifying the `default` option explicitly, make sure not to specify provider namespace as the `default` option does not have one.
|
||||
Conversely, for cross-provider references, for example, when referencing the file provider from a docker label,
|
||||
you must specify the provider namespace, for example:
|
||||
`traefik.http.routers.myrouter.tls.options=myoptions@file`
|
||||
|
||||
!!! important "TLSOptions in Kubernetes"
|
||||
|
||||
When using the TLSOptions-CRD in Kubernetes, one might setup a default set of options that,
|
||||
if not explicitly overwritten, should apply to all ingresses.
|
||||
To achieve that, you'll have to create a TLSOptions CR with the name `default`.
|
||||
There may exist only one TLSOption with the name `default` (across all namespaces) - otherwise they will be dropped.
|
||||
To explicitly use a different TLSOption (and using the Kubernetes Ingress resources)
|
||||
you'll have to add an annotation to the Ingress in the following form:
|
||||
`traefik.ingress.kubernetes.io/router.tls.options: <resource-namespace>-<resource-name>@kubernetescrd`
|
||||
|
||||
### Minimum TLS Version
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
@@ -183,9 +202,9 @@ spec:
|
||||
|
||||
### Maximum TLS Version
|
||||
|
||||
We discourages the use of this setting to disable TLS1.3.
|
||||
We discourage the use of this setting to disable TLS1.3.
|
||||
|
||||
The right approach is to update the clients to support TLS1.3.
|
||||
The recommended approach is to update the clients to support TLS1.3.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Dynamic configuration
|
||||
@@ -316,8 +335,8 @@ spec:
|
||||
|
||||
### Strict SNI Checking
|
||||
|
||||
With strict SNI checking, Traefik won't allow connections from clients connections
|
||||
that do not specify a server_name extension.
|
||||
With strict SNI checking enabled, Traefik won't allow connections from clients
|
||||
that do not specify a server_name extension or don't match any certificate configured on the tlsOption.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Dynamic configuration
|
||||
@@ -428,6 +447,7 @@ metadata:
|
||||
|
||||
spec:
|
||||
clientAuth:
|
||||
# the CA certificate is extracted from key `tls.ca` of the given secrets.
|
||||
secretNames:
|
||||
- secretCA
|
||||
clientAuthType: RequireAndVerifyClientCert
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||

|
||||
|
||||
Traefik is an [open-source](https://github.com/containous/traefik) *Edge Router* that makes publishing your services a fun and easy experience.
|
||||
Traefik is an [open-source](https://github.com/traefik/traefik) *Edge Router* that makes publishing your services a fun and easy experience.
|
||||
It receives requests on behalf of your system and finds out which components are responsible for handling them.
|
||||
|
||||
What sets Traefik apart, besides its many features, is that it automatically discovers the right configuration for your services.
|
||||
@@ -20,9 +20,9 @@ Developing Traefik, our main goal is to make it simple to use, and we're sure yo
|
||||
|
||||
!!! info
|
||||
|
||||
Join our user friendly and active [Community Forum](https://community.containo.us) to discuss, learn, and connect with the traefik community.
|
||||
Join our user friendly and active [Community Forum](https://community.traefik.io) to discuss, learn, and connect with the traefik community.
|
||||
|
||||
If you're a business running critical services behind Traefik,
|
||||
know that [Containous](https://containo.us), the company that sponsors Traefik's development,
|
||||
can provide [commercial support](https://info.containo.us/commercial-services)
|
||||
and develops an [Enterprise Edition](https://containo.us/traefikee/) of Traefik.
|
||||
know that [Traefik Labs](https://traefik.io), the company that sponsors Traefik's development,
|
||||
can provide [commercial support](https://info.traefik.io/commercial-services)
|
||||
and develops an [Enterprise Edition](https://traefik.io/traefik-enterprise/) of Traefik.
|
||||
|
@@ -12,9 +12,11 @@ The BasicAuth middleware is a quick way to restrict access to your services to k
|
||||
```yaml tab="Docker"
|
||||
# Declaring the user list
|
||||
#
|
||||
# Note: all dollar signs in the hash need to be doubled for escaping.
|
||||
# Note: when used in docker-compose.yml all dollar signs in the hash need to be doubled for escaping.
|
||||
# To create user:password pair, it's possible to use this command:
|
||||
# echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
|
||||
#
|
||||
# Also note that dollar signs should NOT be doubled when they not evaluated (e.g. Ansible docker_container module).
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
```
|
||||
|
@@ -165,7 +165,7 @@ http:
|
||||
|
||||
### `maxResponseBodyBytes`
|
||||
|
||||
With the `maxReesponseBodyBytes` option, you can configure the maximum allowed response size from the service (in Bytes).
|
||||
With the `maxResponseBodyBytes` option, you can configure the maximum allowed response size from the service (in Bytes).
|
||||
|
||||
If the response exceeds the allowed size, it is not forwarded to the client. The client gets a `413 (Request Entity Too Large) response` instead.
|
||||
|
||||
|
@@ -7,7 +7,7 @@ Don't Waste Time Calling Unhealthy Services
|
||||
|
||||
The circuit breaker protects your system from stacking requests to unhealthy services (resulting in cascading failures).
|
||||
|
||||
When your system is healthy, the circuit is close (normal operations).
|
||||
When your system is healthy, the circuit is closed (normal operations).
|
||||
When your system becomes unhealthy, the circuit becomes open and the requests are no longer forwarded (but handled by a fallback mechanism).
|
||||
|
||||
To assess if your system is healthy, the circuit breaker constantly monitors the services.
|
||||
@@ -82,13 +82,13 @@ http:
|
||||
|
||||
There are three possible states for your circuit breaker:
|
||||
|
||||
- Close (your service operates normally)
|
||||
- Closed (your service operates normally)
|
||||
- Open (the fallback mechanism takes over your service)
|
||||
- Recovering (the circuit breaker tries to resume normal operations by progressively sending requests to your service)
|
||||
|
||||
### Close
|
||||
### Closed
|
||||
|
||||
While close, the circuit breaker only collects metrics to analyze the behavior of the requests.
|
||||
While the circuit is closed, the circuit breaker only collects metrics to analyze the behavior of the requests.
|
||||
|
||||
At specified intervals (`checkPeriod`), it will evaluate `expression` to decide if its state must change.
|
||||
|
||||
|
@@ -64,6 +64,9 @@ http:
|
||||
* The `Accept-Encoding` request header contains `gzip`.
|
||||
* The response is not already compressed, i.e. the `Content-Encoding` response header is not already set.
|
||||
|
||||
If Content-Type header is not defined, or empty, the compress middleware will automatically [detect](https://mimesniff.spec.whatwg.org/) a content type.
|
||||
It will also set accordingly the `Content-Type` header with the detected MIME type.
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### `excludedContentTypes`
|
||||
|
@@ -21,6 +21,9 @@ This middleware exists to enable the correct behavior until at least the default
|
||||
is still to automatically set the `Content-Type` header.
|
||||
Therefore, given the default value of the `autoDetect` option (false),
|
||||
simply enabling this middleware for a router switches the router's behavior.
|
||||
|
||||
The scope of the Content-Type middleware is the MIME type detection done by the core of Traefik (the server part).
|
||||
Therefore, it has no effect against any other `Content-Type` header modifications (e.g.: in another middleware such as compress).
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
|
@@ -28,7 +28,7 @@ metadata:
|
||||
spec:
|
||||
errors:
|
||||
status:
|
||||
- 500-599
|
||||
- "500-599"
|
||||
query: /{status}.html
|
||||
service:
|
||||
name: whoami
|
||||
|
@@ -61,6 +61,18 @@ http:
|
||||
address: "https://example.com/auth"
|
||||
```
|
||||
|
||||
## Forward-Request Headers
|
||||
|
||||
The following request properties are provided to the forward-auth target endpoint as `X-Forwarded-` headers.
|
||||
|
||||
| Property | Forward-Request Header |
|
||||
|-------------------|------------------------|
|
||||
| HTTP Method | X-Forwarded-Method |
|
||||
| Protocol | X-Forwarded-Proto |
|
||||
| Host | X-Forwarded-Host |
|
||||
| Request URI | X-Forwarded-Uri |
|
||||
| Source IP-Address | X-Forwarded-For |
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### `address`
|
||||
|
@@ -151,8 +151,8 @@ metadata:
|
||||
name: testHeader
|
||||
spec:
|
||||
headers:
|
||||
frameDeny: "true"
|
||||
sslRedirect: "true"
|
||||
frameDeny: true
|
||||
sslRedirect: true
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
@@ -217,7 +217,7 @@ spec:
|
||||
- "https://foo.bar.org"
|
||||
- "https://example.org"
|
||||
accessControlMaxAge: 100
|
||||
addVaryHeader: "true"
|
||||
addVaryHeader: true
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
@@ -311,7 +311,7 @@ This value can contains a list of allowed origins.
|
||||
More information including how to use the settings can be found on:
|
||||
|
||||
- [Mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin)
|
||||
- [w3](https://www.w3.org/TR/cors/#access-control-allow-origin-response-header)
|
||||
- [w3](https://fetch.spec.whatwg.org/#http-access-control-allow-origin)
|
||||
- [IETF](https://tools.ietf.org/html/rfc6454#section-7.1)
|
||||
|
||||
Traefik no longer supports the null value, as it is [no longer recommended as a return value](https://w3c.github.io/webappsec-cors-for-developers/#avoid-returning-access-control-allow-origin-null).
|
||||
@@ -322,7 +322,7 @@ The `accessControlExposeHeaders` indicates which headers are safe to expose to t
|
||||
|
||||
### `accessControlMaxAge`
|
||||
|
||||
The `accessControlMaxAge` indicates how long a preflight request can be cached.
|
||||
The `accessControlMaxAge` indicates how long (in seconds) a preflight request can be cached.
|
||||
|
||||
### `addVaryHeader`
|
||||
|
||||
|
@@ -11,13 +11,18 @@ There are several available middleware in Traefik, some can modify the request,
|
||||
|
||||
Pieces of middleware can be combined in chains to fit every scenario.
|
||||
|
||||
!!! warning "Provider Namespace"
|
||||
|
||||
Be aware of the concept of Providers Namespace described in the [Configuration Discovery](../providers/overview.md#provider-namespace) section.
|
||||
It also applies to Middlewares.
|
||||
|
||||
## Configuration Example
|
||||
|
||||
```yaml tab="Docker"
|
||||
# As a Docker Label
|
||||
whoami:
|
||||
# A container that exposes an API to show its IP address
|
||||
image: containous/whoami
|
||||
image: traefik/whoami
|
||||
labels:
|
||||
# Create a middleware named `foo-add-prefix`
|
||||
- "traefik.http.middlewares.foo-add-prefix.addprefix.prefix=/foo"
|
||||
@@ -25,7 +30,7 @@ whoami:
|
||||
- "traefik.http.routers.router1.middlewares=foo-add-prefix@docker"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
```yaml tab="Kubernetes IngressRoute"
|
||||
# As a Kubernetes Traefik IngressRoute
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -128,78 +133,6 @@ http:
|
||||
- url: "http://127.0.0.1:80"
|
||||
```
|
||||
|
||||
## Provider Namespace
|
||||
|
||||
When you declare a middleware, it lives in its provider's namespace.
|
||||
For example, if you declare a middleware using a Docker label, under the hoods, it will reside in the docker provider namespace.
|
||||
|
||||
If you use multiple providers and wish to reference a middleware declared in another provider
|
||||
(aka referencing a cross-provider middleware),
|
||||
then you'll have to append to the middleware name, the `@` separator, followed by the provider name.
|
||||
|
||||
```text
|
||||
<resource-name>@<provider-name>
|
||||
```
|
||||
|
||||
!!! important "Kubernetes Namespace"
|
||||
|
||||
As Kubernetes also has its own notion of namespace, one should not confuse the "provider namespace"
|
||||
with the "kubernetes namespace" of a resource when in the context of a cross-provider usage.
|
||||
In this case, since the definition of the middleware is not in kubernetes,
|
||||
specifying a "kubernetes namespace" when referring to the resource does not make any sense,
|
||||
and therefore this specification would be ignored even if present.
|
||||
|
||||
!!! abstract "Referencing a Middleware from Another Provider"
|
||||
|
||||
Declaring the add-foo-prefix in the file provider.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[http.middlewares]
|
||||
[http.middlewares.add-foo-prefix.addPrefix]
|
||||
prefix = "/foo"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
http:
|
||||
middlewares:
|
||||
add-foo-prefix:
|
||||
addPrefix:
|
||||
prefix: "/foo"
|
||||
```
|
||||
|
||||
Using the add-foo-prefix middleware from other providers:
|
||||
|
||||
```yaml tab="Docker"
|
||||
your-container: #
|
||||
image: your-docker-image
|
||||
|
||||
labels:
|
||||
# Attach add-foo-prefix@file middleware (declared in file)
|
||||
- "traefik.http.routers.my-container.middlewares=add-foo-prefix@file"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: ingressroutestripprefix
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`example.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: whoami
|
||||
port: 80
|
||||
middlewares:
|
||||
- name: add-foo-prefix@file
|
||||
# namespace: bar
|
||||
# A namespace specification such as above is ignored
|
||||
# when the cross-provider syntax is used.
|
||||
```
|
||||
|
||||
## Available Middlewares
|
||||
|
||||
| Middleware | Purpose | Area |
|
||||
|
@@ -208,7 +208,7 @@ metadata:
|
||||
spec:
|
||||
redirectScheme:
|
||||
# ...
|
||||
port: 443
|
||||
port: "443"
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
@@ -247,5 +247,7 @@ http:
|
||||
test-redirectscheme:
|
||||
redirectScheme:
|
||||
# ...
|
||||
port: 443
|
||||
port: "443"
|
||||
```
|
||||
|
||||
!!! info "Port in this configuration is a string, not a numeric value."
|
||||
|
@@ -98,7 +98,7 @@ _Optional, Default=true_
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
- "traefik.http.middlewares.example.stripprefix.prefixes=/foobar"
|
||||
- "traefik.http.middlewares.example.stripprefix.forceslash=false"
|
||||
- "traefik.http.middlewares.example.stripprefix.forceSlash=false"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
@@ -116,7 +116,7 @@ spec:
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.example.stripprefix.prefixes": "/foobar",
|
||||
"traefik.http.middlewares.example.stripprefix.forceslash": "false"
|
||||
"traefik.http.middlewares.example.stripprefix.forceSlash": "false"
|
||||
}
|
||||
```
|
||||
|
||||
|
@@ -10,7 +10,7 @@ feature by feature, of how the configuration looked like in v1, and how it now l
|
||||
|
||||
!!! info "Migration Helper"
|
||||
|
||||
We created a tool to help during the migration: [traefik-migration-tool](https://github.com/containous/traefik-migration-tool)
|
||||
We created a tool to help during the migration: [traefik-migration-tool](https://github.com/traefik/traefik-migration-tool)
|
||||
|
||||
This tool allows to:
|
||||
|
||||
@@ -50,7 +50,7 @@ Then any router can refer to an instance of the wanted middleware.
|
||||
traefik.ingress.kubernetes.io/rule-type: PathPrefix
|
||||
spec:
|
||||
rules:
|
||||
- host: test.locahost
|
||||
- host: test.localhost
|
||||
http:
|
||||
paths:
|
||||
- path: /test
|
||||
@@ -97,14 +97,14 @@ Then any router can refer to an instance of the wanted middleware.
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
- "traefik.http.routers.router0.rule=Host(`example.com`) && PathPrefix(`/test`)"
|
||||
- "traefik.http.routers.router0.rule=Host(`test.localhost`) && PathPrefix(`/test`)"
|
||||
- "traefik.http.routers.router0.middlewares=auth"
|
||||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
```
|
||||
|
||||
```yaml tab="K8s IngressRoute"
|
||||
# The definitions below require the definitions for the Middleware and IngressRoute kinds.
|
||||
# https://docs.traefik.io/v2.2/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
# https://doc.traefik.io/traefik/v2.3/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
@@ -275,7 +275,7 @@ Then, a [router's TLS field](../routing/routers/index.md#tls) can refer to one o
|
||||
|
||||
```yaml tab="K8s IngressRoute"
|
||||
# The definitions below require the definitions for the TLSOption and IngressRoute kinds.
|
||||
# https://docs.traefik.io/v2.2/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
# https://doc.traefik.io/traefik/v2.3/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: TLSOption
|
||||
metadata:
|
||||
@@ -370,13 +370,13 @@ To apply a redirection:
|
||||
## static configuration
|
||||
|
||||
[entryPoints.web]
|
||||
address = 80
|
||||
address = ":80"
|
||||
[entryPoints.web.http.redirections.entryPoint]
|
||||
to = "websecure"
|
||||
scheme = "https"
|
||||
|
||||
[entryPoints.websecure]
|
||||
address = 443
|
||||
address = ":443"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
@@ -385,7 +385,7 @@ To apply a redirection:
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: 80
|
||||
address: ":80"
|
||||
http:
|
||||
redirections:
|
||||
entrypoint:
|
||||
@@ -393,7 +393,7 @@ To apply a redirection:
|
||||
scheme: https
|
||||
|
||||
websecure:
|
||||
address: 443
|
||||
address: ":443"
|
||||
```
|
||||
|
||||
!!! example "HTTP to HTTPS redirection per domain"
|
||||
@@ -453,7 +453,7 @@ To apply a redirection:
|
||||
- name: whoami
|
||||
port: 80
|
||||
middlewares:
|
||||
- name: https_redirect
|
||||
- name: https-redirect
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
@@ -476,7 +476,7 @@ To apply a redirection:
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: https_redirect
|
||||
name: https-redirect
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
@@ -528,7 +528,7 @@ To apply a redirection:
|
||||
tls: {}
|
||||
|
||||
middlewares:
|
||||
https_redirect:
|
||||
https-redirect:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
@@ -609,6 +609,7 @@ with the path `/admin` stripped, e.g. to `http://<IP>:<port>/`. In this case, yo
|
||||
middlewares:
|
||||
- name: admin-stripprefix
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: admin-stripprefix
|
||||
@@ -799,6 +800,13 @@ There is no more log configuration at the root level.
|
||||
--log.format=json
|
||||
```
|
||||
|
||||
## Access Logs
|
||||
|
||||
Access Logs are configured in the same way as before.
|
||||
|
||||
But all request headers are now filtered out by default in Traefik v2.
|
||||
So during migration, you might want to consider enabling some needed fields (see [access log configuration](../observability/access-logs.md)).
|
||||
|
||||
## Tracing
|
||||
|
||||
Traefik v2 retains OpenTracing support. The `backend` root option from the v1 is gone, you just have to set your [tracing configuration](../observability/tracing/overview.md).
|
||||
@@ -1137,4 +1145,4 @@ Supported [providers](../providers/overview.md), for now:
|
||||
- Now, configuration elements can be referenced between different providers by using the provider namespace notation: `@<provider>`.
|
||||
For instance, a router named `myrouter` in a File Provider can refer to a service named `myservice` defined in Docker Provider with the following notation: `myservice@docker`.
|
||||
- Middlewares are applied in the same order as their declaration in router.
|
||||
- If you have any questions feel free to join our [community forum](https://community.containo.us).
|
||||
- If you have any questions feel free to join our [community forum](https://community.traefik.io).
|
||||
|
@@ -302,3 +302,37 @@ providers:
|
||||
--entryPoints.websecure.address=:443
|
||||
--providers.kubernetesIngress=true
|
||||
```
|
||||
|
||||
## v2.2.2 to v2.2.5
|
||||
|
||||
### InsecureSNI removal
|
||||
|
||||
In `v2.2.2` we introduced a new flag (`insecureSNI`) which was available as a global option to disable domain fronting.
|
||||
Since `v2.2.5` this global option has been removed, and you should not use it anymore.
|
||||
|
||||
### HostSNI rule matcher removal
|
||||
|
||||
In `v2.2.2` we introduced a new rule matcher (`HostSNI`) for HTTP routers which was allowing to match the Server Name Indication at the router level.
|
||||
Since `v2.2.5` this rule has been removed for HTTP routers, and you should not use it anymore.
|
||||
|
||||
## v2.2 to v2.3
|
||||
|
||||
### X.509 CommonName Deprecation
|
||||
|
||||
The deprecated, legacy behavior of treating the CommonName field on X.509 certificates as a host name when no Subject Alternative Names are present, is now disabled by default.
|
||||
|
||||
It means that if one is using https with your backend servers, and a certificate with only a CommonName,
|
||||
Traefik will not try to match the server name indication with the CommonName anymore.
|
||||
|
||||
It can be temporarily re-enabled by adding the value `x509ignoreCN=0` to the `GODEBUG` environment variable.
|
||||
|
||||
More information: https://golang.org/doc/go1.15#commonname
|
||||
|
||||
### File Provider
|
||||
|
||||
The file parser has been changed, since v2.3 the unknown options/fields in a dynamic configuration file are treated as errors.
|
||||
|
||||
### IngressClass
|
||||
|
||||
In `v2.3`, the support of `IngressClass`, which is available since Kubernetes version `1.18`, has been introduced.
|
||||
In order to be able to use this new resource the [Kubernetes RBAC](../reference/dynamic-configuration/kubernetes-crd.md#rbac) must be updated.
|
||||
|
@@ -26,6 +26,20 @@ accessLog: {}
|
||||
By default access logs are written to the standard output.
|
||||
To write the logs into a log file, use the `filePath` option.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[accessLog]
|
||||
filePath = "/path/to/access.log"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
accessLog:
|
||||
filePath: "/path/to/access.log"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--accesslog.filepath=/path/to/access.log
|
||||
```
|
||||
|
||||
### `format`
|
||||
|
||||
By default, logs are written using the Common Log Format (CLF).
|
||||
@@ -60,7 +74,6 @@ accessLog:
|
||||
|
||||
```bash tab="CLI"
|
||||
# Configuring a buffer of 100 lines
|
||||
--accesslog=true
|
||||
--accesslog.filepath=/path/to/access.log
|
||||
--accesslog.bufferingsize=100
|
||||
```
|
||||
@@ -74,7 +87,7 @@ The available filters are:
|
||||
|
||||
- `statusCodes`, to limit the access logs to requests with a status codes in the specified range
|
||||
- `retryAttempts`, to keep the access logs when at least one retry has happened
|
||||
- `minDuration`, to keep access logs when requests take longer than the specified duration
|
||||
- `minDuration`, to keep access logs when requests take longer than the specified duration (provided in seconds or as a valid duration format, see [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration))
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Configuring Multiple Filters
|
||||
@@ -103,7 +116,6 @@ accessLog:
|
||||
|
||||
```bash tab="CLI"
|
||||
# Configuring Multiple Filters
|
||||
--accesslog=true
|
||||
--accesslog.filepath=/path/to/access.log
|
||||
--accesslog.format=json
|
||||
--accesslog.filters.statuscodes=200,300-302
|
||||
@@ -111,9 +123,9 @@ accessLog:
|
||||
--accesslog.filters.minduration=10ms
|
||||
```
|
||||
|
||||
### Limiting the Fields
|
||||
### Limiting the Fields/Including Headers
|
||||
|
||||
You can decide to limit the logged fields/headers to a given list with the `fields.names` and `fields.header` options
|
||||
You can decide to limit the logged fields/headers to a given list with the `fields.names` and `fields.headers` options.
|
||||
|
||||
Each field can be set to:
|
||||
|
||||
@@ -121,7 +133,7 @@ Each field can be set to:
|
||||
- `drop` to drop the value
|
||||
- `redact` to replace the value with "redacted"
|
||||
|
||||
The `defaultMode` for `fields.header` is `drop`.
|
||||
The `defaultMode` for `fields.headers` is `drop`.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Limiting the Logs to Specific Fields
|
||||
@@ -163,7 +175,6 @@ accessLog:
|
||||
|
||||
```bash tab="CLI"
|
||||
# Limiting the Logs to Specific Fields
|
||||
--accesslog=true
|
||||
--accesslog.filepath=/path/to/access.log
|
||||
--accesslog.format=json
|
||||
--accesslog.fields.defaultmode=keep
|
||||
@@ -181,10 +192,10 @@ accessLog:
|
||||
| `StartUTC` | The time at which request processing started. |
|
||||
| `StartLocal` | The local time at which request processing started. |
|
||||
| `Duration` | The total time taken (in nanoseconds) by processing the response, including the origin server's time but not the log writing time. |
|
||||
| `FrontendName` | The name of the Traefik frontend. |
|
||||
| `BackendName` | The name of the Traefik backend. |
|
||||
| `BackendURL` | The URL of the Traefik backend. |
|
||||
| `BackendAddr` | The IP:port of the Traefik backend (extracted from `BackendURL`) |
|
||||
| `RouterName` | The name of the Traefik router. |
|
||||
| `ServiceName` | The name of the Traefik backend. |
|
||||
| `ServiceURL` | The URL of the Traefik backend. |
|
||||
| `ServiceAddr` | The IP:port of the Traefik backend (extracted from `ServiceURL`) |
|
||||
| `ClientAddr` | The remote address in its original form (usually IP:port). |
|
||||
| `ClientHost` | The remote IP address from which the client request was received. |
|
||||
| `ClientPort` | The remote TCP port from which the client request was received. |
|
||||
@@ -198,7 +209,7 @@ accessLog:
|
||||
| `RequestScheme` | The HTTP scheme requested `http` or `https`. |
|
||||
| `RequestLine` | `RequestMethod` + `RequestPath` + `RequestProtocol` |
|
||||
| `RequestContentSize` | The number of bytes in the request entity (a.k.a. body) sent by the client. |
|
||||
| `OriginDuration` | The time taken by the origin server ('upstream') to return its response. |
|
||||
| `OriginDuration` | The time taken (in nanoseconds) by the origin server ('upstream') to return its response. |
|
||||
| `OriginContentSize` | The content length specified by the origin server, or 0 if unspecified. |
|
||||
| `OriginStatus` | The HTTP status code returned by the origin server. If the request was handled by this Traefik instance (e.g. with a redirect), then this value will be absent. |
|
||||
| `OriginStatusLine` | `OriginStatus` + Status code explanation |
|
||||
@@ -207,7 +218,7 @@ accessLog:
|
||||
| `DownstreamContentSize` | The number of bytes in the response entity returned to the client. This is in addition to the "Content-Length" header, which may be present in the origin response. |
|
||||
| `RequestCount` | The number of requests received since the Traefik instance started. |
|
||||
| `GzipRatio` | The response body compression ratio achieved. |
|
||||
| `Overhead` | The processing time overhead caused by Traefik. |
|
||||
| `Overhead` | The processing time overhead (in nanoseconds) caused by Traefik. |
|
||||
| `RetryAttempts` | The amount of attempts the request was retried. |
|
||||
|
||||
## Log Rotation
|
||||
@@ -217,3 +228,31 @@ This allows the logs to be rotated and processed by an external program, such as
|
||||
|
||||
!!! warning
|
||||
This does not work on Windows due to the lack of USR signals.
|
||||
|
||||
## Time Zones
|
||||
|
||||
Traefik will timestamp each log line in UTC time by default.
|
||||
|
||||
It is possible to configure the Traefik to timestamp in a specific timezone by ensuring the following configuration has been made in your environment:
|
||||
|
||||
1. Provide time zone data to `/etc/localtime` or `/usr/share/zoneinfo` (based on your distribution) or set the environment variable TZ to the desired timezone
|
||||
2. Specify the field `StartLocal` by dropping the field named `StartUTC` (available on the default Common Log Format (CLF) as well as JSON)
|
||||
|
||||
Example utilizing Docker Compose:
|
||||
|
||||
```yaml
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.2
|
||||
environment:
|
||||
- TZ=US/Alaska
|
||||
command:
|
||||
- --accesslog.fields.names.StartUTC=drop
|
||||
- --providers.docker
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
```
|
||||
|
@@ -185,6 +185,29 @@ tracing:
|
||||
--tracing.jaeger.traceContextHeaderName=uber-trace-id
|
||||
```
|
||||
|
||||
### disableAttemptReconnecting
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Disable the UDP connection helper that periodically re-resolves the agent's hostname and reconnects if there was a change.
|
||||
Enabling the re-resolving of UDP address make the client more robust in Kubernetes deployments.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[tracing]
|
||||
[tracing.jaeger]
|
||||
disableAttemptReconnecting = false
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
jaeger:
|
||||
disableAttemptReconnecting: false
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--tracing.jaeger.disableAttemptReconnecting=false
|
||||
```
|
||||
|
||||
### `collector`
|
||||
#### `endpoint`
|
||||
|
||||
|
@@ -7,13 +7,14 @@ The tracing system allows developers to visualize call flows in their infrastruc
|
||||
|
||||
Traefik uses OpenTracing, an open standard designed for distributed tracing.
|
||||
|
||||
Traefik supports five tracing backends:
|
||||
Traefik supports six tracing backends:
|
||||
|
||||
- [Jaeger](./jaeger.md)
|
||||
- [Zipkin](./zipkin.md)
|
||||
- [Datadog](./datadog.md)
|
||||
- [Instana](./instana.md)
|
||||
- [Haystack](./haystack.md)
|
||||
- [Elastic](./elastic.md)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
@@ -72,9 +72,6 @@ to allow defining:
|
||||
- A [router rule](#dashboard-router-rule) for accessing the dashboard,
|
||||
through Traefik itself (sometimes referred as "Traefik-ception").
|
||||
|
||||
??? example "Dashboard Dynamic Configuration Examples"
|
||||
--8<-- "content/operations/include-api-examples.md"
|
||||
|
||||
### Dashboard Router Rule
|
||||
|
||||
As underlined in the [documentation for the `api.dashboard` option](./api.md#dashboard),
|
||||
@@ -99,6 +96,9 @@ rule = "PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
|
||||
rule = "Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
```
|
||||
|
||||
??? example "Dashboard Dynamic Configuration Examples"
|
||||
--8<-- "content/operations/include-dashboard-examples.md"
|
||||
|
||||
## Insecure Mode
|
||||
|
||||
This mode is not recommended because it does not allow the use of security features.
|
||||
|
101
docs/content/operations/include-dashboard-examples.md
Normal file
101
docs/content/operations/include-dashboard-examples.md
Normal file
@@ -0,0 +1,101 @@
|
||||
```yaml tab="Docker"
|
||||
# Dynamic Configuration
|
||||
labels:
|
||||
- "traefik.http.routers.dashboard.rule=Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
- "traefik.http.routers.dashboard.service=api@internal"
|
||||
- "traefik.http.routers.dashboard.middlewares=auth"
|
||||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
```
|
||||
|
||||
```yaml tab="Docker (Swarm)"
|
||||
# Dynamic Configuration
|
||||
deploy:
|
||||
labels:
|
||||
- "traefik.http.routers.dashboard.rule=Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
- "traefik.http.routers.dashboard.service=api@internal"
|
||||
- "traefik.http.routers.dashboard.middlewares=auth"
|
||||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
# Dummy service for Swarm port detection. The port can be any valid integer value.
|
||||
- "traefik.http.services.dummy-svc.loadbalancer.server.port=9999"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes CRD"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: traefik-dashboard
|
||||
spec:
|
||||
routes:
|
||||
- match: Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
|
||||
kind: Rule
|
||||
services:
|
||||
- name: api@internal
|
||||
kind: TraefikService
|
||||
middlewares:
|
||||
- name: auth
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: auth
|
||||
spec:
|
||||
basicAuth:
|
||||
secret: secretName # Kubernetes secret named "secretName"
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
# Dynamic Configuration
|
||||
- "traefik.http.routers.dashboard.rule=Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
- "traefik.http.routers.dashboard.service=api@internal"
|
||||
- "traefik.http.routers.dashboard.middlewares=auth"
|
||||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.routers.dashboard.rule": "Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))",
|
||||
"traefik.http.routers.dashboard.service": "api@internal",
|
||||
"traefik.http.routers.dashboard.middlewares": "auth",
|
||||
"traefik.http.middlewares.auth.basicauth.users": "test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Dynamic Configuration
|
||||
labels:
|
||||
- "traefik.http.routers.dashboard.rule=Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
- "traefik.http.routers.dashboard.service=api@internal"
|
||||
- "traefik.http.routers.dashboard.middlewares=auth"
|
||||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Dynamic Configuration
|
||||
[http.routers.my-api]
|
||||
rule = "Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
service = "api@internal"
|
||||
middlewares = ["auth"]
|
||||
|
||||
[http.middlewares.auth.basicAuth]
|
||||
users = [
|
||||
"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/",
|
||||
"test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0",
|
||||
]
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Dynamic Configuration
|
||||
http:
|
||||
routers:
|
||||
dashboard:
|
||||
rule: Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
|
||||
service: api@internal
|
||||
middlewares:
|
||||
- auth
|
||||
middlewares:
|
||||
auth:
|
||||
basicAuth:
|
||||
users:
|
||||
- "test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/"
|
||||
- "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"
|
||||
```
|
@@ -81,3 +81,28 @@ ping:
|
||||
```bash tab="CLI"
|
||||
--ping.manualrouting=true
|
||||
```
|
||||
|
||||
### `terminatingStatusCode`
|
||||
|
||||
_Optional, Default=503_
|
||||
|
||||
During the period in which Traefik is gracefully shutting down, the ping handler
|
||||
returns a 503 status code by default. If Traefik is behind e.g. a load-balancer
|
||||
doing health checks (such as the Kubernetes LivenessProbe), another code might
|
||||
be expected as the signal for graceful termination. In which case, the
|
||||
terminatingStatusCode can be used to set the code returned by the ping
|
||||
handler during termination.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[ping]
|
||||
terminatingStatusCode = 204
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
ping:
|
||||
terminatingStatusCode: 204
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--ping.terminatingStatusCode=204
|
||||
```
|
||||
|
49
docs/content/plugins/index.md
Normal file
49
docs/content/plugins/index.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Plugins and Traefik Pilot
|
||||
|
||||
Traefik Pilot is a software-as-a-service (SaaS) platform that connects to Traefik to extend its capabilities.
|
||||
It offers a number of features to enhance observability and control of Traefik through a global control plane and dashboard, including:
|
||||
|
||||
* Metrics for network activity of Traefik proxies and groups of proxies
|
||||
* Alerts for service health issues and security vulnerabilities
|
||||
* Plugins that extend the functionality of Traefik
|
||||
|
||||
!!! important "Learn More About Traefik Pilot"
|
||||
This section is intended only as a brief overview for Traefik users who are not familiar with Traefik Pilot.
|
||||
To explore all that Traefik Pilot has to offer, please consult the [Traefik Pilot Documentation](https://doc.traefik.io/traefik-pilot/)
|
||||
|
||||
!!! Note "Prerequisites"
|
||||
Traefik Pilot is compatible with Traefik Proxy 2.3 or later.
|
||||
|
||||
## Connecting to Traefik Pilot
|
||||
|
||||
To connect your Traefik proxies to Traefik Pilot, login or create an account at the [Traefik Pilot homepage](https://pilot.traefik.io) and choose **Register New Traefik Instance**.
|
||||
|
||||
To complete the connection, Traefik Pilot will issue a token that must be added to your Traefik static configuration, according to the instructions provided by the Traefik Pilot dashboard.
|
||||
For more information, consult the [Quick Start Guide](https://doc.traefik.io/traefik-pilot/connecting/)
|
||||
|
||||
Health and security alerts for registered Traefik instances can be enabled from the Preferences in your [Traefik Pilot Profile](https://pilot.traefik.io/profile).
|
||||
|
||||
## Plugins
|
||||
|
||||
Plugins are available to any Traefik proxies that are connected to Traefik Pilot.
|
||||
They are a powerful feature for extending Traefik with custom features and behaviors.
|
||||
|
||||
You can browse community-contributed plugins from the catalog in the [Traefik Pilot Dashboard](https://pilot.traefik.io/plugins).
|
||||
|
||||
To add a new plugin to a Traefik instance, you must modify that instance's static configuration.
|
||||
The code to be added is provided for you when you choose **Install the Plugin** from the Traefik Pilot dashboard.
|
||||
To learn more about Traefik plugins, consult the [documentation](https://doc.traefik.io/traefik-pilot/plugins/overview/).
|
||||
|
||||
!!! danger "Experimental Features"
|
||||
Plugins can potentially modify the behavior of Traefik in unforeseen ways.
|
||||
Exercise caution when adding new plugins to production Traefik instances.
|
||||
|
||||
## Build Your Own Plugins
|
||||
|
||||
Traefik users can create their own plugins and contribute them to the Traefik Pilot catalog to share them with the community.
|
||||
|
||||
Traefik plugins are loaded dynamically.
|
||||
They need not be compiled, and no complex toolchain is necessary to build them.
|
||||
The experience of implementing a Traefik plugin is comparable to writing a web browser extension.
|
||||
|
||||
To learn more and see code for example Traefik plugins, please see the [developer documentation](https://doc.traefik.io/traefik-pilot/plugins/plugin-dev/).
|
@@ -29,7 +29,7 @@ Attach tags to your services and let Traefik do the rest!
|
||||
Attaching tags to services
|
||||
|
||||
```yaml
|
||||
- traefik.http.services.my-service.rule=Host(`example.com`)
|
||||
- traefik.http.routers.my-router.rule=Host(`example.com`)
|
||||
```
|
||||
|
||||
## Routing Configuration
|
||||
@@ -164,12 +164,12 @@ Defines the Consul server endpoint.
|
||||
|
||||
#### `address`
|
||||
|
||||
_Optional, Default="http://127.0.0.1:8500"_
|
||||
_Optional, Default="127.0.0.1:8500"_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consulCatalog]
|
||||
[providers.consulCatalog.endpoint]
|
||||
address = "http://127.0.0.1:8500"
|
||||
address = "127.0.0.1:8500"
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -177,12 +177,12 @@ _Optional, Default="http://127.0.0.1:8500"_
|
||||
providers:
|
||||
consulCatalog:
|
||||
endpoint:
|
||||
address: http://127.0.0.1:8500
|
||||
address: 127.0.0.1:8500
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consulcatalog.endpoint.address=http://127.0.0.1:8500
|
||||
--providers.consulcatalog.endpoint.address=127.0.0.1:8500
|
||||
# ...
|
||||
```
|
||||
|
||||
|
@@ -60,14 +60,17 @@ and [Docker Swarm Mode](https://docs.docker.com/engine/swarm/).
|
||||
providers:
|
||||
docker:
|
||||
# swarm classic (1.12-)
|
||||
# endpoint = "tcp://127.0.0.1:2375"
|
||||
# endpoint: "tcp://127.0.0.1:2375"
|
||||
# docker swarm mode (1.12+)
|
||||
endpoint: "tcp://127.0.0.1:2375"
|
||||
endpoint: "tcp://127.0.0.1:2377"
|
||||
swarmMode: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.docker.endpoint=tcp://127.0.0.1:2375
|
||||
# swarm classic (1.12-)
|
||||
# --providers.docker.endpoint=tcp://127.0.0.1:2375
|
||||
# docker swarm mode (1.12+)
|
||||
--providers.docker.endpoint=tcp://127.0.0.1:2377
|
||||
--providers.docker.swarmMode=true
|
||||
```
|
||||
|
||||
@@ -141,8 +144,8 @@ You can specify which Docker API Endpoint to use with the directive [`endpoint`]
|
||||
Accessing the Docker API without any restriction is a security concern:
|
||||
If Traefik is attacked, then the attacker might get access to the underlying host.
|
||||
{: #security-note }
|
||||
|
||||
As explained in the Docker documentation: ([Docker Daemon Attack Surface page](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface)):
|
||||
|
||||
As explained in the Docker documentation: ([Docker Daemon Attack Surface page](https://docs.docker.com/engine/security/#docker-daemon-attack-surface)):
|
||||
|
||||
!!! quote
|
||||
[...] only **trusted** users should be allowed to control your Docker daemon [...]
|
||||
@@ -154,7 +157,7 @@ You can specify which Docker API Endpoint to use with the directive [`endpoint`]
|
||||
|
||||
- Authentication with Client Certificates as described in ["Protect the Docker daemon socket."](https://docs.docker.com/engine/security/https/)
|
||||
- Authorize and filter requests to restrict possible actions with [the TecnativaDocker Socket Proxy](https://github.com/Tecnativa/docker-socket-proxy).
|
||||
- Authorization with the [Docker Authorization Plugin Mechanism](https://docs.docker.com/engine/extend/plugins_authorization/)
|
||||
- Authorization with the [Docker Authorization Plugin Mechanism](https://web.archive.org/web/20190920092526/https://docs.docker.com/engine/extend/plugins_authorization/)
|
||||
- Accounting at networking level, by exposing the socket only inside a Docker private network, only available for Traefik.
|
||||
- Accounting at container level, by exposing the socket on a another container than Traefik's.
|
||||
With Swarm mode, it allows scheduling of Traefik on worker nodes, with only the "socket exposer" container on the manager nodes.
|
||||
@@ -163,12 +166,12 @@ You can specify which Docker API Endpoint to use with the directive [`endpoint`]
|
||||
|
||||
??? info "More Resources and Examples"
|
||||
- ["Paranoid about mounting /var/run/docker.sock?"](https://medium.com/@containeroo/traefik-2-0-paranoid-about-mounting-var-run-docker-sock-22da9cb3e78c)
|
||||
- [Traefik and Docker: A Discussion with Docker Captain, Bret Fisher](https://blog.containo.us/traefik-and-docker-a-discussion-with-docker-captain-bret-fisher-7f0b9a54ff88)
|
||||
- [Traefik and Docker: A Discussion with Docker Captain, Bret Fisher](https://blog.traefik.io/traefik-and-docker-a-discussion-with-docker-captain-bret-fisher-7f0b9a54ff88)
|
||||
- [KubeCon EU 2018 Keynote, Running with Scissors, from Liz Rice](https://www.youtube.com/watch?v=ltrV-Qmh3oY)
|
||||
- [Don't expose the Docker socket (not even to a container)](https://www.lvh.io/posts/dont-expose-the-docker-socket-not-even-to-a-container/)
|
||||
- [A thread on Stack Overflow about sharing the `/var/run/docker.sock` file](https://news.ycombinator.com/item?id=17983623)
|
||||
- [To DinD or not to DinD](https://blog.loof.fr/2018/01/to-dind-or-not-do-dind.html)
|
||||
- [Traefik issue GH-4174 about security with Docker socket](https://github.com/containous/traefik/issues/4174)
|
||||
- [Traefik issue GH-4174 about security with Docker socket](https://github.com/traefik/traefik/issues/4174)
|
||||
- [Inspecting Docker Activity with Socat](https://developers.redhat.com/blog/2015/02/25/inspecting-docker-activity-with-socat/)
|
||||
- [Letting Traefik run on Worker Nodes](https://blog.mikesir87.io/2018/07/letting-traefik-run-on-worker-nodes/)
|
||||
- [Docker Socket Proxy from Tecnativa](https://github.com/Tecnativa/docker-socket-proxy)
|
||||
@@ -199,7 +202,7 @@ Therefore you **must** specify the port to use for communication by using the la
|
||||
Docker Swarm Mode follows the same rules as Docker [API Access](#docker-api-access).
|
||||
|
||||
As the Swarm API is only exposed on the [manager nodes](https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/#manager-nodes), you should schedule Traefik on the Swarm manager nodes by default,
|
||||
by deploying Traefik with a [constraint](https://success.docker.com/article/using-contraints-and-labels-to-control-the-placement-of-containers) on the node's "role":
|
||||
by deploying Traefik with a constraint on the node's "role":
|
||||
|
||||
```shell tab="With Docker CLI"
|
||||
docker service create \
|
||||
@@ -261,7 +264,7 @@ See the sections [Docker API Access](#docker-api-access) and [Docker Swarm API A
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.2 # The official v2 Traefik docker image
|
||||
image: traefik:v2.3 # The official v2 Traefik docker image
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
|
220
docs/content/providers/ecs.md
Normal file
220
docs/content/providers/ecs.md
Normal file
@@ -0,0 +1,220 @@
|
||||
# Traefik & AWS ECS
|
||||
|
||||
A Story of Labels & Elastic Containers
|
||||
{: .subtitle }
|
||||
|
||||
Attach labels to your ECS containers and let Traefik do the rest!
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
??? example "Configuring ECS provider"
|
||||
|
||||
Enabling the ECS provider:
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs: {}
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs=true
|
||||
```
|
||||
|
||||
## Policy
|
||||
|
||||
Traefik needs the following policy to read ECS information:
|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "TraefikECSReadAccess",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"ecs:ListClusters",
|
||||
"ecs:DescribeClusters",
|
||||
"ecs:ListTasks",
|
||||
"ecs:DescribeTasks",
|
||||
"ecs:DescribeContainerInstances",
|
||||
"ecs:DescribeTaskDefinition",
|
||||
"ec2:DescribeInstances"
|
||||
],
|
||||
"Resource": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Provider configuration
|
||||
|
||||
### `autoDiscoverClusters`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
autoDiscoverClusters = true
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
autoDiscoverClusters: true
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.autoDiscoverClusters=true
|
||||
# ...
|
||||
```
|
||||
|
||||
Search for services in clusters list.
|
||||
|
||||
- If set to `true` the configured clusters will be ignored and the clusters will be discovered.
|
||||
- If set to `false` the services will be discovered only in configured clusters.
|
||||
|
||||
### `clusters`
|
||||
|
||||
_Optional, Default=["default"]_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
clusters = ["default"]
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
clusters:
|
||||
- default
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.clusters=default
|
||||
# ...
|
||||
```
|
||||
|
||||
Search for services in clusters list.
|
||||
|
||||
### `exposedByDefault`
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
exposedByDefault = false
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
exposedByDefault: false
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.exposedByDefault=false
|
||||
# ...
|
||||
```
|
||||
|
||||
Expose ECS services by default in Traefik.
|
||||
If set to false, services that don't have a `traefik.enable=true` label will be ignored from the resulting routing configuration.
|
||||
|
||||
### `defaultRule`
|
||||
|
||||
_Optional, Default=```Host(`{{ normalize .Name }}`)```_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
defaultRule: "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.defaultRule=Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)
|
||||
# ...
|
||||
```
|
||||
|
||||
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/),
|
||||
augmented with the [sprig template functions](http://masterminds.github.io/sprig/).
|
||||
The service name can be accessed as the `Name` identifier,
|
||||
and the template has access to all the labels defined on this container.
|
||||
|
||||
### `refreshSeconds`
|
||||
|
||||
_Optional, Default=15_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
refreshSeconds = 15
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
refreshSeconds: 15
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.refreshSeconds=15
|
||||
# ...
|
||||
```
|
||||
|
||||
Polling interval (in seconds).
|
||||
|
||||
### Credentials
|
||||
|
||||
_Optional_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.ecs]
|
||||
region = "us-east-1"
|
||||
accessKeyID = "abc"
|
||||
secretAccessKey = "123"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
ecs:
|
||||
region: us-east-1
|
||||
accessKeyID: "abc"
|
||||
secretAccessKey: "123"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.ecs.region="us-east-1"
|
||||
--providers.ecs.accessKeyID="abc"
|
||||
--providers.ecs.secretAccessKey="123"
|
||||
# ...
|
||||
```
|
||||
|
||||
If `region` is not provided, it will be resolved from the EC2 metadata endpoint for EC2 tasks.
|
||||
In a FARGATE context it will be resolved from the `AWS_REGION` env variable.
|
||||
|
||||
If `accessKeyID` / `secretAccessKey` are not provided, credentials will be resolved in the following order:
|
||||
|
||||
- From environment variables `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN`.
|
||||
- Shared credentials, determined by `AWS_PROFILE` and `AWS_SHARED_CREDENTIALS_FILE`, defaults to default and `~/.aws/credentials`.
|
||||
- EC2 instance role or ECS task role
|
@@ -47,22 +47,22 @@ You can write one of these mutually exclusive configuration elements:
|
||||
middlewares = ["my-basic-auth"]
|
||||
service = "service-foo"
|
||||
rule = "Path(`/foo`)"
|
||||
|
||||
# Add the middleware
|
||||
[http.middlewares]
|
||||
[http.middlewares.my-basic-auth.basicAuth]
|
||||
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/",
|
||||
"test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
||||
usersFile = "etc/traefik/.htpasswd"
|
||||
|
||||
# Add the service
|
||||
[http.services]
|
||||
[http.services.service-foo]
|
||||
[http.services.service-foo.loadBalancer]
|
||||
[[http.services.service-foo.loadBalancer.servers]]
|
||||
url = "http://foo/"
|
||||
[[http.services.service-foo.loadBalancer.servers]]
|
||||
url = "http://bar/"
|
||||
|
||||
# Add the middleware
|
||||
[http.middlewares]
|
||||
[http.middlewares.my-basic-auth.basicAuth]
|
||||
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/",
|
||||
"test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
||||
usersFile = "etc/traefik/.htpasswd"
|
||||
|
||||
# Add the service
|
||||
[http.services]
|
||||
[http.services.service-foo]
|
||||
[http.services.service-foo.loadBalancer]
|
||||
[[http.services.service-foo.loadBalancer.servers]]
|
||||
url = "http://foo/"
|
||||
[[http.services.service-foo.loadBalancer.servers]]
|
||||
url = "http://bar/"
|
||||
```
|
||||
|
||||
```yaml tab="YAML"
|
||||
@@ -191,14 +191,14 @@ providers:
|
||||
### Go Templating
|
||||
|
||||
!!! warning
|
||||
Go Templating only works along with dedicated dynamic configuration files.
|
||||
Go Templating only works with dedicated dynamic configuration files.
|
||||
Templating does not work in the Traefik main static configuration file.
|
||||
|
||||
Traefik allows using Go templating,
|
||||
it must be a valid [Go template](https://golang.org/pkg/text/template/),
|
||||
augmented with the [sprig template functions](http://masterminds.github.io/sprig/).
|
||||
Traefik supports using Go templating to automatically generate repetitive portions of configuration files.
|
||||
These sections must be valid [Go templates](https://golang.org/pkg/text/template/),
|
||||
augmented with the [Sprig template functions](http://masterminds.github.io/sprig/).
|
||||
|
||||
Thus, it's possible to define easily lot of routers, services and TLS certificates as described in the following examples:
|
||||
To illustrate, it's possible to easily define multiple routers, services, and TLS certificates as described in the following examples:
|
||||
|
||||
??? example "Configuring Using Templating"
|
||||
|
||||
@@ -238,7 +238,7 @@ Thus, it's possible to define easily lot of routers, services and TLS certificat
|
||||
[[tls.certificates]]
|
||||
certFile = "/etc/traefik/cert-{{ $e }}.pem"
|
||||
keyFile = "/etc/traefik/cert-{{ $e }}.key"
|
||||
store = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
|
||||
stores = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
|
||||
{{ end }}
|
||||
|
||||
[tls.config]
|
||||
|
189
docs/content/providers/http.md
Normal file
189
docs/content/providers/http.md
Normal file
@@ -0,0 +1,189 @@
|
||||
# Traefik & HTTP
|
||||
|
||||
Provide your [dynamic configuration](./overview.md) via an HTTP(s) endpoint and let Traefik do the rest!
|
||||
|
||||
## Routing Configuration
|
||||
|
||||
The HTTP provider uses the same configuration as the [File Provider](./file.md) in YAML or JSON format.
|
||||
|
||||
## Provider Configuration
|
||||
|
||||
### `endpoint`
|
||||
|
||||
_Required_
|
||||
|
||||
Defines the HTTP(s) endpoint to poll.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http]
|
||||
endpoint = "http://127.0.0.1:9000/api"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
endpoint:
|
||||
- "http://127.0.0.1:9000/api"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.endpoint=http://127.0.0.1:9000/api
|
||||
```
|
||||
|
||||
### `pollInterval`
|
||||
|
||||
_Optional, Default="5s"_
|
||||
|
||||
Defines the polling interval.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http]
|
||||
pollInterval = "5s"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
pollInterval: "5s"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.pollInterval=5s
|
||||
```
|
||||
|
||||
### `pollTimeout`
|
||||
|
||||
_Optional, Default="5s"_
|
||||
|
||||
Defines the polling timeout when connecting to the configured endpoint.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http]
|
||||
pollTimeout = "5s"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
pollTimeout: "5s"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.pollTimeout=5s
|
||||
```
|
||||
|
||||
### `tls`
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
|
||||
Certificate Authority used for the secured connection to the configured Endpoint.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http.tls]
|
||||
ca = "path/to/ca.crt"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
tls:
|
||||
ca: path/to/ca.crt
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
|
||||
Policy followed for the secured connection with TLS Client Authentication to the configured Endpoint.
|
||||
Requires `tls.ca` to be defined.
|
||||
|
||||
- `true`: VerifyClientCertIfGiven
|
||||
- `false`: RequireAndVerifyClientCert
|
||||
- if `tls.ca` is undefined NoClientCert
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http.tls]
|
||||
caOptional = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
tls:
|
||||
caOptional: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
|
||||
Public certificate used for the secured connection to the configured Endpoint.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http.tls]
|
||||
cert = "path/to/foo.cert"
|
||||
key = "path/to/foo.key"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
tls:
|
||||
cert: path/to/foo.cert
|
||||
key: path/to/foo.key
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.tls.cert=path/to/foo.cert
|
||||
--providers.http.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
|
||||
Private certificate used for the secured connection to the configured Endpoint.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http.tls]
|
||||
cert = "path/to/foo.cert"
|
||||
key = "path/to/foo.key"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
tls:
|
||||
cert: path/to/foo.cert
|
||||
key: path/to/foo.key
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.tls.cert=path/to/foo.cert
|
||||
--providers.http.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
|
||||
If `insecureSkipVerify` is `true`, TLS connection to the configured Endpoint accepts any certificate presented by the
|
||||
server and any host name in that certificate.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.http.tls]
|
||||
insecureSkipVerify = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
tls:
|
||||
insecureSkipVerify: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.http.tls.insecureSkipVerify=true
|
||||
```
|
@@ -53,9 +53,9 @@ For this reason, users can run multiple instances of Traefik at the same time to
|
||||
|
||||
When using a single instance of Traefik with LetsEncrypt, no issues should be encountered, however this could be a single point of failure.
|
||||
Unfortunately, it is not possible to run multiple instances of Traefik 2.0 with LetsEncrypt enabled, because there is no way to ensure that the correct instance of Traefik will receive the challenge request, and subsequent responses.
|
||||
Previous versions of Traefik used a [KV store](https://docs.traefik.io/v1.7/configuration/acme/#storage) to attempt to achieve this, but due to sub-optimal performance was dropped as a feature in 2.0.
|
||||
Previous versions of Traefik used a [KV store](https://doc.traefik.io/traefik/v1.7/configuration/acme/#storage) to attempt to achieve this, but due to sub-optimal performance was dropped as a feature in 2.0.
|
||||
|
||||
If you require LetsEncrypt with HA in a kubernetes environment, we recommend using [TraefikEE](https://containo.us/traefikee/) where distributed LetsEncrypt is a supported feature.
|
||||
If you require LetsEncrypt with HA in a kubernetes environment, we recommend using [Traefik Enterprise](https://traefik.io/traefik-enterprise/) where distributed LetsEncrypt is a supported feature.
|
||||
|
||||
If you are wanting to continue to run Traefik Community Edition, LetsEncrypt HA can be achieved by using a Certificate Controller such as [Cert-Manager](https://docs.cert-manager.io/en/latest/index.html).
|
||||
When using Cert-Manager to manage certificates, it will create secrets in your namespaces that can be referenced as TLS secrets in your [ingress objects](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls).
|
||||
@@ -78,7 +78,7 @@ _Optional, Default=empty_
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
endpoint = "http://localhost:8080"
|
||||
endpoint: "http://localhost:8080"
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -112,7 +112,7 @@ _Optional, Default=empty_
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
token = "mytoken"
|
||||
token: "mytoken"
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -173,30 +173,36 @@ Array of namespaces to watch.
|
||||
|
||||
### `labelselector`
|
||||
|
||||
_Optional,Default: empty (process all Ingresses)_
|
||||
_Optional,Default: empty (process all resources)_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesCRD]
|
||||
labelselector = "A and not B"
|
||||
labelselector = "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
labelselector: "A and not B"
|
||||
labelselector: "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.kubernetescrd.labelselector="A and not B"
|
||||
--providers.kubernetescrd.labelselector="app=traefik"
|
||||
```
|
||||
|
||||
By default, Traefik processes all Ingress objects in the configured namespaces.
|
||||
A label selector can be defined to filter on specific Ingress objects only.
|
||||
By default, Traefik processes all resource objects in the configured namespaces.
|
||||
A label selector can be defined to filter on specific resource objects only,
|
||||
this will apply only on Traefik [Custom Resources](../routing/providers/kubernetes-crd.md#custom-resource-definition-crd)
|
||||
and has no effect on Kubernetes `Secrets`, `Endpoints` and `Services`.
|
||||
|
||||
See [label-selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) for details.
|
||||
|
||||
!!! warning
|
||||
|
||||
As the LabelSelector is applied to all Traefik Custom Resources, they all must match the filter.
|
||||
|
||||
### `ingressClass`
|
||||
|
||||
_Optional, Default: empty_
|
||||
@@ -218,10 +224,10 @@ providers:
|
||||
--providers.kubernetescrd.ingressclass=traefik-internal
|
||||
```
|
||||
|
||||
Value of `kubernetes.io/ingress.class` annotation that identifies Ingress objects to be processed.
|
||||
Value of `kubernetes.io/ingress.class` annotation that identifies resource objects to be processed.
|
||||
|
||||
If the parameter is non-empty, only Ingresses containing an annotation with the same value are processed.
|
||||
Otherwise, Ingresses missing the annotation, having an empty value, or the value `traefik` are processed.
|
||||
If the parameter is non-empty, only resources containing an annotation with the same value are processed.
|
||||
Otherwise, resources missing the annotation, having an empty value, or the value `traefik` are processed.
|
||||
|
||||
### `throttleDuration`
|
||||
|
||||
@@ -244,6 +250,34 @@ providers:
|
||||
--providers.kubernetescrd.throttleDuration=10s
|
||||
```
|
||||
|
||||
### `allowCrossNamespace`
|
||||
|
||||
_Optional, Default: true_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesCRD]
|
||||
allowCrossNamespace = false
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
allowCrossNamespace: false
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.kubernetescrd.allowCrossNamespace=false
|
||||
```
|
||||
|
||||
If the parameter is set to `false`, an IngressRoute will not be able to reference any resources
|
||||
in another namespace than the IngressRoute namespace.
|
||||
|
||||
!!! warning "Deprecation"
|
||||
|
||||
Please notice that the default value for this option will be set to `false` in a future version.
|
||||
|
||||
## Further
|
||||
|
||||
Also see the [full example](../user-guides/crd-acme/index.md) with Let's Encrypt.
|
||||
|
@@ -4,7 +4,7 @@ The Kubernetes Ingress Controller.
|
||||
{: .subtitle }
|
||||
|
||||
The Traefik Kubernetes Ingress provider is a Kubernetes Ingress controller; that is to say,
|
||||
it manages access to a cluster services by supporting the [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) specification.
|
||||
it manages access to cluster services by supporting the [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) specification.
|
||||
|
||||
## Routing Configuration
|
||||
|
||||
@@ -65,11 +65,11 @@ When using a single instance of Traefik with LetsEncrypt, no issues should be en
|
||||
however this could be a single point of failure.
|
||||
Unfortunately, it is not possible to run multiple instances of Traefik 2.0 with LetsEncrypt enabled,
|
||||
because there is no way to ensure that the correct instance of Traefik will receive the challenge request, and subsequent responses.
|
||||
Previous versions of Traefik used a [KV store](https://docs.traefik.io/v1.7/configuration/acme/#storage) to attempt to achieve this,
|
||||
Previous versions of Traefik used a [KV store](https://doc.traefik.io/traefik/v1.7/configuration/acme/#storage) to attempt to achieve this,
|
||||
but due to sub-optimal performance was dropped as a feature in 2.0.
|
||||
|
||||
If you require LetsEncrypt with HA in a kubernetes environment,
|
||||
we recommend using [TraefikEE](https://containo.us/traefikee/) where distributed LetsEncrypt is a supported feature.
|
||||
we recommend using [Traefik Enterprise](https://traefik.io/traefik-enterprise/) where distributed LetsEncrypt is a supported feature.
|
||||
|
||||
If you are wanting to continue to run Traefik Community Edition,
|
||||
LetsEncrypt HA can be achieved by using a Certificate Controller such as [Cert-Manager](https://docs.cert-manager.io/en/latest/index.html).
|
||||
@@ -91,7 +91,7 @@ _Optional, Default=empty_
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
endpoint = "http://localhost:8080"
|
||||
endpoint: "http://localhost:8080"
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -124,7 +124,7 @@ _Optional, Default=empty_
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
token = "mytoken"
|
||||
token: "mytoken"
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -212,23 +212,23 @@ _Optional,Default: empty (process all Ingresses)_
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesIngress]
|
||||
labelSelector = "A and not B"
|
||||
labelSelector = "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
labelselector: "A and not B"
|
||||
labelselector: "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.kubernetesingress.labelselector="A and not B"
|
||||
--providers.kubernetesingress.labelselector="app=traefik"
|
||||
```
|
||||
|
||||
By default, Traefik processes all Ingress objects in the configured namespaces.
|
||||
A label selector can be defined to filter on specific Ingress objects only.
|
||||
By default, Traefik processes all `Ingress` objects in the configured namespaces.
|
||||
A label selector can be defined to filter on specific `Ingress` objects only.
|
||||
|
||||
See [label-selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors) for details.
|
||||
|
||||
@@ -258,6 +258,40 @@ Value of `kubernetes.io/ingress.class` annotation that identifies Ingress object
|
||||
If the parameter is non-empty, only Ingresses containing an annotation with the same value are processed.
|
||||
Otherwise, Ingresses missing the annotation, having an empty value, or with the value `traefik` are processed.
|
||||
|
||||
!!! info "Kubernetes 1.18+"
|
||||
|
||||
If the Kubernetes cluster version is 1.18+,
|
||||
the new `IngressClass` resource can be leveraged to identify Ingress objects that should be processed.
|
||||
In that case, Traefik will look for an `IngressClass` in the cluster with the controller value equal to *traefik.io/ingress-controller*.
|
||||
|
||||
Please see [this article](https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/) for more information or the example below.
|
||||
|
||||
```yaml tab="IngressClass"
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
name: traefik-lb
|
||||
spec:
|
||||
controller: traefik.io/ingress-controller
|
||||
```
|
||||
|
||||
```yaml tab="Ingress"
|
||||
apiVersion: "networking.k8s.io/v1beta1"
|
||||
kind: "Ingress"
|
||||
metadata:
|
||||
name: "example-ingress"
|
||||
spec:
|
||||
ingressClassName: "traefik-lb"
|
||||
rules:
|
||||
- host: "*.example.com"
|
||||
http:
|
||||
paths:
|
||||
- path: "/example"
|
||||
backend:
|
||||
serviceName: "example-service"
|
||||
servicePort: 80
|
||||
```
|
||||
|
||||
### `ingressEndpoint`
|
||||
|
||||
#### `hostname`
|
||||
@@ -357,18 +391,4 @@ providers:
|
||||
### Further
|
||||
|
||||
If one wants to know more about the various aspects of the Ingress spec that Traefik supports,
|
||||
many examples of Ingresses definitions are located in the tests [data](https://github.com/containous/traefik/tree/v2.2/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository.
|
||||
|
||||
## LetsEncrypt Support with the Ingress Provider
|
||||
|
||||
By design, Traefik is a stateless application, meaning that it only derives its configuration from the environment it runs in, without additional configuration.
|
||||
For this reason, users can run multiple instances of Traefik at the same time to achieve HA, as is a common pattern in the kubernetes ecosystem.
|
||||
|
||||
When using a single instance of Traefik with LetsEncrypt, no issues should be encountered, however this could be a single point of failure.
|
||||
Unfortunately, it is not possible to run multiple instances of Traefik 2.0 with LetsEncrypt enabled, because there is no way to ensure that the correct instance of Traefik will receive the challenge request, and subsequent responses.
|
||||
Previous versions of Traefik used a [KV store](https://docs.traefik.io/v1.7/configuration/acme/#storage) to attempt to achieve this, but due to sub-optimal performance was dropped as a feature in 2.0.
|
||||
|
||||
If you require LetsEncrypt with HA in a kubernetes environment, we recommend using [TraefikEE](https://containo.us/traefikee/) where distributed LetsEncrypt is a supported feature.
|
||||
|
||||
If you are wanting to continue to run Traefik Community Edition, LetsEncrypt HA can be achieved by using a Certificate Controller such as [Cert-Manager](https://docs.cert-manager.io/en/latest/index.html).
|
||||
When using Cert-Manager to manage certificates, it will create secrets in your namespaces that can be referenced as TLS secrets in your [ingress objects](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls).
|
||||
many examples of Ingresses definitions are located in the tests [data](https://github.com/traefik/traefik/tree/v2.3/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository.
|
||||
|
@@ -32,7 +32,7 @@ See also [Marathon user guide](../user-guides/marathon.md).
|
||||
"container": {
|
||||
"type": "DOCKER",
|
||||
"docker": {
|
||||
"image": "containous/whoami",
|
||||
"image": "traefik/whoami",
|
||||
"network": "BRIDGE",
|
||||
"portMappings": [
|
||||
{
|
||||
|
@@ -22,6 +22,106 @@ Even if each provider is different, we can categorize them in four groups:
|
||||
- Annotation based (a separate object, with annotations, defines the characteristics of the container)
|
||||
- File based (the good old configuration file)
|
||||
|
||||
## Provider Namespace
|
||||
|
||||
When you declare certain objects, in Traefik dynamic configuration,
|
||||
such as middleware, service, TLS options or servers transport, they live in its provider's namespace.
|
||||
For example, if you declare a middleware using a Docker label, under the hoods, it will reside in the docker provider namespace.
|
||||
|
||||
If you use multiple providers and wish to reference such an object declared in another provider
|
||||
(aka referencing a cross-provider object, e.g. middleware), then you'll have to append the `@` separator,
|
||||
followed by the provider name to the object name.
|
||||
|
||||
```text
|
||||
<resource-name>@<provider-name>
|
||||
```
|
||||
|
||||
!!! important "Kubernetes Namespace"
|
||||
|
||||
As Kubernetes also has its own notion of namespace,
|
||||
one should not confuse the "provider namespace" with the "kubernetes namespace" of a resource when in the context of a cross-provider usage.
|
||||
In this case, since the definition of a traefik dynamic configuration object is not in kubernetes,
|
||||
specifying a "kubernetes namespace" when referring to the resource does not make any sense,
|
||||
and therefore this specification would be ignored even if present.
|
||||
On the other hand, if you, say, declare a middleware as a Custom Resource in Kubernetes and use the non-crd Ingress objects,
|
||||
you'll have to add the Kubernetes namespace of the middleware to the annotation like this `<middleware-namespace>-<middleware-name>@kubernetescrd`.
|
||||
|
||||
!!! abstract "Referencing a Traefik dynamic configuration object from Another Provider"
|
||||
|
||||
Declaring the add-foo-prefix in the file provider.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[http.middlewares]
|
||||
[http.middlewares.add-foo-prefix.addPrefix]
|
||||
prefix = "/foo"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
http:
|
||||
middlewares:
|
||||
add-foo-prefix:
|
||||
addPrefix:
|
||||
prefix: "/foo"
|
||||
```
|
||||
|
||||
Using the add-foo-prefix middleware from other providers:
|
||||
|
||||
```yaml tab="Docker"
|
||||
your-container: #
|
||||
image: your-docker-image
|
||||
|
||||
labels:
|
||||
# Attach add-foo-prefix@file middleware (declared in file)
|
||||
- "traefik.http.routers.my-container.middlewares=add-foo-prefix@file"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes Ingress Route"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: ingressroutestripprefix
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`example.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: whoami
|
||||
port: 80
|
||||
middlewares:
|
||||
- name: add-foo-prefix@file
|
||||
# namespace: bar
|
||||
# A namespace specification such as above is ignored
|
||||
# when the cross-provider syntax is used.
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes Ingress"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: stripprefix
|
||||
namespace: appspace
|
||||
spec:
|
||||
stripPrefix:
|
||||
prefixes:
|
||||
- /stripit
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress
|
||||
namespace: appspace
|
||||
annotations:
|
||||
# referencing a middleware from Kubernetes CRD provider:
|
||||
# <middleware-namespace>-<middleware-name>@kubernetescrd
|
||||
"traefik.ingress.kubernetes.io/router.middlewares": appspace-stripprefix@kubernetescrd
|
||||
spec:
|
||||
# ... regular ingress definition
|
||||
```
|
||||
|
||||
## Supported Providers
|
||||
|
||||
Below is the list of the currently supported providers in Traefik.
|
||||
@@ -35,14 +135,15 @@ Below is the list of the currently supported providers in Traefik.
|
||||
| [Rancher](./rancher.md) | Orchestrator | Label |
|
||||
| [File](./file.md) | Manual | TOML/YAML format |
|
||||
| [Consul](./consul.md) | KV | KV |
|
||||
| [etcd](./etcd.md) | KV | KV |
|
||||
| [Etcd](./etcd.md) | KV | KV |
|
||||
| [Redis](./redis.md) | KV | KV |
|
||||
| [ZooKeeper](./zookeeper.md) | KV | KV |
|
||||
| [HTTP](./http.md) | Manual | JSON format |
|
||||
|
||||
!!! info "More Providers"
|
||||
|
||||
The current version of Traefik doesn't support (yet) every provider.
|
||||
See the [previous version (v1.7)](https://docs.traefik.io/v1.7/) for more providers.
|
||||
See the [previous version (v1.7)](https://doc.traefik.io/traefik/v1.7/) for more providers.
|
||||
|
||||
### Configuration reload frequency
|
||||
|
||||
|
@@ -91,26 +91,27 @@
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.province=true"
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.serialnumber=true"
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.pem=true"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.average=42"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.burst=42"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.period=42"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.ipstrategy.depth=42"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.ipstrategy.excludedips=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.requestheadername=foobar"
|
||||
- "traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.requesthost=true"
|
||||
- "traefik.http.middlewares.middleware15.redirectregex.permanent=true"
|
||||
- "traefik.http.middlewares.middleware15.redirectregex.regex=foobar"
|
||||
- "traefik.http.middlewares.middleware15.redirectregex.replacement=foobar"
|
||||
- "traefik.http.middlewares.middleware16.redirectscheme.permanent=true"
|
||||
- "traefik.http.middlewares.middleware16.redirectscheme.port=foobar"
|
||||
- "traefik.http.middlewares.middleware16.redirectscheme.scheme=foobar"
|
||||
- "traefik.http.middlewares.middleware17.replacepath.path=foobar"
|
||||
- "traefik.http.middlewares.middleware18.replacepathregex.regex=foobar"
|
||||
- "traefik.http.middlewares.middleware18.replacepathregex.replacement=foobar"
|
||||
- "traefik.http.middlewares.middleware19.retry.attempts=42"
|
||||
- "traefik.http.middlewares.middleware20.stripprefix.forceslash=true"
|
||||
- "traefik.http.middlewares.middleware20.stripprefix.prefixes=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware21.stripprefixregex.regex=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware14.plugin.foobar.foo=bar"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.average=42"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.burst=42"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.period=42"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.ipstrategy.depth=42"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.ipstrategy.excludedips=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.requestheadername=foobar"
|
||||
- "traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.requesthost=true"
|
||||
- "traefik.http.middlewares.middleware16.redirectregex.permanent=true"
|
||||
- "traefik.http.middlewares.middleware16.redirectregex.regex=foobar"
|
||||
- "traefik.http.middlewares.middleware16.redirectregex.replacement=foobar"
|
||||
- "traefik.http.middlewares.middleware17.redirectscheme.permanent=true"
|
||||
- "traefik.http.middlewares.middleware17.redirectscheme.port=foobar"
|
||||
- "traefik.http.middlewares.middleware17.redirectscheme.scheme=foobar"
|
||||
- "traefik.http.middlewares.middleware18.replacepath.path=foobar"
|
||||
- "traefik.http.middlewares.middleware19.replacepathregex.regex=foobar"
|
||||
- "traefik.http.middlewares.middleware19.replacepathregex.replacement=foobar"
|
||||
- "traefik.http.middlewares.middleware20.retry.attempts=42"
|
||||
- "traefik.http.middlewares.middleware21.stripprefix.forceslash=true"
|
||||
- "traefik.http.middlewares.middleware21.stripprefix.prefixes=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware22.stripprefixregex.regex=foobar, foobar"
|
||||
- "traefik.http.routers.router0.entrypoints=foobar, foobar"
|
||||
- "traefik.http.routers.router0.middlewares=foobar, foobar"
|
||||
- "traefik.http.routers.router0.priority=42"
|
||||
@@ -147,11 +148,11 @@
|
||||
- "traefik.http.services.service01.loadbalancer.healthcheck.followredirects=true"
|
||||
- "traefik.http.services.service01.loadbalancer.passhostheader=true"
|
||||
- "traefik.http.services.service01.loadbalancer.responseforwarding.flushinterval=foobar"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky=true"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky.cookie=true"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky.cookie.httponly=true"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky.cookie.name=foobar"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky.cookie.secure=true"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky.cookie.samesite=foobar"
|
||||
- "traefik.http.services.service01.loadbalancer.sticky.cookie.secure=true"
|
||||
- "traefik.http.services.service01.loadbalancer.server.port=foobar"
|
||||
- "traefik.http.services.service01.loadbalancer.server.scheme=foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.entrypoints=foobar, foobar"
|
||||
|
11
docs/content/reference/dynamic-configuration/ecs.md
Normal file
11
docs/content/reference/dynamic-configuration/ecs.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# ECS Configuration Reference
|
||||
|
||||
Dynamic configuration with ECS provider
|
||||
{: .subtitle }
|
||||
|
||||
The labels are case insensitive.
|
||||
|
||||
```yaml
|
||||
--8<-- "content/reference/dynamic-configuration/ecs.yml"
|
||||
--8<-- "content/reference/dynamic-configuration/docker-labels.yml"
|
||||
```
|
1
docs/content/reference/dynamic-configuration/ecs.yml
Normal file
1
docs/content/reference/dynamic-configuration/ecs.yml
Normal file
@@ -0,0 +1 @@
|
||||
- "traefik.enable=true"
|
@@ -223,42 +223,46 @@
|
||||
serialNumber = true
|
||||
domainComponent = true
|
||||
[http.middlewares.Middleware14]
|
||||
[http.middlewares.Middleware14.rateLimit]
|
||||
[http.middlewares.Middleware14.plugin]
|
||||
[http.middlewares.Middleware14.plugin.PluginConf]
|
||||
foo = "bar"
|
||||
[http.middlewares.Middleware15]
|
||||
[http.middlewares.Middleware15.rateLimit]
|
||||
average = 42
|
||||
period = 42
|
||||
burst = 42
|
||||
[http.middlewares.Middleware14.rateLimit.sourceCriterion]
|
||||
[http.middlewares.Middleware15.rateLimit.sourceCriterion]
|
||||
requestHeaderName = "foobar"
|
||||
requestHost = true
|
||||
[http.middlewares.Middleware14.rateLimit.sourceCriterion.ipStrategy]
|
||||
[http.middlewares.Middleware15.rateLimit.sourceCriterion.ipStrategy]
|
||||
depth = 42
|
||||
excludedIPs = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware15]
|
||||
[http.middlewares.Middleware15.redirectRegex]
|
||||
[http.middlewares.Middleware16]
|
||||
[http.middlewares.Middleware16.redirectRegex]
|
||||
regex = "foobar"
|
||||
replacement = "foobar"
|
||||
permanent = true
|
||||
[http.middlewares.Middleware16]
|
||||
[http.middlewares.Middleware16.redirectScheme]
|
||||
[http.middlewares.Middleware17]
|
||||
[http.middlewares.Middleware17.redirectScheme]
|
||||
scheme = "foobar"
|
||||
port = "foobar"
|
||||
permanent = true
|
||||
[http.middlewares.Middleware17]
|
||||
[http.middlewares.Middleware17.replacePath]
|
||||
path = "foobar"
|
||||
[http.middlewares.Middleware18]
|
||||
[http.middlewares.Middleware18.replacePathRegex]
|
||||
[http.middlewares.Middleware18.replacePath]
|
||||
path = "foobar"
|
||||
[http.middlewares.Middleware19]
|
||||
[http.middlewares.Middleware19.replacePathRegex]
|
||||
regex = "foobar"
|
||||
replacement = "foobar"
|
||||
[http.middlewares.Middleware19]
|
||||
[http.middlewares.Middleware19.retry]
|
||||
attempts = 42
|
||||
[http.middlewares.Middleware20]
|
||||
[http.middlewares.Middleware20.stripPrefix]
|
||||
[http.middlewares.Middleware20.retry]
|
||||
attempts = 42
|
||||
[http.middlewares.Middleware21]
|
||||
[http.middlewares.Middleware21.stripPrefix]
|
||||
prefixes = ["foobar", "foobar"]
|
||||
forceSlash = true
|
||||
[http.middlewares.Middleware21]
|
||||
[http.middlewares.Middleware21.stripPrefixRegex]
|
||||
[http.middlewares.Middleware22]
|
||||
[http.middlewares.Middleware22.stripPrefixRegex]
|
||||
regex = ["foobar", "foobar"]
|
||||
|
||||
[tcp]
|
||||
|
@@ -222,7 +222,7 @@ http:
|
||||
inFlightReq:
|
||||
amount: 42
|
||||
sourceCriterion:
|
||||
ipstrategy:
|
||||
ipStrategy:
|
||||
depth: 42
|
||||
excludedIPs:
|
||||
- foobar
|
||||
@@ -254,45 +254,49 @@ http:
|
||||
domainComponent: true
|
||||
serialNumber: true
|
||||
Middleware14:
|
||||
plugin:
|
||||
PluginConf:
|
||||
foo: bar
|
||||
Middleware15:
|
||||
rateLimit:
|
||||
average: 42
|
||||
period: 42
|
||||
burst: 42
|
||||
sourceCriterion:
|
||||
ipstrategy:
|
||||
ipStrategy:
|
||||
depth: 42
|
||||
excludedIPs:
|
||||
- foobar
|
||||
- foobar
|
||||
requestHeaderName: foobar
|
||||
requestHost: true
|
||||
Middleware15:
|
||||
Middleware16:
|
||||
redirectRegex:
|
||||
regex: foobar
|
||||
replacement: foobar
|
||||
permanent: true
|
||||
Middleware16:
|
||||
Middleware17:
|
||||
redirectScheme:
|
||||
scheme: foobar
|
||||
port: foobar
|
||||
permanent: true
|
||||
Middleware17:
|
||||
Middleware18:
|
||||
replacePath:
|
||||
path: foobar
|
||||
Middleware18:
|
||||
Middleware19:
|
||||
replacePathRegex:
|
||||
regex: foobar
|
||||
replacement: foobar
|
||||
Middleware19:
|
||||
Middleware20:
|
||||
retry:
|
||||
attempts: 42
|
||||
Middleware20:
|
||||
Middleware21:
|
||||
stripPrefix:
|
||||
prefixes:
|
||||
- foobar
|
||||
- foobar
|
||||
forceSlash: true
|
||||
Middleware21:
|
||||
Middleware22:
|
||||
stripPrefixRegex:
|
||||
regex:
|
||||
- foobar
|
||||
|
@@ -16,8 +16,10 @@ rules:
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
- ingressclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
|
@@ -91,21 +91,11 @@ spec:
|
||||
services:
|
||||
- name: s1
|
||||
port: 80
|
||||
healthCheck:
|
||||
path: /health
|
||||
host: baz.com
|
||||
intervalSeconds: 7
|
||||
timeoutSeconds: 60
|
||||
# strategy defines the load balancing strategy between the servers. It defaults
|
||||
# to Round Robin, and for now only Round Robin is supported anyway.
|
||||
strategy: RoundRobin
|
||||
- name: s2
|
||||
port: 433
|
||||
healthCheck:
|
||||
path: /health
|
||||
host: baz.com
|
||||
intervalSeconds: 7
|
||||
timeoutSeconds: 60
|
||||
- match: PathPrefix(`/misc`)
|
||||
services:
|
||||
- name: s3
|
||||
@@ -133,7 +123,7 @@ spec:
|
||||
tls:
|
||||
secretName: supersecret
|
||||
options:
|
||||
name: myTLSOption
|
||||
name: my-tls-option
|
||||
namespace: default
|
||||
|
||||
---
|
||||
@@ -155,7 +145,7 @@ spec:
|
||||
secretName: foosecret
|
||||
passthrough: false
|
||||
options:
|
||||
name: myTLSOption
|
||||
name: my-tls-option
|
||||
namespace: default
|
||||
|
||||
---
|
||||
|
@@ -105,29 +105,30 @@
|
||||
| `traefik/http/middlewares/Middleware13/passTLSClientCert/info/subject/province` | `true` |
|
||||
| `traefik/http/middlewares/Middleware13/passTLSClientCert/info/subject/serialNumber` | `true` |
|
||||
| `traefik/http/middlewares/Middleware13/passTLSClientCert/pem` | `true` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/average` | `42` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/burst` | `42` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/period` | `42` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/sourceCriterion/ipStrategy/depth` | `42` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/sourceCriterion/ipStrategy/excludedIPs/0` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/sourceCriterion/ipStrategy/excludedIPs/1` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/sourceCriterion/requestHeaderName` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware14/rateLimit/sourceCriterion/requestHost` | `true` |
|
||||
| `traefik/http/middlewares/Middleware15/redirectRegex/permanent` | `true` |
|
||||
| `traefik/http/middlewares/Middleware15/redirectRegex/regex` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware15/redirectRegex/replacement` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware16/redirectScheme/permanent` | `true` |
|
||||
| `traefik/http/middlewares/Middleware16/redirectScheme/port` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware16/redirectScheme/scheme` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware17/replacePath/path` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware18/replacePathRegex/regex` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware18/replacePathRegex/replacement` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware19/retry/attempts` | `42` |
|
||||
| `traefik/http/middlewares/Middleware20/stripPrefix/forceSlash` | `true` |
|
||||
| `traefik/http/middlewares/Middleware20/stripPrefix/prefixes/0` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware20/stripPrefix/prefixes/1` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware21/stripPrefixRegex/regex/0` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware21/stripPrefixRegex/regex/1` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware14/plugin/PluginConf/foo` | `bar` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/average` | `42` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/burst` | `42` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/period` | `42` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/sourceCriterion/ipStrategy/depth` | `42` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/sourceCriterion/ipStrategy/excludedIPs/0` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/sourceCriterion/ipStrategy/excludedIPs/1` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/sourceCriterion/requestHeaderName` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware15/rateLimit/sourceCriterion/requestHost` | `true` |
|
||||
| `traefik/http/middlewares/Middleware16/redirectRegex/permanent` | `true` |
|
||||
| `traefik/http/middlewares/Middleware16/redirectRegex/regex` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware16/redirectRegex/replacement` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware17/redirectScheme/permanent` | `true` |
|
||||
| `traefik/http/middlewares/Middleware17/redirectScheme/port` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware17/redirectScheme/scheme` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware18/replacePath/path` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware19/replacePathRegex/regex` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware19/replacePathRegex/replacement` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware20/retry/attempts` | `42` |
|
||||
| `traefik/http/middlewares/Middleware21/stripPrefix/forceSlash` | `true` |
|
||||
| `traefik/http/middlewares/Middleware21/stripPrefix/prefixes/0` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware21/stripPrefix/prefixes/1` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware22/stripPrefixRegex/regex/0` | `foobar` |
|
||||
| `traefik/http/middlewares/Middleware22/stripPrefixRegex/regex/1` | `foobar` |
|
||||
| `traefik/http/routers/Router0/entryPoints/0` | `foobar` |
|
||||
| `traefik/http/routers/Router0/entryPoints/1` | `foobar` |
|
||||
| `traefik/http/routers/Router0/middlewares/0` | `foobar` |
|
||||
|
@@ -91,26 +91,27 @@
|
||||
"traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.province": "true",
|
||||
"traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.serialnumber": "true",
|
||||
"traefik.http.middlewares.middleware13.passtlsclientcert.pem": "true",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.average": "42",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.burst": "42",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.period": "42",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.ipstrategy.depth": "42",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.ipstrategy.excludedips": "foobar, foobar",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.requestheadername": "foobar",
|
||||
"traefik.http.middlewares.middleware14.ratelimit.sourcecriterion.requesthost": "true",
|
||||
"traefik.http.middlewares.middleware15.redirectregex.permanent": "true",
|
||||
"traefik.http.middlewares.middleware15.redirectregex.regex": "foobar",
|
||||
"traefik.http.middlewares.middleware15.redirectregex.replacement": "foobar",
|
||||
"traefik.http.middlewares.middleware16.redirectscheme.permanent": "true",
|
||||
"traefik.http.middlewares.middleware16.redirectscheme.port": "foobar",
|
||||
"traefik.http.middlewares.middleware16.redirectscheme.scheme": "foobar",
|
||||
"traefik.http.middlewares.middleware17.replacepath.path": "foobar",
|
||||
"traefik.http.middlewares.middleware18.replacepathregex.regex": "foobar",
|
||||
"traefik.http.middlewares.middleware18.replacepathregex.replacement": "foobar",
|
||||
"traefik.http.middlewares.middleware19.retry.attempts": "42",
|
||||
"traefik.http.middlewares.middleware20.stripprefix.forceslash": "true",
|
||||
"traefik.http.middlewares.middleware20.stripprefix.prefixes": "foobar, foobar",
|
||||
"traefik.http.middlewares.middleware21.stripprefixregex.regex": "foobar, foobar",
|
||||
"traefik.http.middlewares.middleware14.plugin.foobar.foo": "bar",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.average": "42",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.burst": "42",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.period": "42",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.ipstrategy.depth": "42",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.ipstrategy.excludedips": "foobar, foobar",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.requestheadername": "foobar",
|
||||
"traefik.http.middlewares.middleware15.ratelimit.sourcecriterion.requesthost": "true",
|
||||
"traefik.http.middlewares.middleware16.redirectregex.permanent": "true",
|
||||
"traefik.http.middlewares.middleware16.redirectregex.regex": "foobar",
|
||||
"traefik.http.middlewares.middleware16.redirectregex.replacement": "foobar",
|
||||
"traefik.http.middlewares.middleware17.redirectscheme.permanent": "true",
|
||||
"traefik.http.middlewares.middleware17.redirectscheme.port": "foobar",
|
||||
"traefik.http.middlewares.middleware17.redirectscheme.scheme": "foobar",
|
||||
"traefik.http.middlewares.middleware18.replacepath.path": "foobar",
|
||||
"traefik.http.middlewares.middleware19.replacepathregex.regex": "foobar",
|
||||
"traefik.http.middlewares.middleware19.replacepathregex.replacement": "foobar",
|
||||
"traefik.http.middlewares.middleware20.retry.attempts": "42",
|
||||
"traefik.http.middlewares.middleware21.stripprefix.forceslash": "true",
|
||||
"traefik.http.middlewares.middleware21.stripprefix.prefixes": "foobar, foobar",
|
||||
"traefik.http.middlewares.middleware22.stripprefixregex.regex": "foobar, foobar",
|
||||
"traefik.http.routers.router0.entrypoints": "foobar, foobar",
|
||||
"traefik.http.routers.router0.middlewares": "foobar, foobar",
|
||||
"traefik.http.routers.router0.priority": "42",
|
||||
@@ -145,10 +146,11 @@
|
||||
"traefik.http.services.service01.loadbalancer.healthcheck.followredirects": "true",
|
||||
"traefik.http.services.service01.loadbalancer.passhostheader": "true",
|
||||
"traefik.http.services.service01.loadbalancer.responseforwarding.flushinterval": "foobar",
|
||||
"traefik.http.services.service01.loadbalancer.sticky.cookie": "true",
|
||||
"traefik.http.services.service01.loadbalancer.sticky.cookie.httponly": "true",
|
||||
"traefik.http.services.service01.loadbalancer.sticky.cookie.name": "foobar",
|
||||
"traefik.http.services.service01.loadbalancer.sticky.cookie.secure": "true",
|
||||
"traefik.http.services.service01.loadbalancer.sticky.cookie.samesite": "foobar",
|
||||
"traefik.http.services.service01.loadbalancer.sticky.cookie.secure": "true",
|
||||
"traefik.http.services.service01.loadbalancer.server.port": "foobar",
|
||||
"traefik.http.services.service01.loadbalancer.server.scheme": "foobar",
|
||||
"traefik.tcp.routers.tcprouter0.entrypoints": "foobar, foobar",
|
||||
|
@@ -81,6 +81,9 @@ HTTP challenge EntryPoint
|
||||
`--certificatesresolvers.<name>.acme.keytype`:
|
||||
KeyType used for generating certificate private key. Allow value 'EC256', 'EC384', 'RSA2048', 'RSA4096', 'RSA8192'. (Default: ```RSA4096```)
|
||||
|
||||
`--certificatesresolvers.<name>.acme.preferredchain`:
|
||||
Preferred chain to use.
|
||||
|
||||
`--certificatesresolvers.<name>.acme.storage`:
|
||||
Storage to use. (Default: ```acme.json```)
|
||||
|
||||
@@ -106,13 +109,13 @@ HTTP configuration.
|
||||
Default middlewares for the routers linked to the entry point.
|
||||
|
||||
`--entrypoints.<name>.http.redirections.entrypoint.permanent`:
|
||||
Applied a permanent redirection. Defaults to true. (Default: ```true```)
|
||||
Applies a permanent redirection. (Default: ```true```)
|
||||
|
||||
`--entrypoints.<name>.http.redirections.entrypoint.priority`:
|
||||
Priority of the generated router. Defaults to 1. (Default: ```1```)
|
||||
Priority of the generated router. (Default: ```2147483647```)
|
||||
|
||||
`--entrypoints.<name>.http.redirections.entrypoint.scheme`:
|
||||
Scheme used for the redirection. Defaults to https. (Default: ```https```)
|
||||
Scheme used for the redirection. (Default: ```https```)
|
||||
|
||||
`--entrypoints.<name>.http.redirections.entrypoint.to`:
|
||||
Targeted entry point of the redirection.
|
||||
@@ -159,6 +162,18 @@ ReadTimeout is the maximum duration for reading the entire request, including th
|
||||
`--entrypoints.<name>.transport.respondingtimeouts.writetimeout`:
|
||||
WriteTimeout is the maximum duration before timing out writes of the response. If zero, no timeout is set. (Default: ```0```)
|
||||
|
||||
`--experimental.devplugin.gopath`:
|
||||
plugin's GOPATH.
|
||||
|
||||
`--experimental.devplugin.modulename`:
|
||||
plugin's module name.
|
||||
|
||||
`--experimental.plugins.<name>.modulename`:
|
||||
plugin's module name.
|
||||
|
||||
`--experimental.plugins.<name>.version`:
|
||||
plugin's version.
|
||||
|
||||
`--global.checknewversion`:
|
||||
Periodically check if a new version has been released. (Default: ```false```)
|
||||
|
||||
@@ -270,6 +285,9 @@ Prefix to use for metrics collection. (Default: ```traefik```)
|
||||
`--metrics.statsd.pushinterval`:
|
||||
StatsD push interval. (Default: ```10```)
|
||||
|
||||
`--pilot.token`:
|
||||
Traefik Pilot token.
|
||||
|
||||
`--ping`:
|
||||
Enable ping. (Default: ```false```)
|
||||
|
||||
@@ -279,6 +297,9 @@ EntryPoint (Default: ```traefik```)
|
||||
`--ping.manualrouting`:
|
||||
Manual routing (Default: ```false```)
|
||||
|
||||
`--ping.terminatingstatuscode`:
|
||||
Terminating status code (Default: ```503```)
|
||||
|
||||
`--providers.consul`:
|
||||
Enable Consul backend with default settings. (Default: ```false```)
|
||||
|
||||
@@ -309,6 +330,9 @@ TLS key
|
||||
`--providers.consul.username`:
|
||||
KV Username
|
||||
|
||||
`--providers.consulcatalog`:
|
||||
Enable ConsulCatalog backend with default settings. (Default: ```false```)
|
||||
|
||||
`--providers.consulcatalog.cache`:
|
||||
Use local agent caching for catalog reads. (Default: ```false```)
|
||||
|
||||
@@ -319,7 +343,7 @@ Constraints is an expression that Traefik matches against the container's labels
|
||||
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)
|
||||
|
||||
`--providers.consulcatalog.endpoint.address`:
|
||||
The address of the Consul server (Default: ```http://127.0.0.1:8500```)
|
||||
The address of the Consul server (Default: ```127.0.0.1:8500```)
|
||||
|
||||
`--providers.consulcatalog.endpoint.datacenter`:
|
||||
Data center to use. If not provided, the default agent data center is used
|
||||
@@ -414,6 +438,36 @@ Use the ip address from the bound port, rather than from the inner network. (Def
|
||||
`--providers.docker.watch`:
|
||||
Watch Docker Swarm events. (Default: ```true```)
|
||||
|
||||
`--providers.ecs`:
|
||||
Enable AWS ECS backend with default settings. (Default: ```false```)
|
||||
|
||||
`--providers.ecs.accesskeyid`:
|
||||
The AWS credentials access key to use for making requests
|
||||
|
||||
`--providers.ecs.autodiscoverclusters`:
|
||||
Auto discover cluster (Default: ```false```)
|
||||
|
||||
`--providers.ecs.clusters`:
|
||||
ECS Clusters name (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.
|
||||
|
||||
`--providers.ecs.defaultrule`:
|
||||
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)
|
||||
|
||||
`--providers.ecs.exposedbydefault`:
|
||||
Expose services by default (Default: ```true```)
|
||||
|
||||
`--providers.ecs.refreshseconds`:
|
||||
Polling interval (in seconds) (Default: ```15```)
|
||||
|
||||
`--providers.ecs.region`:
|
||||
The AWS region to use for requests
|
||||
|
||||
`--providers.ecs.secretaccesskey`:
|
||||
The AWS credentials access key to use for making requests
|
||||
|
||||
`--providers.etcd`:
|
||||
Enable Etcd backend with default settings. (Default: ```false```)
|
||||
|
||||
@@ -456,9 +510,39 @@ Load dynamic configuration from a file.
|
||||
`--providers.file.watch`:
|
||||
Watch provider. (Default: ```true```)
|
||||
|
||||
`--providers.http`:
|
||||
Enable HTTP backend with default settings. (Default: ```false```)
|
||||
|
||||
`--providers.http.endpoint`:
|
||||
Load configuration from this endpoint.
|
||||
|
||||
`--providers.http.pollinterval`:
|
||||
Polling interval for endpoint. (Default: ```5```)
|
||||
|
||||
`--providers.http.polltimeout`:
|
||||
Polling timeout for endpoint. (Default: ```5```)
|
||||
|
||||
`--providers.http.tls.ca`:
|
||||
TLS CA
|
||||
|
||||
`--providers.http.tls.caoptional`:
|
||||
TLS CA.Optional (Default: ```false```)
|
||||
|
||||
`--providers.http.tls.cert`:
|
||||
TLS cert
|
||||
|
||||
`--providers.http.tls.insecureskipverify`:
|
||||
TLS insecure skip verify (Default: ```false```)
|
||||
|
||||
`--providers.http.tls.key`:
|
||||
TLS key
|
||||
|
||||
`--providers.kubernetescrd`:
|
||||
Enable Kubernetes backend with default settings. (Default: ```false```)
|
||||
|
||||
`--providers.kubernetescrd.allowcrossnamespace`:
|
||||
Allow cross namespace resource reference. (Default: ```true```)
|
||||
|
||||
`--providers.kubernetescrd.certauthfilepath`:
|
||||
Kubernetes certificate authority file path (not needed for in-cluster client).
|
||||
|
||||
@@ -786,6 +870,9 @@ Password for basic http authentication when sending spans to jaeger-collector.
|
||||
`--tracing.jaeger.collector.user`:
|
||||
User for basic http authentication when sending spans to jaeger-collector.
|
||||
|
||||
`--tracing.jaeger.disableattemptreconnecting`:
|
||||
Disable the periodic re-resolution of the agent's hostname and reconnection if there was a change. (Default: ```true```)
|
||||
|
||||
`--tracing.jaeger.gen128bit`:
|
||||
Generate 128 bit span IDs. (Default: ```false```)
|
||||
|
||||
|
@@ -81,6 +81,9 @@ HTTP challenge EntryPoint
|
||||
`TRAEFIK_CERTIFICATESRESOLVERS_<NAME>_ACME_KEYTYPE`:
|
||||
KeyType used for generating certificate private key. Allow value 'EC256', 'EC384', 'RSA2048', 'RSA4096', 'RSA8192'. (Default: ```RSA4096```)
|
||||
|
||||
`TRAEFIK_CERTIFICATESRESOLVERS_<NAME>_ACME_PREFERREDCHAIN`:
|
||||
Preferred chain to use.
|
||||
|
||||
`TRAEFIK_CERTIFICATESRESOLVERS_<NAME>_ACME_STORAGE`:
|
||||
Storage to use. (Default: ```acme.json```)
|
||||
|
||||
@@ -106,13 +109,13 @@ HTTP configuration.
|
||||
Default middlewares for the routers linked to the entry point.
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_PERMANENT`:
|
||||
Applied a permanent redirection. Defaults to true. (Default: ```true```)
|
||||
Applies a permanent redirection. (Default: ```true```)
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_PRIORITY`:
|
||||
Priority of the generated router. Defaults to 1. (Default: ```1```)
|
||||
Priority of the generated router. (Default: ```2147483647```)
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_SCHEME`:
|
||||
Scheme used for the redirection. Defaults to https. (Default: ```https```)
|
||||
Scheme used for the redirection. (Default: ```https```)
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_TO`:
|
||||
Targeted entry point of the redirection.
|
||||
@@ -159,6 +162,18 @@ ReadTimeout is the maximum duration for reading the entire request, including th
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_TRANSPORT_RESPONDINGTIMEOUTS_WRITETIMEOUT`:
|
||||
WriteTimeout is the maximum duration before timing out writes of the response. If zero, no timeout is set. (Default: ```0```)
|
||||
|
||||
`TRAEFIK_EXPERIMENTAL_DEVPLUGIN_GOPATH`:
|
||||
plugin's GOPATH.
|
||||
|
||||
`TRAEFIK_EXPERIMENTAL_DEVPLUGIN_MODULENAME`:
|
||||
plugin's module name.
|
||||
|
||||
`TRAEFIK_EXPERIMENTAL_PLUGINS_<NAME>_MODULENAME`:
|
||||
plugin's module name.
|
||||
|
||||
`TRAEFIK_EXPERIMENTAL_PLUGINS_<NAME>_VERSION`:
|
||||
plugin's version.
|
||||
|
||||
`TRAEFIK_GLOBAL_CHECKNEWVERSION`:
|
||||
Periodically check if a new version has been released. (Default: ```false```)
|
||||
|
||||
@@ -270,6 +285,9 @@ Prefix to use for metrics collection. (Default: ```traefik```)
|
||||
`TRAEFIK_METRICS_STATSD_PUSHINTERVAL`:
|
||||
StatsD push interval. (Default: ```10```)
|
||||
|
||||
`TRAEFIK_PILOT_TOKEN`:
|
||||
Traefik Pilot token.
|
||||
|
||||
`TRAEFIK_PING`:
|
||||
Enable ping. (Default: ```false```)
|
||||
|
||||
@@ -279,9 +297,15 @@ EntryPoint (Default: ```traefik```)
|
||||
`TRAEFIK_PING_MANUALROUTING`:
|
||||
Manual routing (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PING_TERMINATINGSTATUSCODE`:
|
||||
Terminating status code (Default: ```503```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_CONSUL`:
|
||||
Enable Consul backend with default settings. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_CONSULCATALOG`:
|
||||
Enable ConsulCatalog backend with default settings. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_CONSULCATALOG_CACHE`:
|
||||
Use local agent caching for catalog reads. (Default: ```false```)
|
||||
|
||||
@@ -292,7 +316,7 @@ Constraints is an expression that Traefik matches against the container's labels
|
||||
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_ADDRESS`:
|
||||
The address of the Consul server (Default: ```http://127.0.0.1:8500```)
|
||||
The address of the Consul server (Default: ```127.0.0.1:8500```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_DATACENTER`:
|
||||
Data center to use. If not provided, the default agent data center is used
|
||||
@@ -414,6 +438,36 @@ Use the ip address from the bound port, rather than from the inner network. (Def
|
||||
`TRAEFIK_PROVIDERS_DOCKER_WATCH`:
|
||||
Watch Docker Swarm events. (Default: ```true```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS`:
|
||||
Enable AWS ECS backend with default settings. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_ACCESSKEYID`:
|
||||
The AWS credentials access key to use for making requests
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_AUTODISCOVERCLUSTERS`:
|
||||
Auto discover cluster (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_CLUSTERS`:
|
||||
ECS Clusters name (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.
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_DEFAULTRULE`:
|
||||
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_EXPOSEDBYDEFAULT`:
|
||||
Expose services by default (Default: ```true```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_REFRESHSECONDS`:
|
||||
Polling interval (in seconds) (Default: ```15```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_REGION`:
|
||||
The AWS region to use for requests
|
||||
|
||||
`TRAEFIK_PROVIDERS_ECS_SECRETACCESSKEY`:
|
||||
The AWS credentials access key to use for making requests
|
||||
|
||||
`TRAEFIK_PROVIDERS_ETCD`:
|
||||
Enable Etcd backend with default settings. (Default: ```false```)
|
||||
|
||||
@@ -456,9 +510,39 @@ Load dynamic configuration from a file.
|
||||
`TRAEFIK_PROVIDERS_FILE_WATCH`:
|
||||
Watch provider. (Default: ```true```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP`:
|
||||
Enable HTTP backend with default settings. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_ENDPOINT`:
|
||||
Load configuration from this endpoint.
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_POLLINTERVAL`:
|
||||
Polling interval for endpoint. (Default: ```5```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_POLLTIMEOUT`:
|
||||
Polling timeout for endpoint. (Default: ```5```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_TLS_CA`:
|
||||
TLS CA
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_TLS_CAOPTIONAL`:
|
||||
TLS CA.Optional (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_TLS_CERT`:
|
||||
TLS cert
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_TLS_INSECURESKIPVERIFY`:
|
||||
TLS insecure skip verify (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_HTTP_TLS_KEY`:
|
||||
TLS key
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESCRD`:
|
||||
Enable Kubernetes backend with default settings. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESCRD_ALLOWCROSSNAMESPACE`:
|
||||
Allow cross namespace resource reference. (Default: ```true```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESCRD_CERTAUTHFILEPATH`:
|
||||
Kubernetes certificate authority file path (not needed for in-cluster client).
|
||||
|
||||
@@ -786,6 +870,9 @@ Password for basic http authentication when sending spans to jaeger-collector.
|
||||
`TRAEFIK_TRACING_JAEGER_COLLECTOR_USER`:
|
||||
User for basic http authentication when sending spans to jaeger-collector.
|
||||
|
||||
`TRAEFIK_TRACING_JAEGER_DISABLEATTEMPTRECONNECTING`:
|
||||
Disable the periodic re-resolution of the agent's hostname and reconnection if there was a change. (Default: ```true```)
|
||||
|
||||
`TRAEFIK_TRACING_JAEGER_GEN128BIT`:
|
||||
Generate 128 bit span IDs. (Default: ```false```)
|
||||
|
||||
|
@@ -113,6 +113,7 @@
|
||||
certAuthFilePath = "foobar"
|
||||
disablePassHostHeaders = true
|
||||
namespaces = ["foobar", "foobar"]
|
||||
allowCrossNamespace = true
|
||||
labelSelector = "foobar"
|
||||
ingressClass = "foobar"
|
||||
throttleDuration = 42
|
||||
@@ -151,8 +152,18 @@
|
||||
[providers.consulCatalog.endpoint.httpAuth]
|
||||
username = "foobar"
|
||||
password = "foobar"
|
||||
[providers.ecs]
|
||||
constraints = "foobar"
|
||||
exposedByDefault = true
|
||||
refreshSeconds = 42
|
||||
defaultRule = "foobar"
|
||||
clusters = ["foobar", "foobar"]
|
||||
autoDiscoverClusters = true
|
||||
region = "foobar"
|
||||
accessKeyID = "foobar"
|
||||
secretAccessKey = "foobar"
|
||||
[providers.consul]
|
||||
rootKey = "traefik"
|
||||
rootKey = "foobar"
|
||||
endpoints = ["foobar", "foobar"]
|
||||
username = "foobar"
|
||||
password = "foobar"
|
||||
@@ -163,7 +174,7 @@
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[providers.etcd]
|
||||
rootKey = "traefik"
|
||||
rootKey = "foobar"
|
||||
endpoints = ["foobar", "foobar"]
|
||||
username = "foobar"
|
||||
password = "foobar"
|
||||
@@ -174,7 +185,7 @@
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[providers.zooKeeper]
|
||||
rootKey = "traefik"
|
||||
rootKey = "foobar"
|
||||
endpoints = ["foobar", "foobar"]
|
||||
username = "foobar"
|
||||
password = "foobar"
|
||||
@@ -185,7 +196,7 @@
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[providers.redis]
|
||||
rootKey = "traefik"
|
||||
rootKey = "foobar"
|
||||
endpoints = ["foobar", "foobar"]
|
||||
username = "foobar"
|
||||
password = "foobar"
|
||||
@@ -195,6 +206,16 @@
|
||||
cert = "foobar"
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[providers.http]
|
||||
endpoint = "foobar"
|
||||
pollInterval = 42
|
||||
pollTimeout = 42
|
||||
[providers.http.tls]
|
||||
ca = "foobar"
|
||||
caOptional = true
|
||||
cert = "foobar"
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
|
||||
[api]
|
||||
insecure = true
|
||||
@@ -230,9 +251,13 @@
|
||||
addEntryPointsLabels = true
|
||||
addServicesLabels = true
|
||||
|
||||
[pilot]
|
||||
token = "foobar"
|
||||
|
||||
[ping]
|
||||
entryPoint = "foobar"
|
||||
manualRouting = true
|
||||
terminatingStatusCode = 42
|
||||
|
||||
[log]
|
||||
level = "foobar"
|
||||
@@ -269,6 +294,7 @@
|
||||
gen128Bit = true
|
||||
propagation = "foobar"
|
||||
traceContextHeaderName = "foobar"
|
||||
disableAttemptReconnecting = true
|
||||
[tracing.jaeger.collector]
|
||||
endpoint = "foobar"
|
||||
user = "foobar"
|
||||
@@ -314,6 +340,7 @@
|
||||
[certificatesResolvers.CertificateResolver0.acme]
|
||||
email = "foobar"
|
||||
caServer = "foobar"
|
||||
preferredChain = "foobar"
|
||||
storage = "foobar"
|
||||
keyType = "foobar"
|
||||
[certificatesResolvers.CertificateResolver0.acme.dnsChallenge]
|
||||
@@ -328,6 +355,7 @@
|
||||
[certificatesResolvers.CertificateResolver1.acme]
|
||||
email = "foobar"
|
||||
caServer = "foobar"
|
||||
preferredChain = "foobar"
|
||||
storage = "foobar"
|
||||
keyType = "foobar"
|
||||
[certificatesResolvers.CertificateResolver1.acme.dnsChallenge]
|
||||
@@ -338,3 +366,15 @@
|
||||
[certificatesResolvers.CertificateResolver1.acme.httpChallenge]
|
||||
entryPoint = "foobar"
|
||||
[certificatesResolvers.CertificateResolver1.acme.tlsChallenge]
|
||||
|
||||
[experimental]
|
||||
[experimental.plugins]
|
||||
[experimental.plugins.Descriptor0]
|
||||
moduleName = "foobar"
|
||||
version = "foobar"
|
||||
[experimental.plugins.Descriptor1]
|
||||
moduleName = "foobar"
|
||||
version = "foobar"
|
||||
[experimental.devPlugin]
|
||||
goPath = "foobar"
|
||||
moduleName = "foobar"
|
||||
|
@@ -123,9 +123,10 @@ providers:
|
||||
namespaces:
|
||||
- foobar
|
||||
- foobar
|
||||
allowCrossNamespace: true
|
||||
labelSelector: foobar
|
||||
ingressClass: foobar
|
||||
throttleDuration: 10s
|
||||
throttleDuration: 42s
|
||||
rest:
|
||||
insecure: true
|
||||
rancher:
|
||||
@@ -161,8 +162,20 @@ providers:
|
||||
httpAuth:
|
||||
username: foobar
|
||||
password: foobar
|
||||
ecs:
|
||||
constraints: foobar
|
||||
exposedByDefault: true
|
||||
refreshSeconds: 42
|
||||
defaultRule: foobar
|
||||
clusters:
|
||||
- foobar
|
||||
- foobar
|
||||
autoDiscoverClusters: true
|
||||
region: foobar
|
||||
accessKeyID: foobar
|
||||
secretAccessKey: foobar
|
||||
consul:
|
||||
rootKey: traefik
|
||||
rootKey: foobar
|
||||
endpoints:
|
||||
- foobar
|
||||
- foobar
|
||||
@@ -175,7 +188,7 @@ providers:
|
||||
key: foobar
|
||||
insecureSkipVerify: true
|
||||
etcd:
|
||||
rootKey: traefik
|
||||
rootKey: foobar
|
||||
endpoints:
|
||||
- foobar
|
||||
- foobar
|
||||
@@ -188,10 +201,10 @@ providers:
|
||||
key: foobar
|
||||
insecureSkipVerify: true
|
||||
zooKeeper:
|
||||
rootKey: traefik
|
||||
rootKey: foobar
|
||||
endpoints:
|
||||
- foobar
|
||||
- foobar
|
||||
- foobar
|
||||
- foobar
|
||||
username: foobar
|
||||
password: foobar
|
||||
tls:
|
||||
@@ -201,10 +214,10 @@ providers:
|
||||
key: foobar
|
||||
insecureSkipVerify: true
|
||||
redis:
|
||||
rootKey: traefik
|
||||
rootKey: foobar
|
||||
endpoints:
|
||||
- foobar
|
||||
- foobar
|
||||
- foobar
|
||||
- foobar
|
||||
username: foobar
|
||||
password: foobar
|
||||
tls:
|
||||
@@ -213,6 +226,16 @@ providers:
|
||||
cert: foobar
|
||||
key: foobar
|
||||
insecureSkipVerify: true
|
||||
http:
|
||||
endpoint: foobar
|
||||
pollInterval: 42
|
||||
pollTimeout: 42
|
||||
tls:
|
||||
ca: foobar
|
||||
caOptional: true
|
||||
cert: foobar
|
||||
key: foobar
|
||||
insecureSkipVerify: true
|
||||
api:
|
||||
insecure: true
|
||||
dashboard: true
|
||||
@@ -247,9 +270,12 @@ metrics:
|
||||
password: foobar
|
||||
addEntryPointsLabels: true
|
||||
addServicesLabels: true
|
||||
pilot:
|
||||
token: foobar
|
||||
ping:
|
||||
entryPoint: foobar
|
||||
manualRouting: true
|
||||
terminatingStatusCode: 42
|
||||
log:
|
||||
level: foobar
|
||||
filePath: foobar
|
||||
@@ -285,6 +311,7 @@ tracing:
|
||||
gen128Bit: true
|
||||
propagation: foobar
|
||||
traceContextHeaderName: foobar
|
||||
disableAttemptReconnecting: true
|
||||
collector:
|
||||
endpoint: foobar
|
||||
user: foobar
|
||||
@@ -328,6 +355,7 @@ certificatesResolvers:
|
||||
acme:
|
||||
email: foobar
|
||||
caServer: foobar
|
||||
preferredChain: foobar
|
||||
storage: foobar
|
||||
keyType: foobar
|
||||
dnsChallenge:
|
||||
@@ -344,6 +372,7 @@ certificatesResolvers:
|
||||
acme:
|
||||
email: foobar
|
||||
caServer: foobar
|
||||
preferredChain: foobar
|
||||
storage: foobar
|
||||
keyType: foobar
|
||||
dnsChallenge:
|
||||
@@ -356,3 +385,14 @@ certificatesResolvers:
|
||||
httpChallenge:
|
||||
entryPoint: foobar
|
||||
tlsChallenge: {}
|
||||
experimental:
|
||||
plugins:
|
||||
Descriptor0:
|
||||
moduleName: foobar
|
||||
version: foobar
|
||||
Descriptor1:
|
||||
moduleName: foobar
|
||||
version: foobar
|
||||
devPlugin:
|
||||
goPath: foobar
|
||||
moduleName: foobar
|
||||
|
@@ -91,7 +91,7 @@ and whether to listen for TCP or UDP.
|
||||
### General
|
||||
|
||||
EntryPoints are part of the [static configuration](../getting-started/configuration-overview.md#the-static-configuration).
|
||||
You can define them using a toml file, CLI arguments, or a key-value store.
|
||||
They can be defined by using a file (TOML or YAML) or CLI arguments.
|
||||
|
||||
??? info "See the complete reference for the list of available options"
|
||||
|
||||
@@ -168,7 +168,7 @@ The format is:
|
||||
|
||||
If both TCP and UDP are wanted for the same port, two entryPoints definitions are needed, such as in the example below.
|
||||
|
||||
??? example "Both TCP and UDP on port 3179"
|
||||
??? example "Both TCP and UDP on Port 3179"
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
## Static configuration
|
||||
@@ -194,6 +194,30 @@ If both TCP and UDP are wanted for the same port, two entryPoints definitions ar
|
||||
--entryPoints.udpep.address=:3179/udp
|
||||
```
|
||||
|
||||
??? example "Listen on Specific IP Addresses Only"
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[entryPoints.specificIPv4]
|
||||
address = "192.168.2.7:8888"
|
||||
[entryPoints.specificIPv6]
|
||||
address = "[2001:db8::1]:8888"
|
||||
```
|
||||
|
||||
```yaml tab="File (yaml)"
|
||||
entryPoints:
|
||||
specificIPv4:
|
||||
address: "192.168.2.7:8888"
|
||||
specificIPv6:
|
||||
address: "[2001:db8::1]:8888"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--entrypoints.specificIPv4.address=192.168.2.7:8888
|
||||
--entrypoints.specificIPv6.address=[2001:db8::1]:8888
|
||||
```
|
||||
|
||||
Full details for how to specify `address` can be found in [net.Listen](https://golang.org/pkg/net/#Listen) (and [net.Dial](https://golang.org/pkg/net/#Dial)) of the doc for go.
|
||||
|
||||
### Forwarded Headers
|
||||
|
||||
You can configure Traefik to trust the forwarded headers information (`X-Forwarded-*`).
|
||||
@@ -569,7 +593,7 @@ This whole section is dedicated to options, keyed by entry point, that will appl
|
||||
```bash tab="CLI"
|
||||
--entrypoints.web.address=:80
|
||||
--entrypoints.web.http.redirections.entryPoint.to=websecure
|
||||
--entrypoints.web.http.redirections.entryPoint.https=true
|
||||
--entrypoints.web.http.redirections.entryPoint.scheme=https
|
||||
--entrypoints.websecure.address=:443
|
||||
```
|
||||
|
||||
@@ -721,8 +745,8 @@ entryPoints:
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
entrypoints.websecure.address=:443
|
||||
entrypoints.websecure.http.middlewares=auth@file,strip@file
|
||||
--entrypoints.websecure.address=:443
|
||||
--entrypoints.websecure.http.middlewares=auth@file,strip@file
|
||||
```
|
||||
|
||||
### TLS
|
||||
@@ -768,13 +792,13 @@ entryPoints:
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
entrypoints.websecure.address=:443
|
||||
entrypoints.websecure.http.tls.options=foobar
|
||||
entrypoints.websecure.http.tls.certResolver=leresolver
|
||||
entrypoints.websecure.http.tls.domains[0].main=example.com
|
||||
entrypoints.websecure.http.tls.domains[0].sans=foo.example.com,bar.example.com
|
||||
entrypoints.websecure.http.tls.domains[1].main=test.com
|
||||
entrypoints.websecure.http.tls.domains[1].sans=foo.test.com,bar.test.com
|
||||
--entrypoints.websecure.address=:443
|
||||
--entrypoints.websecure.http.tls.options=foobar
|
||||
--entrypoints.websecure.http.tls.certResolver=leresolver
|
||||
--entrypoints.websecure.http.tls.domains[0].main=example.com
|
||||
--entrypoints.websecure.http.tls.domains[0].sans=foo.example.com,bar.example.com
|
||||
--entrypoints.websecure.http.tls.domains[1].main=test.com
|
||||
--entrypoints.websecure.http.tls.domains[1].sans=foo.test.com,bar.test.com
|
||||
```
|
||||
|
||||
??? example "Let's Encrypt"
|
||||
@@ -797,6 +821,6 @@ entrypoints.websecure.http.tls.domains[1].sans=foo.test.com,bar.test.com
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
entrypoints.websecure.address=:443
|
||||
entrypoints.websecure.http.tls.certResolver=leresolver
|
||||
--entrypoints.websecure.address=:443
|
||||
--entrypoints.websecure.http.tls.certResolver=leresolver
|
||||
```
|
||||
|
@@ -228,6 +228,7 @@ http:
|
||||
to-whoami-tcp:
|
||||
service: whoami-tcp
|
||||
rule: HostSNI(`whoami-tcp.example.com`)
|
||||
tls: {}
|
||||
|
||||
services:
|
||||
whoami-tcp:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user