mirror of
https://github.com/containous/traefik.git
synced 2025-09-07 09:44:23 +03:00
Compare commits
241 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5a1c936ede | ||
|
47ad6538f1 | ||
|
9be44d8330 | ||
|
a4b354b33f | ||
|
a70b864c55 | ||
|
3bd5fc0f90 | ||
|
aabfb792af | ||
|
e5e48d1cc1 | ||
|
42a110dd69 | ||
|
64af364b02 | ||
|
cf14b8fa92 | ||
|
e7dc6ec025 | ||
|
f29e311b73 | ||
|
a914ce2bd2 | ||
|
b42a7c89e7 | ||
|
67483c1b17 | ||
|
4071f1e7f2 | ||
|
577709fff3 | ||
|
8cd45476ac | ||
|
cf14504fd5 | ||
|
b84829336d | ||
|
d969e59911 | ||
|
936b6148ff | ||
|
a9776ceafc | ||
|
e471239955 | ||
|
2e8156bfaa | ||
|
48ce6c32c1 | ||
|
4990239855 | ||
|
5e2c929322 | ||
|
2b5355c849 | ||
|
f21f71786a | ||
|
fc7f109cb2 | ||
|
a711f0d037 | ||
|
98fc6ca441 | ||
|
c10f1a3a36 | ||
|
da092e653d | ||
|
bf29417136 | ||
|
79a14ce992 | ||
|
99ce26f7b1 | ||
|
16250361c3 | ||
|
be44385b42 | ||
|
54c77ecb54 | ||
|
a30f0dcabd | ||
|
efef7dce4f | ||
|
1c9e4c6050 | ||
|
89cd9e8ddd | ||
|
92093a8c09 | ||
|
d970813c20 | ||
|
f69982aa9d | ||
|
82fdc569c2 | ||
|
def0c1a526 | ||
|
93de7cf0c0 | ||
|
ef2d03d96e | ||
|
321c9421ea | ||
|
5a225b4196 | ||
|
95fabeae73 | ||
|
525a6cf5b2 | ||
|
27ec0912d5 | ||
|
83a7f10c75 | ||
|
0a5c9095ac | ||
|
0a31225e65 | ||
|
db4a92d877 | ||
|
9df053e3f5 | ||
|
1f17731369 | ||
|
8e32d1913b | ||
|
e10a82a501 | ||
|
ce47f200d5 | ||
|
95dc43ce4a | ||
|
d91eefa74f | ||
|
ffdfc13461 | ||
|
a13b03ef3d | ||
|
69d504c905 | ||
|
bda7e025a2 | ||
|
596f04eae8 | ||
|
b39d226fb8 | ||
|
20dfb91948 | ||
|
e033355225 | ||
|
56ed45ae70 | ||
|
d3ff0c2cd4 | ||
|
566b205758 | ||
|
b537ccdb0c | ||
|
d9b8435a7d | ||
|
c0ba4d177f | ||
|
7377ab7b95 | ||
|
207ac94ed0 | ||
|
fe32a7e584 | ||
|
25e12aee14 | ||
|
85dd45cb81 | ||
|
32340252b2 | ||
|
5d716f0149 | ||
|
918a343557 | ||
|
969dd088a2 | ||
|
89001ae9a4 | ||
|
c99221fa34 | ||
|
9ef3fc84f9 | ||
|
d28bcf24e5 | ||
|
8d739c411b | ||
|
46c1600ada | ||
|
126b32c579 | ||
|
380514941c | ||
|
61ceb7a32c | ||
|
07a3c37a23 | ||
|
c7e13eb082 | ||
|
6906a022ca | ||
|
8f0832d340 | ||
|
bda0dba131 | ||
|
76867e39ea | ||
|
6f8e8ea252 | ||
|
8e7881094f | ||
|
7d09132a5c | ||
|
6f4a7fb604 | ||
|
6e28db513c | ||
|
2084201c8f | ||
|
70359e5d27 | ||
|
a72d124551 | ||
|
7ff13c3e3e | ||
|
55360c1eaf | ||
|
60ff50a675 | ||
|
ba3967aa16 | ||
|
fffa413121 | ||
|
c011bdfdd8 | ||
|
4235cef1b2 | ||
|
871e04cb12 | ||
|
287cebb498 | ||
|
6c8d200373 | ||
|
0ac6f80b50 | ||
|
2b73860ea5 | ||
|
ddcb003b3b | ||
|
be52c5abb1 | ||
|
f81ceaef8a | ||
|
eb6c5fc34d | ||
|
4fc16f26a3 | ||
|
234d35f592 | ||
|
352a72a5d7 | ||
|
4d1ce986a6 | ||
|
531a8ff248 | ||
|
2644c1f598 | ||
|
fa53f7ec85 | ||
|
e05574af58 | ||
|
fcfc976b13 | ||
|
78180a5fa7 | ||
|
e0b442a48b | ||
|
bd1c84755b | ||
|
a7194e96e0 | ||
|
2bd60f9e60 | ||
|
81eb46e36d | ||
|
b7700e77bf | ||
|
187ec26d8e | ||
|
848e23b489 | ||
|
d63cb1b4d6 | ||
|
c45de0d8bc | ||
|
5c18967f06 | ||
|
e78f172f02 | ||
|
7f307d60c4 | ||
|
817ac8f256 | ||
|
c76d58d532 | ||
|
4b456f3b76 | ||
|
f25139424a | ||
|
2d95c37ea4 | ||
|
48bd279311 | ||
|
36ffdf548d | ||
|
a5b169c563 | ||
|
1e69939532 | ||
|
d8156ef625 | ||
|
ffd4e207a4 | ||
|
bd3271aff0 | ||
|
0664f5a9ca | ||
|
c515ace328 | ||
|
16f65f669b | ||
|
6ae50389e6 | ||
|
87fd51d7ec | ||
|
7e43e5615e | ||
|
3a180e2afc | ||
|
ca2ff214c4 | ||
|
f8db285d5d | ||
|
1f880662d6 | ||
|
febab86682 | ||
|
8070dfef45 | ||
|
fc69f882c5 | ||
|
838a8e18d3 | ||
|
5e3e47b484 | ||
|
a243ac4dde | ||
|
ce2e02b690 | ||
|
dca348359b | ||
|
cf0759a48f | ||
|
2ccdc419d0 | ||
|
9af0e705a5 | ||
|
0a3e40332a | ||
|
a758d18e51 | ||
|
f15d05b22f | ||
|
fc9f41b955 | ||
|
679def0151 | ||
|
e5024d5d0a | ||
|
dd04c432e9 | ||
|
b1fd3b8fc7 | ||
|
456df0fc19 | ||
|
526f493e12 | ||
|
5632ee6378 | ||
|
56f845c71a | ||
|
e1e1fd640c | ||
|
63ef0f1cee | ||
|
de2437cfec | ||
|
32e08f3510 | ||
|
0b48d5d0d2 | ||
|
080cf98e51 | ||
|
dc8d5ef744 | ||
|
70a02158e5 | ||
|
ab71dad51a | ||
|
0624cefc10 | ||
|
ac486d3d1d | ||
|
e28b33b53b | ||
|
d3a3aeb0fc | ||
|
702e0a461a | ||
|
cb4fb973b2 | ||
|
d13d078351 | ||
|
31a5f3591f | ||
|
8947f85ddd | ||
|
29908098e4 | ||
|
702e301990 | ||
|
606b43dc51 | ||
|
992d4c1b94 | ||
|
e658712d53 | ||
|
438eec720a | ||
|
1b21f0723f | ||
|
d211437d6c | ||
|
7996a42f76 | ||
|
2461e36ed4 | ||
|
2bbb6fc427 | ||
|
2747e240c1 | ||
|
4b370930b5 | ||
|
b05a5c818d | ||
|
41d22ef17e | ||
|
bbee63fcf3 | ||
|
b1ddd0e038 | ||
|
f742671bbe | ||
|
ed5321999c | ||
|
fc7ec17905 | ||
|
e5a01c7cc8 | ||
|
0509b6fdb9 | ||
|
759d17547a | ||
|
a3327c4430 |
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -3,11 +3,11 @@ PLEASE READ THIS MESSAGE.
|
||||
|
||||
Documentation fixes or enhancements:
|
||||
- for Traefik v1: use branch v1.7
|
||||
- for Traefik v2: use branch v2.4
|
||||
- for Traefik v2: use branch v2.6
|
||||
|
||||
Bug fixes:
|
||||
- for Traefik v1: use branch v1.7
|
||||
- for Traefik v2: use branch v2.4
|
||||
- for Traefik v2: use branch v2.6
|
||||
|
||||
Enhancements:
|
||||
- for Traefik v1: we only accept bug fixes
|
||||
|
7
.github/workflows/build.yaml
vendored
7
.github/workflows/build.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
GO_VERSION: 1.16
|
||||
GO_VERSION: 1.17
|
||||
CGO_ENABLED: 0
|
||||
PRE_TARGET: ""
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Build webui
|
||||
run: |
|
||||
make generate-webui
|
||||
tar czvf webui.tar.gz ./static/
|
||||
tar czvf webui.tar.gz ./webui/static/
|
||||
|
||||
- name: Artifact webui
|
||||
uses: actions/upload-artifact@v2
|
||||
@@ -66,9 +66,6 @@ jobs:
|
||||
key: ${{ runner.os }}-build-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-build-go-
|
||||
|
||||
- name: Installing dependencies
|
||||
run: go install github.com/containous/go-bindata/go-bindata@v1.0.0
|
||||
|
||||
- name: Artifact webui
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
|
37
.github/workflows/experimental.yaml
vendored
Normal file
37
.github/workflows/experimental.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Build experimental image on branch
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
|
||||
experimental:
|
||||
if: github.repository == 'traefik/traefik'
|
||||
name: Build experimental image on branch
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
|
||||
# https://github.com/marketplace/actions/checkout
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Branch name
|
||||
run: echo ${GITHUB_REF##*/}
|
||||
|
||||
- name: Build docker experimental image
|
||||
run: docker build -t traefik/traefik:experimental-${GITHUB_REF##*/} -f exp.Dockerfile .
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Push to Docker Hub
|
||||
run: docker push traefik/traefik:experimental-${GITHUB_REF##*/}
|
6
.github/workflows/test-unit.yaml
vendored
6
.github/workflows/test-unit.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
GO_VERSION: 1.16
|
||||
GO_VERSION: 1.17
|
||||
PRE_TARGET: ""
|
||||
|
||||
jobs:
|
||||
@@ -39,8 +39,8 @@ jobs:
|
||||
key: ${{ runner.os }}-test-unit-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-test-unit-go-
|
||||
|
||||
- name: Installing dependencies
|
||||
run: go install github.com/containous/go-bindata/go-bindata@v1.0.0
|
||||
- name: Avoid generating webui
|
||||
run: mkdir -p webui/static && touch webui/static/index.html
|
||||
|
||||
- name: Tests
|
||||
run: make test-unit
|
||||
|
13
.github/workflows/validate.yaml
vendored
13
.github/workflows/validate.yaml
vendored
@@ -6,8 +6,8 @@ on:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
GO_VERSION: 1.16
|
||||
GOLANGCI_LINT_VERSION: v1.41.1
|
||||
GO_VERSION: 1.17
|
||||
GOLANGCI_LINT_VERSION: v1.43.0
|
||||
MISSSPELL_VERSION: v0.3.4
|
||||
PRE_TARGET: ""
|
||||
|
||||
@@ -41,15 +41,15 @@ jobs:
|
||||
key: ${{ runner.os }}-validate-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-validate-go-
|
||||
|
||||
- name: Installing dependencies
|
||||
run: go install github.com/containous/go-bindata/go-bindata@v1.0.0
|
||||
|
||||
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }}
|
||||
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||
|
||||
- name: Install missspell ${{ env.MISSSPELL_VERSION }}
|
||||
run: curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | sh -s -- -b $(go env GOPATH)/bin ${MISSSPELL_VERSION}
|
||||
|
||||
- name: Avoid generating webui
|
||||
run: mkdir -p webui/static && touch webui/static/index.html
|
||||
|
||||
- name: Validate
|
||||
run: make validate
|
||||
|
||||
@@ -81,9 +81,6 @@ jobs:
|
||||
key: ${{ runner.os }}-validate-generate-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-validate-generate-go-
|
||||
|
||||
- name: Installing dependencies
|
||||
run: go install github.com/containous/go-bindata/go-bindata@v1.0.0
|
||||
|
||||
- name: go generate
|
||||
run: |
|
||||
go generate
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,9 +5,9 @@
|
||||
.DS_Store
|
||||
/dist
|
||||
/webui/.tmp/
|
||||
/webui/static/
|
||||
/site/
|
||||
/docs/site/
|
||||
/static/
|
||||
/autogen/
|
||||
/traefik
|
||||
/traefik.toml
|
||||
@@ -17,4 +17,5 @@
|
||||
cover.out
|
||||
vendor/
|
||||
plugins-storage/
|
||||
plugins-local/
|
||||
traefik_changelog.md
|
||||
|
@@ -16,9 +16,6 @@
|
||||
[linters-settings.gocyclo]
|
||||
min-complexity = 14.0
|
||||
|
||||
[linters-settings.maligned]
|
||||
suggest-new = true
|
||||
|
||||
[linters-settings.goconst]
|
||||
min-len = 3.0
|
||||
min-occurrences = 4.0
|
||||
@@ -51,6 +48,7 @@
|
||||
extensionsv1beta1 = "k8s.io/api/extensions/v1beta1"
|
||||
metav1 = "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
kubeerror = "k8s.io/apimachinery/pkg/api/errors"
|
||||
composeapi = "github.com/docker/compose/v2/pkg/api"
|
||||
|
||||
[linters-settings.gomoddirectives]
|
||||
replace-allow-list = [
|
||||
@@ -59,6 +57,7 @@
|
||||
"github.com/gorilla/mux",
|
||||
"github.com/mailgun/minheap",
|
||||
"github.com/mailgun/multibuf",
|
||||
"github.com/jaguilar/vt100",
|
||||
]
|
||||
|
||||
[linters]
|
||||
@@ -99,6 +98,10 @@
|
||||
"godox", # Too strict
|
||||
"forcetypeassert", # Too strict
|
||||
"tagliatelle", # Not compatible with current tags.
|
||||
"varnamelen", # not relevant
|
||||
"nilnil", # not relevant
|
||||
"ireturn", # not relevant
|
||||
"contextcheck", # too many false-positive
|
||||
]
|
||||
|
||||
[issues]
|
||||
@@ -109,6 +112,11 @@
|
||||
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
|
||||
"should have a package comment, unless it's in another file for this package",
|
||||
"SA1019: http.CloseNotifier has been deprecated", # FIXME must be fixed
|
||||
"SA1019: cfg.SSLRedirect is deprecated",
|
||||
"SA1019: cfg.SSLTemporaryRedirect is deprecated",
|
||||
"SA1019: cfg.SSLHost is deprecated",
|
||||
"SA1019: cfg.SSLForceHost is deprecated",
|
||||
"SA1019: cfg.FeaturePolicy is deprecated",
|
||||
]
|
||||
[[issues.exclude-rules]]
|
||||
path = "(.+)_test.go"
|
||||
|
@@ -19,55 +19,36 @@ global_job_config:
|
||||
prologue:
|
||||
commands:
|
||||
- curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin"
|
||||
- sudo semgo go1.16
|
||||
- sudo semgo go1.17
|
||||
- export "GOPATH=$(go env GOPATH)"
|
||||
- export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}"
|
||||
- export "PATH=${GOPATH}/bin:${PATH}"
|
||||
- mkdir -vp "${SEMAPHORE_GIT_DIR}" "${GOPATH}/bin"
|
||||
- export GOPROXY=https://proxy.golang.org,direct
|
||||
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.41.1
|
||||
- curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
|
||||
- go install github.com/containous/go-bindata/go-bindata@v1.0.0
|
||||
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.43.0
|
||||
- curl -sSfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | bash -s -- -b "${GOPATH}/bin"
|
||||
- checkout
|
||||
- cache restore traefik-$(checksum go.sum)
|
||||
|
||||
blocks:
|
||||
- name: Test Integration Container
|
||||
- name: Test Integration
|
||||
dependencies: []
|
||||
run:
|
||||
when: "branch =~ '.*' OR pull_request =~'.*'"
|
||||
task:
|
||||
jobs:
|
||||
- name: Test Integration Container
|
||||
- name: Test Integration
|
||||
commands:
|
||||
- make pull-images
|
||||
- mkdir -p static # Avoid to generate webui
|
||||
- mkdir -p webui/static && touch webui/static/index.html # Avoid generating webui
|
||||
- PRE_TARGET="" make binary
|
||||
- make test-integration-container
|
||||
- make test-integration
|
||||
- df -h
|
||||
epilogue:
|
||||
always:
|
||||
commands:
|
||||
- cache store traefik-$(checksum go.sum) $HOME/go/pkg/mod
|
||||
|
||||
- name: Test Integration Host
|
||||
dependencies: []
|
||||
run:
|
||||
when: "branch =~ '.*' OR pull_request =~'.*'"
|
||||
task:
|
||||
env_vars:
|
||||
- name: PRE_TARGET
|
||||
value: ""
|
||||
jobs:
|
||||
- name: Test Integration Host
|
||||
commands:
|
||||
- mkdir -p static # Avoid to generate webui
|
||||
- make test-integration-host
|
||||
epilogue:
|
||||
always:
|
||||
commands:
|
||||
- cache store traefik-$(checksum go.sum) $HOME/go/pkg/mod
|
||||
|
||||
- name: Release
|
||||
dependencies: []
|
||||
run:
|
||||
@@ -83,7 +64,7 @@ blocks:
|
||||
- name: GH_VERSION
|
||||
value: 1.12.1
|
||||
- name: CODENAME
|
||||
value: "livarot"
|
||||
value: "rocamadour"
|
||||
- name: PRE_TARGET
|
||||
value: ""
|
||||
prologue:
|
||||
|
437
CHANGELOG.md
437
CHANGELOG.md
@@ -1,3 +1,319 @@
|
||||
## [v2.6.0](https://github.com/traefik/traefik/tree/v2.6.0) (2022-01-24)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.0-rc1...v2.6.0)
|
||||
|
||||
**Enhancements:**
|
||||
- **[acme]** Allow configuration of ACME certificates duration ([#8046](https://github.com/traefik/traefik/pull/8046) by [pmontepagano](https://github.com/pmontepagano))
|
||||
- **[consul,consulcatalog]** Support consul enterprise namespaces in consul catalog provider ([#8592](https://github.com/traefik/traefik/pull/8592) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s,k8s/gatewayapi]** Update gateway api provider to v1alpha2 ([#8535](https://github.com/traefik/traefik/pull/8535) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s,k8s/gatewayapi]** Support gateway api RouteNamespaces ([#8299](https://github.com/traefik/traefik/pull/8299) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s/crd]** Support Kubernetes basic-auth secrets ([#8189](https://github.com/traefik/traefik/pull/8189) by [dtomcej](https://github.com/dtomcej))
|
||||
- **[metrics]** Add configurable tags to influxdb metrics ([#8308](https://github.com/traefik/traefik/pull/8308) by [Tetha](https://github.com/Tetha))
|
||||
- **[metrics]** Add prefix to datadog metrics ([#8234](https://github.com/traefik/traefik/pull/8234) by [fredwangwang](https://github.com/fredwangwang))
|
||||
- **[middleware,tcp]** Add in flight connection middleware ([#8429](https://github.com/traefik/traefik/pull/8429) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[middleware]** Add Organizational Unit to passtlscert middleware ([#7958](https://github.com/traefik/traefik/pull/7958) by [FernFerret](https://github.com/FernFerret))
|
||||
- **[middleware]** Allow configuration of minimum body size for compress middleware ([#8239](https://github.com/traefik/traefik/pull/8239) by [lus](https://github.com/lus))
|
||||
- **[middleware]** Ceil Retry-After value in the rate-limit middleware ([#8581](https://github.com/traefik/traefik/pull/8581) by [pyaillet](https://github.com/pyaillet))
|
||||
- **[middleware]** Refactor Exponential Backoff ([#7519](https://github.com/traefik/traefik/pull/7519) by [danieladams456](https://github.com/danieladams456))
|
||||
- **[server,k8s/crd,k8s]** Allow configuration of HTTP/2 readIdleTimeout and pingTimeout ([#8539](https://github.com/traefik/traefik/pull/8539) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[server]** Allow configuration of advertised port for HTTP/3 ([#8131](https://github.com/traefik/traefik/pull/8131) by [valerauko](https://github.com/valerauko))
|
||||
- **[tracing]** Upgrade Instana tracer and make process profiling configurable ([#8334](https://github.com/traefik/traefik/pull/8334) by [andriikushch](https://github.com/andriikushch))
|
||||
|
||||
**Bug fixes:**
|
||||
- **[consul,kv]** Support Consul KV Enterprise namespaces ([#8692](https://github.com/traefik/traefik/pull/8692) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[consul]** Support token authentication for Consul KV ([#8712](https://github.com/traefik/traefik/pull/8712) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[consulcatalog]** Configure Consul Catalog namespace at client level ([#8725](https://github.com/traefik/traefik/pull/8725) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[tracing]** Upgrade Instana tracer dependency ([#8687](https://github.com/traefik/traefik/pull/8687) by [andriikushch](https://github.com/andriikushch))
|
||||
- **[logs]** Redact credentials before logging ([#8699](https://github.com/traefik/traefik/pull/8699) by [ibrahimalihc](https://github.com/ibrahimalihc))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.5 into v2.6 ([#8720](https://github.com/traefik/traefik/pull/8720) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8717](https://github.com/traefik/traefik/pull/8717) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8714](https://github.com/traefik/traefik/pull/8714) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into v2.6 ([#8688](https://github.com/traefik/traefik/pull/8688) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8664](https://github.com/traefik/traefik/pull/8664) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8651](https://github.com/traefik/traefik/pull/8651) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8645](https://github.com/traefik/traefik/pull/8645) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8609](https://github.com/traefik/traefik/pull/8609) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8563](https://github.com/traefik/traefik/pull/8563) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.5 into master ([#8498](https://github.com/traefik/traefik/pull/8498) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.5 into master ([#8461](https://github.com/traefik/traefik/pull/8461) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8435](https://github.com/traefik/traefik/pull/8435) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.5 into master ([#8419](https://github.com/traefik/traefik/pull/8419) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8411](https://github.com/traefik/traefik/pull/8411) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8316](https://github.com/traefik/traefik/pull/8316) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8298](https://github.com/traefik/traefik/pull/8298) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8289](https://github.com/traefik/traefik/pull/8289) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8241](https://github.com/traefik/traefik/pull/8241) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
## [v2.6.0-rc3](https://github.com/traefik/traefik/tree/v2.6.0-rc3) (2022-01-20)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.6.0-rc2...v2.6.0-rc3)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[consul]** Support token authentication for Consul KV ([#8712](https://github.com/traefik/traefik/pull/8712) by [kevinpollet](https://github.com/kevinpollet))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.5 into v2.6 ([#8717](https://github.com/traefik/traefik/pull/8717) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8714](https://github.com/traefik/traefik/pull/8714) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
## [v2.5.7](https://github.com/traefik/traefik/tree/v2.5.7) (2022-01-20)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.6...v2.5.7)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[acme]** Update go-acme/lego to v4.6.0 ([#8716](https://github.com/traefik/traefik/pull/8716) by [ldez](https://github.com/ldez))
|
||||
- **[logs]** Adjust log level from info to debug ([#8718](https://github.com/traefik/traefik/pull/8718) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins]** Fix middleware plugins memory leak ([#8702](https://github.com/traefik/traefik/pull/8702) by [ldez](https://github.com/ldez))
|
||||
- **[server]** Mitigate memory leak ([#8706](https://github.com/traefik/traefik/pull/8706) by [mpl](https://github.com/mpl))
|
||||
- **[webui,middleware]** Fix middleware regexp's display ([#8697](https://github.com/traefik/traefik/pull/8697) by [tomMoulard](https://github.com/tomMoulard))
|
||||
|
||||
**Documentation:**
|
||||
- **[http]** Fix HTTP provider endpoint config example ([#8715](https://github.com/traefik/traefik/pull/8715) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s]** Remove typo in Kubernetes providers labelSelector examples ([#8676](https://github.com/traefik/traefik/pull/8676) by [colinwilson](https://github.com/colinwilson))
|
||||
- **[rules]** Improve regexp matcher documentation ([#8686](https://github.com/traefik/traefik/pull/8686) by [Hades32](https://github.com/Hades32))
|
||||
- **[tracing]** Fix broken jaeger documentation link ([#8665](https://github.com/traefik/traefik/pull/8665) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Update copyright for 2022 ([#8679](https://github.com/traefik/traefik/pull/8679) by [kevinpollet](https://github.com/kevinpollet))
|
||||
|
||||
## [v2.6.0-rc2](https://github.com/traefik/traefik/tree/v2.6.0-rc2) (2022-01-12)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.6.0-rc1...v2.6.0-rc2)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[consul,kv]** Support Consul KV Enterprise namespaces ([#8692](https://github.com/traefik/traefik/pull/8692) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[tracing]** Upgrade Instana tracer dependency ([#8687](https://github.com/traefik/traefik/pull/8687) by [andriikushch](https://github.com/andriikushch))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.5 into v2.6 ([#8688](https://github.com/traefik/traefik/pull/8688) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8664](https://github.com/traefik/traefik/pull/8664) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into v2.6 ([#8651](https://github.com/traefik/traefik/pull/8651) by [tomMoulard](https://github.com/tomMoulard))
|
||||
|
||||
## [v2.5.6](https://github.com/traefik/traefik/tree/v2.5.6) (2021-12-22)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.5...v2.5.6)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[middleware]** Process all X-Forwarded-For headers in the request ([#8596](https://github.com/traefik/traefik/pull/8596) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[plugins]** Update Yaegi to v0.11.2 ([#8650](https://github.com/traefik/traefik/pull/8650) by [ldez](https://github.com/ldez))
|
||||
- **[server]** Update golang.org/x/net dependency version ([#8635](https://github.com/traefik/traefik/pull/8635) by [kevinpollet](https://github.com/kevinpollet))
|
||||
|
||||
**Documentation:**
|
||||
- **[api]** Add missing API endpoints documentation ([#8649](https://github.com/traefik/traefik/pull/8649) by [ichxxx](https://github.com/ichxxx))
|
||||
- **[middleware]** Fix passTLSClientCert CRD example name ([#8637](https://github.com/traefik/traefik/pull/8637) by [ddtmachado](https://github.com/ddtmachado))
|
||||
- **[middleware]** Correct documentation in middleware overview ([#8636](https://github.com/traefik/traefik/pull/8636) by [Alestrix](https://github.com/Alestrix))
|
||||
|
||||
## [v2.6.0-rc1](https://github.com/traefik/traefik/tree/v2.6.0-rc1) (2021-12-20)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.0-rc1...v2.6.0-rc1)
|
||||
|
||||
**Enhancements:**
|
||||
- **[acme]** Allow configuration of ACME certificates duration ([#8046](https://github.com/traefik/traefik/pull/8046) by [pmontepagano](https://github.com/pmontepagano))
|
||||
- **[consul,consulcatalog]** Support consul enterprise namespaces in consul catalog provider ([#8592](https://github.com/traefik/traefik/pull/8592) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s,k8s/gatewayapi]** Update gateway api provider to v1alpha2 ([#8535](https://github.com/traefik/traefik/pull/8535) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s,k8s/gatewayapi]** Support gateway api RouteNamespaces ([#8299](https://github.com/traefik/traefik/pull/8299) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s/crd]** Support Kubernetes basic-auth secrets ([#8189](https://github.com/traefik/traefik/pull/8189) by [dtomcej](https://github.com/dtomcej))
|
||||
- **[metrics]** Add configurable tags to influxdb metrics ([#8308](https://github.com/traefik/traefik/pull/8308) by [Tetha](https://github.com/Tetha))
|
||||
- **[metrics]** Add prefix to datadog metrics ([#8234](https://github.com/traefik/traefik/pull/8234) by [fredwangwang](https://github.com/fredwangwang))
|
||||
- **[middleware,tcp]** Add in flight connection middleware ([#8429](https://github.com/traefik/traefik/pull/8429) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[middleware]** Add Organizational Unit to passtlscert middleware ([#7958](https://github.com/traefik/traefik/pull/7958) by [FernFerret](https://github.com/FernFerret))
|
||||
- **[middleware]** Allow configuration of minimum body size for compress middleware ([#8239](https://github.com/traefik/traefik/pull/8239) by [lus](https://github.com/lus))
|
||||
- **[middleware]** Ceil Retry-After value in the rate-limit middleware ([#8581](https://github.com/traefik/traefik/pull/8581) by [pyaillet](https://github.com/pyaillet))
|
||||
- **[middleware]** Refactor Exponential Backoff ([#7519](https://github.com/traefik/traefik/pull/7519) by [danieladams456](https://github.com/danieladams456))
|
||||
- **[server,k8s/crd,k8s]** Allow configuration of HTTP/2 readIdleTimeout and pingTimeout ([#8539](https://github.com/traefik/traefik/pull/8539) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[server]** Allow configuration of advertised port for HTTP/3 ([#8131](https://github.com/traefik/traefik/pull/8131) by [valerauko](https://github.com/valerauko))
|
||||
- **[tracing]** Upgrade Instana tracer and make process profiling configurable ([#8334](https://github.com/traefik/traefik/pull/8334) by [andriikushch](https://github.com/andriikushch))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.5 into master ([#8609](https://github.com/traefik/traefik/pull/8609) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8563](https://github.com/traefik/traefik/pull/8563) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.5 into master ([#8498](https://github.com/traefik/traefik/pull/8498) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.5 into master ([#8461](https://github.com/traefik/traefik/pull/8461) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8435](https://github.com/traefik/traefik/pull/8435) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.5 into master ([#8419](https://github.com/traefik/traefik/pull/8419) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8411](https://github.com/traefik/traefik/pull/8411) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8316](https://github.com/traefik/traefik/pull/8316) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8298](https://github.com/traefik/traefik/pull/8298) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.5 into master ([#8289](https://github.com/traefik/traefik/pull/8289) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.5 into master ([#8241](https://github.com/traefik/traefik/pull/8241) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
## [v2.5.5](https://github.com/traefik/traefik/tree/v2.5.5) (2021-12-09)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.4...v2.5.5)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[acme]** Update go-acme/lego to v4.5.3 ([#8607](https://github.com/traefik/traefik/pull/8607) by [lippertmarkus](https://github.com/lippertmarkus))
|
||||
- **[k8s/crd,k8s]** fix: propagate source criterion config to RateLimit middleware in Kubernetes CRD ([#8591](https://github.com/traefik/traefik/pull/8591) by [rbailly-talend](https://github.com/rbailly-talend))
|
||||
- **[plugins]** plugins: start the go routine before calling Provide ([#8620](https://github.com/traefik/traefik/pull/8620) by [ldez](https://github.com/ldez))
|
||||
- **[plugins]** Update yaegi to v0.11.1 ([#8600](https://github.com/traefik/traefik/pull/8600) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins]** Update yaegi v0.11.0 ([#8564](https://github.com/traefik/traefik/pull/8564) by [ldez](https://github.com/ldez))
|
||||
- **[udp]** fix: increase UDP read buffer length to max datagram size ([#8560](https://github.com/traefik/traefik/pull/8560) by [kevinpollet](https://github.com/kevinpollet))
|
||||
|
||||
**Documentation:**
|
||||
- **[consul]** docs: removing typo in consul-catalog provider doc ([#8603](https://github.com/traefik/traefik/pull/8603) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[metrics]** docs: remove misleading metrics overview configuration ([#8579](https://github.com/traefik/traefik/pull/8579) by [gsilvapt](https://github.com/gsilvapt))
|
||||
- **[middleware]** docs: align docker configuration example notes in basicauth HTTP middleware ([#8615](https://github.com/traefik/traefik/pull/8615) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[service]** docs: health check use readiness probe in k8s ([#8575](https://github.com/traefik/traefik/pull/8575) by [Vampouille](https://github.com/Vampouille))
|
||||
- **[tls]** docs: uniformize client TLS config documentation ([#8602](https://github.com/traefik/traefik/pull/8602) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Update CODE_OF_CONDUCT.md ([#8619](https://github.com/traefik/traefik/pull/8619) by [tfny](https://github.com/tfny))
|
||||
- fixed minor spelling error in Regexp Syntax section ([#8565](https://github.com/traefik/traefik/pull/8565) by [kerrsmith](https://github.com/kerrsmith))
|
||||
|
||||
## [v2.5.4](https://github.com/traefik/traefik/tree/v2.5.4) (2021-11-08)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.3...v2.5.4)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[acme]** Update go-acme/lego to v4.5.0 ([#8481](https://github.com/traefik/traefik/pull/8481) by [ldez](https://github.com/ldez))
|
||||
- **[k8s/crd,k8s]** fix: add missing RequireAnyClientCert value to TLSOption CRD ([#8464](https://github.com/traefik/traefik/pull/8464) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s/crd,k8s]** fix: normalize middleware names in ingress route config ([#8484](https://github.com/traefik/traefik/pull/8484) by [aaronraff](https://github.com/aaronraff))
|
||||
- **[middleware,provider,tls]** fix: do not require a TLS client cert when InsecureSkipVerify is false ([#8525](https://github.com/traefik/traefik/pull/8525) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[middleware,tls]** fix: use host's root CA set if ClientTLS ca is not defined ([#8545](https://github.com/traefik/traefik/pull/8545) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[middleware]** fix: forward request Host to errors middleware service ([#8460](https://github.com/traefik/traefik/pull/8460) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[middleware]** fix: use EscapedPath as header value when RawPath is empty ([#8251](https://github.com/traefik/traefik/pull/8251) by [dtomcej](https://github.com/dtomcej))
|
||||
- **[tcp,udp]** fix: TCP/UDP wrr when all servers have a weight set to 0 ([#8553](https://github.com/traefik/traefik/pull/8553) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[webui]** fix: bug parsing weighted service provider name ([#8522](https://github.com/traefik/traefik/pull/8522) by [cocoanton](https://github.com/cocoanton))
|
||||
|
||||
**Documentation:**
|
||||
- **[acme]** docs: remove quotes in certificatesresolvers CLI examples ([#8544](https://github.com/traefik/traefik/pull/8544) by [rdxmb](https://github.com/rdxmb))
|
||||
- **[k8s/ingress,k8s]** docs: clarify usage for cross provider references in Kubernetes ingress annotations ([#8536](https://github.com/traefik/traefik/pull/8536) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[k8s/ingress]** docs: networking.k8s.io/v1beta1 to networking.k8s.io/v1 ([#8523](https://github.com/traefik/traefik/pull/8523) by [pmareke](https://github.com/pmareke))
|
||||
- **[k8s]** docs: replace links to French translation of k8s docs with English ones ([#8457](https://github.com/traefik/traefik/pull/8457) by [FoseFx](https://github.com/FoseFx))
|
||||
- **[k8s]** docs: remove non-working kind config in IngressRouteTCP/UDP examples ([#8538](https://github.com/traefik/traefik/pull/8538) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[kv]** docs: fix typo in KV providers documentation ([#8477](https://github.com/traefik/traefik/pull/8477) by [rondoe](https://github.com/rondoe))
|
||||
- **[metrics]** docs: fix typo in addRoutersLabels option title ([#8561](https://github.com/traefik/traefik/pull/8561) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[middleware]** fix: sourceCriterion documentation for InFlightReq and RateLimit middlewares ([#8524](https://github.com/traefik/traefik/pull/8524) by [pmareke](https://github.com/pmareke))
|
||||
- **[middleware]** Mention escaping escape characters in YAML for regex usage ([#8496](https://github.com/traefik/traefik/pull/8496) by [JackMorganNZ](https://github.com/JackMorganNZ))
|
||||
- **[rules]** docs: add named groups details to Regexp Syntax section ([#8559](https://github.com/traefik/traefik/pull/8559) by [kerrsmith](https://github.com/kerrsmith))
|
||||
- **[tracing]** docs: reword tracing config descriptions to be consistent ([#8473](https://github.com/traefik/traefik/pull/8473) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- docs: remove link to microbadger.com ([#8555](https://github.com/traefik/traefik/pull/8555) by [CrispyBaguette](https://github.com/CrispyBaguette))
|
||||
- docs: remove http scheme urls in documentation ([#8507](https://github.com/traefik/traefik/pull/8507) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- docs: update traefik image version ([#8533](https://github.com/traefik/traefik/pull/8533) by [tomMoulard](https://github.com/tomMoulard))
|
||||
|
||||
## [v2.5.3](https://github.com/traefik/traefik/tree/v2.5.3) (2021-09-20)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.2...v2.5.3)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[consulcatalog]** Fix certChan defaulting on consul catalog provider ([#8439](https://github.com/traefik/traefik/pull/8439) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s/crd,k8s]** Fix peerCertURI config for k8s crd provider ([#8454](https://github.com/traefik/traefik/pull/8454) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s/crd,k8s]** Ensure disableHTTP2 works with k8s crd ([#8448](https://github.com/traefik/traefik/pull/8448) by [ssboisen](https://github.com/ssboisen))
|
||||
- **[k8s/crd,k8s]** Fix ServersTransport reference from IngressRoute service definition ([#8431](https://github.com/traefik/traefik/pull/8431) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[k8s/crd,k8s]** Add cross namespace verification in Kubernetes CRD ([#8422](https://github.com/traefik/traefik/pull/8422) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[metrics]** Fix Prometheus router's metrics ([#8425](https://github.com/traefik/traefik/pull/8425) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins]** Update yaegi to v0.10.0 ([#8452](https://github.com/traefik/traefik/pull/8452) by [ldez](https://github.com/ldez))
|
||||
|
||||
**Documentation:**
|
||||
- **[middleware,file]** Fix TCP middleware whitelist example ([#8421](https://github.com/traefik/traefik/pull/8421) by [tribal2](https://github.com/tribal2))
|
||||
- **[middleware]** Add default proxy headers list ([#8418](https://github.com/traefik/traefik/pull/8418) by [aaronraff](https://github.com/aaronraff))
|
||||
- Add Tom Moulard in maintainers team ([#8442](https://github.com/traefik/traefik/pull/8442) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Fix golang doc URLs ([#8434](https://github.com/traefik/traefik/pull/8434) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
|
||||
## [v2.5.2](https://github.com/traefik/traefik/tree/v2.5.2) (2021-09-02)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.1...v2.5.2)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[http3]** Upgrade github.com/lucas-clemente/quic-go to v0.23.0 ([#8413](https://github.com/traefik/traefik/pull/8413) by [sylr](https://github.com/sylr))
|
||||
- **[middleware]** Fix empty body error for mirroring middleware ([#8381](https://github.com/traefik/traefik/pull/8381) by [antgubarev](https://github.com/antgubarev))
|
||||
- **[tracing]** Bump go.elastic.co/apm version to v1.13.1 ([#8399](https://github.com/traefik/traefik/pull/8399) by [rtribotte](https://github.com/rtribotte))
|
||||
- Update x/sys to support go 1.17 ([#8368](https://github.com/traefik/traefik/pull/8368) by [roopakv](https://github.com/roopakv))
|
||||
- Bump Alpine docker image version from 3.11 to 3.14 for official Traefik images
|
||||
|
||||
**Documentation:**
|
||||
- **[k8s/ingress,k8s]** Adds pathType for v1 ingresses examples ([#8392](https://github.com/traefik/traefik/pull/8392) by [rtribotte](https://github.com/rtribotte))
|
||||
- Fix http scheme urls in documentation ([#8395](https://github.com/traefik/traefik/pull/8395) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
## [v2.5.1](https://github.com/traefik/traefik/tree/v2.5.1) (2021-08-20)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.0...v2.5.1)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[middleware,http3]** Conditional CloseNotify in header middleware ([#8374](https://github.com/traefik/traefik/pull/8374) by [juliens](https://github.com/juliens))
|
||||
- **[tls,tcp,k8s/crd,k8s]** Makes ALPN protocols configurable ([#8383](https://github.com/traefik/traefik/pull/8383) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
**Documentation:**
|
||||
- **[k8s]** Adds MiddlewareTCP CRD documentation ([#8369](https://github.com/traefik/traefik/pull/8369) by [perosb](https://github.com/perosb))
|
||||
- **[middleware]** Adds ContentType to middleware's overview table ([#8350](https://github.com/traefik/traefik/pull/8350) by [euidong](https://github.com/euidong))
|
||||
|
||||
## [v2.5.0](https://github.com/traefik/traefik/tree/v2.5.0) (2021-08-17)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.0-rc1...v2.5.0)
|
||||
|
||||
**Enhancements:**
|
||||
- **[consulcatalog]** Add Support for Consul Connect ([#7407](https://github.com/traefik/traefik/pull/7407) by [Gufran](https://github.com/Gufran))
|
||||
- Update Go version ([#8355](https://github.com/traefik/traefik/pull/8355) by [mpl](https://github.com/mpl))
|
||||
- **[file]** Update sprig to v3.2.0 ([#7746](https://github.com/traefik/traefik/pull/7746) by [sirlatrom](https://github.com/sirlatrom))
|
||||
- **[healthcheck]** Healthcheck: add support at the load-balancers of services level ([#8057](https://github.com/traefik/traefik/pull/8057) by [mpl](https://github.com/mpl))
|
||||
- **[http3]** Upgrade github.com/lucas-clemente/quic-go ([#8076](https://github.com/traefik/traefik/pull/8076) by [sylr](https://github.com/sylr))
|
||||
- **[http3]** Add HTTP3 support (experimental) ([#7724](https://github.com/traefik/traefik/pull/7724) by [juliens](https://github.com/juliens))
|
||||
- **[k8s,k8s/gatewayapi]** Add wildcard hostname rule to kubernetes gateway ([#7963](https://github.com/traefik/traefik/pull/7963) by [jberger](https://github.com/jberger))
|
||||
- **[k8s,k8s/gatewayapi]** Add support for TCPRoute and TLSRoute ([#8054](https://github.com/traefik/traefik/pull/8054) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s,k8s/gatewayapi]** Allow crossprovider service reference ([#7774](https://github.com/traefik/traefik/pull/7774) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- **[k8s/crd,k8s]** Add named port support to Kubernetes IngressRoute CRDs ([#7668](https://github.com/traefik/traefik/pull/7668) by [Cirrith](https://github.com/Cirrith))
|
||||
- **[k8s/crd,k8s]** Improve kubernetes external name service support for UDP ([#7773](https://github.com/traefik/traefik/pull/7773) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s/crd,k8s]** Upgrade the CRD version from apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1 ([#7815](https://github.com/traefik/traefik/pull/7815) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- **[k8s/ingress,k8s/crd,k8s]** Ignore empty endpoint changes ([#7646](https://github.com/traefik/traefik/pull/7646) by [hensur](https://github.com/hensur))
|
||||
- **[k8s/ingress,k8s]** Upgrade Ingress Handling to work with networkingv1/Ingress ([#7549](https://github.com/traefik/traefik/pull/7549) by [SantoDE](https://github.com/SantoDE))
|
||||
- **[k8s/ingress,k8s]** Filter ingress class resources by name ([#7915](https://github.com/traefik/traefik/pull/7915) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s/ingress,k8s]** Add k8s provider option to create services without endpoints ([#7593](https://github.com/traefik/traefik/pull/7593) by [Lucaber](https://github.com/Lucaber))
|
||||
- **[k8s/ingress,k8s]** Upgrade IngressClass to use v1 over v1Beta on Kube 1.19+ ([#8089](https://github.com/traefik/traefik/pull/8089) by [SantoDE](https://github.com/SantoDE))
|
||||
- **[k8s/ingress,k8s]** Add ServersTransport annotation to k8s ingress provider ([#8084](https://github.com/traefik/traefik/pull/8084) by [wdullaer](https://github.com/wdullaer))
|
||||
- **[logs,middleware]** Add TLS version and cipher to the accessLog ([#7478](https://github.com/traefik/traefik/pull/7478) by [na4ma4](https://github.com/na4ma4))
|
||||
- **[metrics]** Add TLS certs expiration metric ([#6924](https://github.com/traefik/traefik/pull/6924) by [sylr](https://github.com/sylr))
|
||||
- **[metrics]** Allow to define datadogs metrics endpoint with env vars ([#7968](https://github.com/traefik/traefik/pull/7968) by [sylr](https://github.com/sylr))
|
||||
- **[middleware,metrics]** Add router metrics ([#7510](https://github.com/traefik/traefik/pull/7510) by [jorge07](https://github.com/jorge07))
|
||||
- **[middleware,tcp]** Add TCP Middlewares support ([#7813](https://github.com/traefik/traefik/pull/7813) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[middleware]** Removes headers middleware options ([#8161](https://github.com/traefik/traefik/pull/8161) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[middleware]** Headers: add `permissionsPolicy` and deprecate `featurePolicy` ([#8200](https://github.com/traefik/traefik/pull/8200) by [WLun001](https://github.com/WLun001))
|
||||
- **[middleware]** Deprecates ssl redirect headers middleware options ([#8160](https://github.com/traefik/traefik/pull/8160) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins]** Local private plugins. ([#8224](https://github.com/traefik/traefik/pull/8224) by [ldez](https://github.com/ldez))
|
||||
- **[provider,plugins]** Add plugin's support for provider ([#7794](https://github.com/traefik/traefik/pull/7794) by [ldez](https://github.com/ldez))
|
||||
- **[rules]** Support not in rules definition ([#8164](https://github.com/traefik/traefik/pull/8164) by [juliens](https://github.com/juliens))
|
||||
- **[rules]** Add routing IP rule matcher ([#8169](https://github.com/traefik/traefik/pull/8169) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[server]** Improve host name resolution for TCP proxy ([#7971](https://github.com/traefik/traefik/pull/7971) by [H-M-H](https://github.com/H-M-H))
|
||||
- **[server]** Add ability to disable HTTP/2 in dynamic config ([#7645](https://github.com/traefik/traefik/pull/7645) by [jcuzzi](https://github.com/jcuzzi))
|
||||
- **[sticky-session]** Add a mechanism to format the sticky cookie value ([#8103](https://github.com/traefik/traefik/pull/8103) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[tls]** Mutualize TLS version and cipher code ([#7779](https://github.com/traefik/traefik/pull/7779) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[tls,k8s/crd,k8s]** Improve CA certificate loading from kubernetes secret ([#7789](https://github.com/traefik/traefik/pull/7789) by [rio](https://github.com/rio))
|
||||
- **[tls]** Do not build a default certificate for ACME challenges store ([#7833](https://github.com/traefik/traefik/pull/7833) by [rkojedzinszky](https://github.com/rkojedzinszky))
|
||||
- **[tracing]** Use Datadog tracer environment variables to setup default config ([#7721](https://github.com/traefik/traefik/pull/7721) by [GianOrtiz](https://github.com/GianOrtiz))
|
||||
- **[tracing]** Update Elastic APM from 1.7.0 to 1.11.0 ([#8187](https://github.com/traefik/traefik/pull/8187) by [afitzek](https://github.com/afitzek))
|
||||
- **[tracing]** Override jaeger configuration with env variables ([#8198](https://github.com/traefik/traefik/pull/8198) by [mmatur](https://github.com/mmatur))
|
||||
- **[udp]** Add udp timeout configuration ([#6982](https://github.com/traefik/traefik/pull/6982) by [Lindenk](https://github.com/Lindenk))
|
||||
|
||||
**Bug fixes:**
|
||||
- **[k8s,k8s/gatewayapi]** Update Gateway API version to v0.3.0 ([#8253](https://github.com/traefik/traefik/pull/8253) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- **[k8s]** Kubernetes: detect changes for resources other than endpoints ([#8313](https://github.com/traefik/traefik/pull/8313) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[middleware]** Library change for compress middleware to increase performance ([#8245](https://github.com/traefik/traefik/pull/8245) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins]** Update yaegi to v0.9.21 ([#8285](https://github.com/traefik/traefik/pull/8285) by [ldez](https://github.com/ldez))
|
||||
- **[plugins]** Downgrade yaegi to v0.9.19 ([#8282](https://github.com/traefik/traefik/pull/8282) by [ldez](https://github.com/ldez))
|
||||
- **[webui]** Fix dashboard to display middleware details ([#8284](https://github.com/traefik/traefik/pull/8284) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[webui]** Fix dashboard title for TCP middlewares ([#8339](https://github.com/traefik/traefik/pull/8339) by [mschneider82](https://github.com/mschneider82))
|
||||
- **[k8s]** Remove logging of changed object with cast ([#8128](https://github.com/traefik/traefik/pull/8128) by [hensur](https://github.com/hensur))
|
||||
|
||||
**Documentation:**
|
||||
- Fix KV reference documentation ([#8280](https://github.com/traefik/traefik/pull/8280) by [rtribotte](https://github.com/rtribotte))
|
||||
- Fix migration guide ([#8269](https://github.com/traefik/traefik/pull/8269) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Update generated and reference doc for plugins ([#8236](https://github.com/traefik/traefik/pull/8236) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s/crd]** Fix: regenerate crd ([#8114](https://github.com/traefik/traefik/pull/8114) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s]** Clarify doc for ingressclass name in k8s 1.18+ ([#7944](https://github.com/traefik/traefik/pull/7944) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Update documentation references ([#8202](https://github.com/traefik/traefik/pull/8202) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.4 into v2.5 ([#8333](https://github.com/traefik/traefik/pull/8333) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into v2.5 ([#8325](https://github.com/traefik/traefik/pull/8325) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into v2.5 ([#8314](https://github.com/traefik/traefik/pull/8314) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into v2.5 ([#8296](https://github.com/traefik/traefik/pull/8296) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.4 into v2.5 ([#8287](https://github.com/traefik/traefik/pull/8287) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into v2.5 ([#8281](https://github.com/traefik/traefik/pull/8281) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into v2.5 ([#8263](https://github.com/traefik/traefik/pull/8263) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#8232](https://github.com/traefik/traefik/pull/8232) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#8210](https://github.com/traefik/traefik/pull/8210) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#8105](https://github.com/traefik/traefik/pull/8105) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.4 into master ([#8087](https://github.com/traefik/traefik/pull/8087) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.4 into master ([#8068](https://github.com/traefik/traefik/pull/8068) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#8058](https://github.com/traefik/traefik/pull/8058) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#8024](https://github.com/traefik/traefik/pull/8024) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#7969](https://github.com/traefik/traefik/pull/7969) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#7921](https://github.com/traefik/traefik/pull/7921) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7901](https://github.com/traefik/traefik/pull/7901) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7859](https://github.com/traefik/traefik/pull/7859) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#7795](https://github.com/traefik/traefik/pull/7795) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.4 into master ([#8221](https://github.com/traefik/traefik/pull/8221) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7781](https://github.com/traefik/traefik/pull/7781) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.4 into master ([#7766](https://github.com/traefik/traefik/pull/7766) by [ldez](https://github.com/ldez))
|
||||
- Merge current v2.4 into master ([#7761](https://github.com/traefik/traefik/pull/7761) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7748](https://github.com/traefik/traefik/pull/7748) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.4 into master ([#7728](https://github.com/traefik/traefik/pull/7728) by [mmatur](https://github.com/mmatur))
|
||||
|
||||
|
||||
## [v2.4.14](https://github.com/traefik/traefik/tree/v2.4.14) (2021-08-16)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.13...v2.4.14)
|
||||
|
||||
@@ -9,11 +325,35 @@
|
||||
**Documentation:**
|
||||
- **[kv]** Fix a router's entryPoint definition example for KV provider ([#8357](https://github.com/traefik/traefik/pull/8357) by [avtion](https://github.com/avtion))
|
||||
|
||||
## [v2.5.0-rc6](https://github.com/traefik/traefik/tree/v2.5.0-rc6) (2021-08-13)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.0-rc5...v2.5.0-rc6)
|
||||
|
||||
**Enhancements:**
|
||||
- Update Go version ([#8355](https://github.com/traefik/traefik/pull/8355) by [mpl](https://github.com/mpl))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.4 into v2.5 ([#8333](https://github.com/traefik/traefik/pull/8333) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
|
||||
## [v2.5.0-rc5](https://github.com/traefik/traefik/tree/v2.5.0-rc5) (2021-08-03)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.0-rc3...v2.5.0-rc5)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[k8s]** Kubernetes: detect changes for resources other than endpoints ([#8313](https://github.com/traefik/traefik/pull/8313) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.4 into v2.5 ([#8325](https://github.com/traefik/traefik/pull/8325) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into v2.5 ([#8314](https://github.com/traefik/traefik/pull/8314) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into v2.5 ([#8296](https://github.com/traefik/traefik/pull/8296) by [tomMoulard](https://github.com/tomMoulard))
|
||||
|
||||
## [v2.5.0-rc4](https://github.com/traefik/traefik/tree/v2.5.0-rc4) (2021-08-03)
|
||||
|
||||
Release canceled.
|
||||
|
||||
## [v2.4.13](https://github.com/traefik/traefik/tree/v2.4.13) (2021-07-30)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.12...v2.4.13)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[authentication,middleware]** Remove hop-by-hop headers define in connection header beore some middleware ([#8319](https://github.com/traefik/traefik/pull/8319) by [ldez](https://github.com/ldez))
|
||||
- **[authentication,middleware]** Remove hop-by-hop headers defined in connection header before some middleware ([#8319](https://github.com/traefik/traefik/pull/8319) by [ldez](https://github.com/ldez))
|
||||
|
||||
## [v2.4.12](https://github.com/traefik/traefik/tree/v2.4.12) (2021-07-26)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.11...v2.4.12)
|
||||
@@ -24,6 +364,27 @@
|
||||
- **[middleware]** Ratelimiter: use correct ttlSeconds value, and always call Set ([#8254](https://github.com/traefik/traefik/pull/8254) by [mpl](https://github.com/mpl))
|
||||
- **[tls]** Check if defaultcertificate is defined in store ([#8274](https://github.com/traefik/traefik/pull/8274) by [dtomcej](https://github.com/dtomcej))
|
||||
|
||||
## [v2.5.0-rc3](https://github.com/traefik/traefik/tree/v2.5.0-rc3) (2021-07-20)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.5.0-rc2...v2.5.0-rc3)
|
||||
|
||||
**Enhancements:**
|
||||
- **[consulcatalog]** Add Support for Consul Connect ([#7407](https://github.com/traefik/traefik/pull/7407) by [Gufran](https://github.com/Gufran))
|
||||
|
||||
**Bug fixes:**
|
||||
- **[k8s,k8s/gatewayapi]** Update Gateway API version to v0.3.0 ([#8253](https://github.com/traefik/traefik/pull/8253) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- **[middleware]** Library change for compress middleware to increase performance ([#8245](https://github.com/traefik/traefik/pull/8245) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins]** Update yaegi to v0.9.21 ([#8285](https://github.com/traefik/traefik/pull/8285) by [ldez](https://github.com/ldez))
|
||||
- **[plugins]** Downgrade yaegi to v0.9.19 ([#8282](https://github.com/traefik/traefik/pull/8282) by [ldez](https://github.com/ldez))
|
||||
- **[webui]** Fix dashboard to display middleware details ([#8284](https://github.com/traefik/traefik/pull/8284) by [tomMoulard](https://github.com/tomMoulard))
|
||||
|
||||
**Documentation:**
|
||||
- Fix KV reference documentation ([#8280](https://github.com/traefik/traefik/pull/8280) by [rtribotte](https://github.com/rtribotte))
|
||||
- Fix migration guide ([#8269](https://github.com/traefik/traefik/pull/8269) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Update generated and reference doc for plugins ([#8236](https://github.com/traefik/traefik/pull/8236) by [tomMoulard](https://github.com/tomMoulard))
|
||||
|
||||
**Misc:**
|
||||
- Merge current v2.4 into v2.5 ([#8263](https://github.com/traefik/traefik/pull/8263) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
## [v2.4.11](https://github.com/traefik/traefik/tree/v2.4.11) (2021-07-15)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.9...v2.4.11)
|
||||
|
||||
@@ -47,6 +408,80 @@
|
||||
|
||||
Release canceled.
|
||||
|
||||
## [v2.5.0-rc2](https://github.com/traefik/traefik/tree/v2.5.0-rc2) (2021-06-28)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.0-rc1...v2.5.0-rc2)
|
||||
|
||||
**Enhancements:**
|
||||
- **[file]** Update sprig to v3.2.0 ([#7746](https://github.com/traefik/traefik/pull/7746) by [sirlatrom](https://github.com/sirlatrom))
|
||||
- **[healthcheck]** Healthcheck: add support at the load-balancers of services level ([#8057](https://github.com/traefik/traefik/pull/8057) by [mpl](https://github.com/mpl))
|
||||
- **[http3]** Upgrade github.com/lucas-clemente/quic-go ([#8076](https://github.com/traefik/traefik/pull/8076) by [sylr](https://github.com/sylr))
|
||||
- **[http3]** Add HTTP3 support (experimental) ([#7724](https://github.com/traefik/traefik/pull/7724) by [juliens](https://github.com/juliens))
|
||||
- **[k8s,k8s/crd,k8s/ingress]** Ignore empty endpoint changes ([#7646](https://github.com/traefik/traefik/pull/7646) by [hensur](https://github.com/hensur))
|
||||
- **[k8s,k8s/crd]** Improve kubernetes external name service support for UDP ([#7773](https://github.com/traefik/traefik/pull/7773) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- **[k8s,k8s/crd]** Upgrade the CRD version from apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1 ([#7815](https://github.com/traefik/traefik/pull/7815) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- **[k8s,k8s/crd]** Add named port support to Kubernetes IngressRoute CRDs ([#7668](https://github.com/traefik/traefik/pull/7668) by [Cirrith](https://github.com/Cirrith))
|
||||
- **[k8s,k8s/gatewayapi]** Add wildcard hostname rule to kubernetes gateway ([#7963](https://github.com/traefik/traefik/pull/7963) by [jberger](https://github.com/jberger))
|
||||
- **[k8s,k8s/gatewayapi]** Allow crossprovider service reference ([#7774](https://github.com/traefik/traefik/pull/7774) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- **[k8s,k8s/gatewayapi]** Add support for TCPRoute and TLSRoute ([#8054](https://github.com/traefik/traefik/pull/8054) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s,k8s/ingress]** Filter ingress class resources by name ([#7915](https://github.com/traefik/traefik/pull/7915) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s,k8s/ingress]** Upgrade Ingress Handling to work with networkingv1/Ingress ([#7549](https://github.com/traefik/traefik/pull/7549) by [SantoDE](https://github.com/SantoDE))
|
||||
- **[k8s,k8s/ingress]** Upgrade IngressClass to use v1 over v1Beta on Kube 1.19+ ([#8089](https://github.com/traefik/traefik/pull/8089) by [SantoDE](https://github.com/SantoDE))
|
||||
- **[k8s,k8s/ingress]** Add k8s provider option to create services without endpoints ([#7593](https://github.com/traefik/traefik/pull/7593) by [Lucaber](https://github.com/Lucaber))
|
||||
- **[k8s,k8s/ingress]** Add ServersTransport annotation to k8s ingress provider ([#8084](https://github.com/traefik/traefik/pull/8084) by [wdullaer](https://github.com/wdullaer))
|
||||
- **[logs,middleware]** Add TLS version and cipher to the accessLog ([#7478](https://github.com/traefik/traefik/pull/7478) by [na4ma4](https://github.com/na4ma4))
|
||||
- **[metrics]** Allow to define datadogs metrics endpoint with env vars ([#7968](https://github.com/traefik/traefik/pull/7968) by [sylr](https://github.com/sylr))
|
||||
- **[metrics]** Add TLS certs expiration metric ([#6924](https://github.com/traefik/traefik/pull/6924) by [sylr](https://github.com/sylr))
|
||||
- **[middleware,metrics]** Add router metrics ([#7510](https://github.com/traefik/traefik/pull/7510) by [jorge07](https://github.com/jorge07))
|
||||
- **[middleware,tcp]** Add TCP Middlewares support ([#7813](https://github.com/traefik/traefik/pull/7813) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[middleware]** Deprecates ssl redirect headers middleware options ([#8160](https://github.com/traefik/traefik/pull/8160) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[middleware]** Headers: add `permissionsPolicy` and deprecate `featurePolicy` ([#8200](https://github.com/traefik/traefik/pull/8200) by [WLun001](https://github.com/WLun001))
|
||||
- **[middleware]** Removes headers middleware options ([#8161](https://github.com/traefik/traefik/pull/8161) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[plugins,provider]** Add plugin's support for provider ([#7794](https://github.com/traefik/traefik/pull/7794) by [ldez](https://github.com/ldez))
|
||||
- **[plugins]** Local private plugins. ([#8224](https://github.com/traefik/traefik/pull/8224) by [ldez](https://github.com/ldez))
|
||||
- **[rules]** Add routing IP rule matcher ([#8169](https://github.com/traefik/traefik/pull/8169) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[rules]** Support not in rules definition ([#8164](https://github.com/traefik/traefik/pull/8164) by [juliens](https://github.com/juliens))
|
||||
- **[server]** Improve host name resolution for TCP proxy ([#7971](https://github.com/traefik/traefik/pull/7971) by [H-M-H](https://github.com/H-M-H))
|
||||
- **[server]** Add ability to disable HTTP/2 in dynamic config ([#7645](https://github.com/traefik/traefik/pull/7645) by [jcuzzi](https://github.com/jcuzzi))
|
||||
- **[sticky-session]** Add a mechanism to format the sticky cookie value ([#8103](https://github.com/traefik/traefik/pull/8103) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[tls]** Mutualize TLS version and cipher code ([#7779](https://github.com/traefik/traefik/pull/7779) by [rtribotte](https://github.com/rtribotte))
|
||||
- **[tls]** Do not build a default certificate for ACME challenges store ([#7833](https://github.com/traefik/traefik/pull/7833) by [rkojedzinszky](https://github.com/rkojedzinszky))
|
||||
- **[tracing]** Use Datadog tracer environment variables to setup default config ([#7721](https://github.com/traefik/traefik/pull/7721) by [GianOrtiz](https://github.com/GianOrtiz))
|
||||
- **[tracing]** Update Elastic APM from 1.7.0 to 1.11.0 ([#8187](https://github.com/traefik/traefik/pull/8187) by [afitzek](https://github.com/afitzek))
|
||||
- **[tracing]** Override jaeger configuration with env variables ([#8198](https://github.com/traefik/traefik/pull/8198) by [mmatur](https://github.com/mmatur))
|
||||
- **[udp]** Add udp timeout configuration ([#6982](https://github.com/traefik/traefik/pull/6982) by [Lindenk](https://github.com/Lindenk))
|
||||
|
||||
**Bug fixes:**
|
||||
- **[k8s]** Remove logging of changed object with cast ([#8128](https://github.com/traefik/traefik/pull/8128) by [hensur](https://github.com/hensur))
|
||||
|
||||
**Documentation:**
|
||||
- **[k8s/crd]** Fix: regenerate crd ([#8114](https://github.com/traefik/traefik/pull/8114) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- **[k8s]** Clarify doc for ingressclass name in k8s 1.18+ ([#7944](https://github.com/traefik/traefik/pull/7944) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Update documentation references ([#8202](https://github.com/traefik/traefik/pull/8202) by [rtribotte](https://github.com/rtribotte))
|
||||
|
||||
**Misc:**
|
||||
- **[k8s,k8s/crd,tls]** Improve CA certificate loading from kubernetes secret ([#7789](https://github.com/traefik/traefik/pull/7789) by [rio](https://github.com/rio))
|
||||
- Merge current v2.4 into master ([#8221](https://github.com/traefik/traefik/pull/8221) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#8105](https://github.com/traefik/traefik/pull/8105) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.4 into master ([#8087](https://github.com/traefik/traefik/pull/8087) by [tomMoulard](https://github.com/tomMoulard))
|
||||
- Merge current v2.4 into master ([#8068](https://github.com/traefik/traefik/pull/8068) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#8058](https://github.com/traefik/traefik/pull/8058) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#8024](https://github.com/traefik/traefik/pull/8024) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#7969](https://github.com/traefik/traefik/pull/7969) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#7921](https://github.com/traefik/traefik/pull/7921) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7901](https://github.com/traefik/traefik/pull/7901) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7859](https://github.com/traefik/traefik/pull/7859) by [jbdoumenjou](https://github.com/jbdoumenjou))
|
||||
- Merge current v2.4 into master ([#7795](https://github.com/traefik/traefik/pull/7795) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.4 into master ([#8210](https://github.com/traefik/traefik/pull/8210) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7781](https://github.com/traefik/traefik/pull/7781) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.4 into master ([#7766](https://github.com/traefik/traefik/pull/7766) by [ldez](https://github.com/ldez))
|
||||
- Merge current v2.4 into master ([#7761](https://github.com/traefik/traefik/pull/7761) by [rtribotte](https://github.com/rtribotte))
|
||||
- Merge current v2.4 into master ([#7748](https://github.com/traefik/traefik/pull/7748) by [kevinpollet](https://github.com/kevinpollet))
|
||||
- Merge current v2.4 into master ([#7728](https://github.com/traefik/traefik/pull/7728) by [mmatur](https://github.com/mmatur))
|
||||
|
||||
## [v2.5.0-rc1](https://github.com/traefik/traefik/tree/v2.5.0-rc1) (2021-06-28)
|
||||
|
||||
Release canceled.
|
||||
|
||||
## [v2.4.9](https://github.com/traefik/traefik/tree/v2.4.9) (2021-06-21)
|
||||
[All Commits](https://github.com/traefik/traefik/compare/v2.4.8...v2.4.9)
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience,nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
@@ -30,15 +30,19 @@ Project maintainers have the right and responsibility to remove, edit, or reject
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or our community.
|
||||
|
||||
Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
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.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-2020 Containous SAS; 2020-2021 Traefik Labs
|
||||
Copyright (c) 2016-2020 Containous SAS; 2020-2022 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
|
||||
|
56
Makefile
56
Makefile
@@ -7,7 +7,7 @@ SHA := $(shell git rev-parse HEAD)
|
||||
VERSION_GIT := $(if $(TAG_NAME),$(TAG_NAME),$(SHA))
|
||||
VERSION := $(if $(VERSION),$(VERSION),$(VERSION_GIT))
|
||||
|
||||
BIND_DIR := "dist"
|
||||
BIND_DIR := dist
|
||||
|
||||
GIT_BRANCH := $(subst heads/,,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
|
||||
TRAEFIK_DEV_IMAGE := traefik-dev$(if $(GIT_BRANCH),:$(subst /,-,$(GIT_BRANCH)))
|
||||
@@ -15,7 +15,7 @@ TRAEFIK_DEV_IMAGE := traefik-dev$(if $(GIT_BRANCH),:$(subst /,-,$(GIT_BRANCH)))
|
||||
REPONAME := $(shell echo $(REPO) | tr '[:upper:]' '[:lower:]')
|
||||
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")
|
||||
INTEGRATION_OPTS := $(if $(MAKE_DOCKER_HOST),-e "DOCKER_HOST=$(MAKE_DOCKER_HOST)",-v "/var/run/docker.sock:/var/run/docker.sock")
|
||||
DOCKER_BUILD_ARGS := $(if $(DOCKER_VERSION), "--build-arg=DOCKER_VERSION=$(DOCKER_VERSION)",)
|
||||
|
||||
TRAEFIK_ENVS := \
|
||||
@@ -32,7 +32,8 @@ TRAEFIK_ENVS := \
|
||||
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 --add-host=host.docker.internal:127.0.0.1 $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS)
|
||||
DOCKER_RUN_TRAEFIK := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS)
|
||||
DOCKER_RUN_TRAEFIK_TEST := docker run --add-host=host.docker.internal:127.0.0.1 --rm --name=traefik --network traefik-test-network -v $(PWD):$(PWD) -w $(PWD) $(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
|
||||
@@ -59,12 +60,12 @@ build-webui-image:
|
||||
|
||||
## Generate WebUI
|
||||
generate-webui:
|
||||
if [ ! -d "static" ]; then \
|
||||
if [ ! -d "webui/static" ]; then \
|
||||
$(MAKE) build-webui-image; \
|
||||
mkdir -p static; \
|
||||
docker run --rm -v "$$PWD/static":'/src/static' traefik-webui npm run build:nc; \
|
||||
docker run --rm -v "$$PWD/static":'/src/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ../static; \
|
||||
echo 'For more information show `webui/readme.md`' > $$PWD/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md; \
|
||||
mkdir -p webui/static; \
|
||||
docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui npm run build:nc; \
|
||||
docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ./static; \
|
||||
echo 'For more information show `webui/readme.md`' > $$PWD/webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md; \
|
||||
fi
|
||||
|
||||
## Build the linux binary
|
||||
@@ -81,30 +82,27 @@ crossbinary-default-parallel:
|
||||
$(MAKE) build-dev-image crossbinary-default
|
||||
|
||||
## Run the unit and integration tests
|
||||
test: build-dev-image
|
||||
$(DOCKER_RUN_TRAEFIK) ./script/make.sh generate test-unit binary test-integration
|
||||
test: $(PRE_TARGET)
|
||||
-docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24
|
||||
trap 'docker network rm traefik-test-network' EXIT; \
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK_TEST),) ./script/make.sh generate test-unit binary test-integration
|
||||
|
||||
## Run the unit tests
|
||||
test-unit: $(PRE_TARGET)
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK)) ./script/make.sh generate test-unit
|
||||
-docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24
|
||||
trap 'docker network rm traefik-test-network' EXIT; \
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK_TEST)) ./script/make.sh generate test-unit
|
||||
|
||||
## Run the integration tests
|
||||
test-integration: $(PRE_TARGET)
|
||||
-docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24
|
||||
trap 'docker network rm traefik-test-network' EXIT; \
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK_TEST),) ./script/make.sh generate binary test-integration
|
||||
|
||||
## Pull all images for integration tests
|
||||
pull-images:
|
||||
grep --no-filename -E '^\s+image:' ./integration/resources/compose/*.yml | awk '{print $$2}' | sort | uniq | xargs -P 6 -n 1 docker pull
|
||||
|
||||
## Run the integration tests
|
||||
test-integration: $(PRE_TARGET) binary
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK),TEST_CONTAINER=1) ./script/make.sh test-integration
|
||||
TEST_HOST=1 ./script/make.sh test-integration
|
||||
|
||||
## Run the container integration tests
|
||||
test-integration-container: $(PRE_TARGET) binary
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK),TEST_CONTAINER=1) ./script/make.sh test-integration
|
||||
|
||||
## Run the host integration tests
|
||||
test-integration-host: $(PRE_TARGET) binary
|
||||
TEST_HOST=1 ./script/make.sh test-integration
|
||||
|
||||
## Validate code and docs
|
||||
validate-files: $(PRE_TARGET)
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK)) ./script/make.sh generate validate-lint validate-misspell
|
||||
@@ -117,7 +115,7 @@ validate: $(PRE_TARGET)
|
||||
|
||||
## Clean up static directory and build a Docker Traefik image
|
||||
build-image: binary
|
||||
rm -rf static
|
||||
rm -rf webui/static
|
||||
docker build -t $(TRAEFIK_IMAGE) .
|
||||
|
||||
## Build a Docker Traefik image
|
||||
@@ -140,14 +138,18 @@ docs-serve:
|
||||
docs-pull-images:
|
||||
make -C ./docs docs-pull-images
|
||||
|
||||
## Generate CRD clientset
|
||||
## Generate CRD clientset and CRD manifests
|
||||
generate-crd:
|
||||
@$(CURDIR)/script/code-gen.sh
|
||||
|
||||
## Generate code from dynamic configuration https://github.com/traefik/genconf
|
||||
generate-genconf:
|
||||
go run ./cmd/internal/gen/
|
||||
|
||||
## Create packages for the release
|
||||
release-packages: generate-webui $(PRE_TARGET)
|
||||
rm -rf dist
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK_NOTTY)) goreleaser release --skip-publish --timeout="60m"
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK_NOTTY)) goreleaser release --skip-publish --timeout="90m"
|
||||
$(if $(PRE_TARGET),$(DOCKER_RUN_TRAEFIK_NOTTY)) tar cfz dist/traefik-${VERSION}.src.tar.gz \
|
||||
--exclude-vcs \
|
||||
--exclude .idea \
|
||||
|
@@ -63,7 +63,7 @@ _(But if you'd rather configure some of your routes manually, Traefik supports t
|
||||
- Keeps access logs (JSON, CLF)
|
||||
- Fast
|
||||
- Exposes a Rest API
|
||||
- Packaged as a single binary file (made with :heart: with go) and available as a [tiny](https://microbadger.com/images/traefik) [official](https://hub.docker.com/r/_/traefik/) docker image
|
||||
- Packaged as a single binary file (made with :heart: with go) and available as an [official](https://hub.docker.com/r/_/traefik/) docker image
|
||||
|
||||
|
||||
## Supported Backends
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Security Policy
|
||||
|
||||
We strongly advise you to register your Traefik instances to [Pilot](http://pilot.traefik.io) to be notified of security advisories that apply to your Traefik version.
|
||||
We strongly advise you to register your Traefik instances to [Pilot](https://pilot.traefik.io) to be notified of security advisories that apply to your Traefik version.
|
||||
You can also join our security mailing list to be aware of the latest announcements from our security team.
|
||||
You can subscribe sending a mail to security+subscribe@traefik.io or on [the online viewer](https://groups.google.com/a/traefik.io/forum/#!forum/security).
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.16-alpine
|
||||
FROM golang:1.17-alpine
|
||||
|
||||
RUN apk --update upgrade \
|
||||
&& apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \
|
||||
@@ -13,19 +13,14 @@ RUN mkdir -p /usr/local/bin \
|
||||
&& curl -fL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
|
||||
| tar -xzC /usr/local/bin --transform 's#^.+/##x'
|
||||
|
||||
# Download go-bindata binary to bin folder in $GOPATH
|
||||
RUN mkdir -p /usr/local/bin \
|
||||
&& curl -fsSL -o /usr/local/bin/go-bindata https://github.com/containous/go-bindata/releases/download/v1.0.0/go-bindata \
|
||||
&& 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.41.1
|
||||
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOPATH/bin v1.43.0
|
||||
|
||||
# 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
|
||||
|
||||
# Download goreleaser binary to bin folder in $GOPATH
|
||||
RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
|
||||
RUN curl -sfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | sh
|
||||
|
||||
WORKDIR /go/src/github.com/traefik/traefik
|
||||
|
||||
|
347
cmd/internal/gen/centrifuge.go
Normal file
347
cmd/internal/gen/centrifuge.go
Normal file
@@ -0,0 +1,347 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"go/format"
|
||||
"go/importer"
|
||||
"go/token"
|
||||
"go/types"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/tools/imports"
|
||||
)
|
||||
|
||||
// File a kind of AST element that represents a file.
|
||||
type File struct {
|
||||
Package string
|
||||
Imports []string
|
||||
Elements []Element
|
||||
}
|
||||
|
||||
// Element is a simplified version of a symbol.
|
||||
type Element struct {
|
||||
Name string
|
||||
Value string
|
||||
}
|
||||
|
||||
// Centrifuge a centrifuge.
|
||||
// Generate Go Structures from Go structures.
|
||||
type Centrifuge struct {
|
||||
IncludedImports []string
|
||||
ExcludedTypes []string
|
||||
ExcludedFiles []string
|
||||
|
||||
TypeCleaner func(types.Type, string) string
|
||||
PackageCleaner func(string) string
|
||||
|
||||
rootPkg string
|
||||
fileSet *token.FileSet
|
||||
pkg *types.Package
|
||||
}
|
||||
|
||||
// NewCentrifuge creates a new Centrifuge.
|
||||
func NewCentrifuge(rootPkg string) (*Centrifuge, error) {
|
||||
fileSet := token.NewFileSet()
|
||||
|
||||
pkg, err := importer.ForCompiler(fileSet, "source", nil).Import(rootPkg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &Centrifuge{
|
||||
fileSet: fileSet,
|
||||
pkg: pkg,
|
||||
rootPkg: rootPkg,
|
||||
|
||||
TypeCleaner: func(typ types.Type, _ string) string {
|
||||
return typ.String()
|
||||
},
|
||||
PackageCleaner: func(s string) string {
|
||||
return s
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Run runs the code extraction and the code generation.
|
||||
func (c Centrifuge) Run(dest string, pkgName string) error {
|
||||
files, err := c.run(c.pkg.Scope(), c.rootPkg, pkgName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = fileWriter{baseDir: dest}.Write(files)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, p := range c.pkg.Imports() {
|
||||
if contains(c.IncludedImports, p.Path()) {
|
||||
fls, err := c.run(p.Scope(), p.Path(), p.Name())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = fileWriter{baseDir: filepath.Join(dest, p.Name())}.Write(fls)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c Centrifuge) run(sc *types.Scope, rootPkg string, pkgName string) (map[string]*File, error) {
|
||||
files := map[string]*File{}
|
||||
|
||||
for _, name := range sc.Names() {
|
||||
if contains(c.ExcludedTypes, name) {
|
||||
continue
|
||||
}
|
||||
|
||||
o := sc.Lookup(name)
|
||||
if !o.Exported() {
|
||||
continue
|
||||
}
|
||||
|
||||
filename := filepath.Base(c.fileSet.File(o.Pos()).Name())
|
||||
if contains(c.ExcludedFiles, path.Join(rootPkg, filename)) {
|
||||
continue
|
||||
}
|
||||
|
||||
fl, ok := files[filename]
|
||||
if !ok {
|
||||
files[filename] = &File{Package: pkgName}
|
||||
fl = files[filename]
|
||||
}
|
||||
|
||||
elt := Element{
|
||||
Name: name,
|
||||
}
|
||||
|
||||
switch ob := o.(type) {
|
||||
case *types.TypeName:
|
||||
|
||||
switch obj := ob.Type().(*types.Named).Underlying().(type) {
|
||||
case *types.Struct:
|
||||
elt.Value = c.writeStruct(name, obj, rootPkg, fl)
|
||||
|
||||
case *types.Map:
|
||||
elt.Value = fmt.Sprintf("type %s map[%s]%s\n", name, obj.Key().String(), c.TypeCleaner(obj.Elem(), rootPkg))
|
||||
|
||||
case *types.Slice:
|
||||
elt.Value = fmt.Sprintf("type %s []%v\n", name, c.TypeCleaner(obj.Elem(), rootPkg))
|
||||
|
||||
case *types.Basic:
|
||||
elt.Value = fmt.Sprintf("type %s %v\n", name, obj.Name())
|
||||
|
||||
default:
|
||||
log.Printf("OTHER TYPE::: %s %T\n", name, o.Type().(*types.Named).Underlying())
|
||||
continue
|
||||
}
|
||||
|
||||
default:
|
||||
log.Printf("OTHER::: %s %T\n", name, o)
|
||||
continue
|
||||
}
|
||||
|
||||
if len(elt.Value) > 0 {
|
||||
fl.Elements = append(fl.Elements, elt)
|
||||
}
|
||||
}
|
||||
|
||||
return files, nil
|
||||
}
|
||||
|
||||
func (c Centrifuge) writeStruct(name string, obj *types.Struct, rootPkg string, elt *File) string {
|
||||
b := strings.Builder{}
|
||||
b.WriteString(fmt.Sprintf("type %s struct {\n", name))
|
||||
|
||||
for i := 0; i < obj.NumFields(); i++ {
|
||||
field := obj.Field(i)
|
||||
|
||||
if !field.Exported() {
|
||||
continue
|
||||
}
|
||||
|
||||
fPkg := c.PackageCleaner(extractPackage(field.Type()))
|
||||
if fPkg != "" && fPkg != rootPkg {
|
||||
elt.Imports = append(elt.Imports, fPkg)
|
||||
}
|
||||
|
||||
fType := c.TypeCleaner(field.Type(), rootPkg)
|
||||
|
||||
if field.Embedded() {
|
||||
b.WriteString(fmt.Sprintf("\t%s\n", fType))
|
||||
continue
|
||||
}
|
||||
|
||||
values, ok := lookupTagValue(obj.Tag(i), "json")
|
||||
if len(values) > 0 && values[0] == "-" {
|
||||
continue
|
||||
}
|
||||
|
||||
b.WriteString(fmt.Sprintf("\t%s %s", field.Name(), fType))
|
||||
|
||||
if ok {
|
||||
b.WriteString(fmt.Sprintf(" `json:\"%s\"`", strings.Join(values, ",")))
|
||||
}
|
||||
|
||||
b.WriteString("\n")
|
||||
}
|
||||
|
||||
b.WriteString("}\n")
|
||||
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func lookupTagValue(raw, key string) ([]string, bool) {
|
||||
value, ok := reflect.StructTag(raw).Lookup(key)
|
||||
if !ok {
|
||||
return nil, ok
|
||||
}
|
||||
|
||||
values := strings.Split(value, ",")
|
||||
|
||||
if len(values) < 1 {
|
||||
return nil, true
|
||||
}
|
||||
|
||||
return values, true
|
||||
}
|
||||
|
||||
func extractPackage(t types.Type) string {
|
||||
switch tu := t.(type) {
|
||||
case *types.Named:
|
||||
return tu.Obj().Pkg().Path()
|
||||
|
||||
case *types.Slice:
|
||||
if v, ok := tu.Elem().(*types.Named); ok {
|
||||
return v.Obj().Pkg().Path()
|
||||
}
|
||||
return ""
|
||||
|
||||
case *types.Map:
|
||||
if v, ok := tu.Elem().(*types.Named); ok {
|
||||
return v.Obj().Pkg().Path()
|
||||
}
|
||||
return ""
|
||||
|
||||
case *types.Pointer:
|
||||
return extractPackage(tu.Elem())
|
||||
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func contains(values []string, value string) bool {
|
||||
for _, val := range values {
|
||||
if val == value {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
type fileWriter struct {
|
||||
baseDir string
|
||||
}
|
||||
|
||||
func (f fileWriter) Write(files map[string]*File) error {
|
||||
err := os.MkdirAll(f.baseDir, 0o755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for name, file := range files {
|
||||
err = f.writeFile(name, file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f fileWriter) writeFile(name string, desc *File) error {
|
||||
if len(desc.Elements) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
filename := filepath.Join(f.baseDir, name)
|
||||
|
||||
file, err := os.Create(filename)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create file: %w", err)
|
||||
}
|
||||
|
||||
defer func() { _ = file.Close() }()
|
||||
|
||||
b := bytes.NewBufferString("package ")
|
||||
b.WriteString(desc.Package)
|
||||
b.WriteString("\n")
|
||||
b.WriteString("// Code generated by centrifuge. DO NOT EDIT.\n")
|
||||
|
||||
b.WriteString("\n")
|
||||
f.writeImports(b, desc.Imports)
|
||||
b.WriteString("\n")
|
||||
|
||||
for _, elt := range desc.Elements {
|
||||
b.WriteString(elt.Value)
|
||||
b.WriteString("\n")
|
||||
}
|
||||
|
||||
// gofmt
|
||||
source, err := format.Source(b.Bytes())
|
||||
if err != nil {
|
||||
log.Println(b.String())
|
||||
return fmt.Errorf("failed to format sources: %w", err)
|
||||
}
|
||||
|
||||
// goimports
|
||||
process, err := imports.Process(filename, source, nil)
|
||||
if err != nil {
|
||||
log.Println(string(source))
|
||||
return fmt.Errorf("failed to format imports: %w", err)
|
||||
}
|
||||
|
||||
_, err = file.Write(process)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f fileWriter) writeImports(b io.StringWriter, imports []string) {
|
||||
if len(imports) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
uniq := map[string]struct{}{}
|
||||
|
||||
sort.Strings(imports)
|
||||
|
||||
_, _ = b.WriteString("import (\n")
|
||||
for _, s := range imports {
|
||||
if _, exist := uniq[s]; exist {
|
||||
continue
|
||||
}
|
||||
|
||||
uniq[s] = struct{}{}
|
||||
|
||||
_, _ = b.WriteString(fmt.Sprintf(` "%s"`+"\n", s))
|
||||
}
|
||||
|
||||
_, _ = b.WriteString(")\n")
|
||||
}
|
124
cmd/internal/gen/main.go
Normal file
124
cmd/internal/gen/main.go
Normal file
@@ -0,0 +1,124 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/build"
|
||||
"go/types"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const rootPkg = "github.com/traefik/traefik/v2/pkg/config/dynamic"
|
||||
|
||||
const (
|
||||
destModuleName = "github.com/traefik/genconf"
|
||||
destPkg = "dynamic"
|
||||
)
|
||||
|
||||
const marsh = `package %s
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type JSONPayload struct {
|
||||
*Configuration
|
||||
}
|
||||
|
||||
func (c JSONPayload) MarshalJSON() ([]byte, error) {
|
||||
if c.Configuration == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return json.Marshal(c.Configuration)
|
||||
}
|
||||
`
|
||||
|
||||
// main generate Go Structures from Go structures.
|
||||
// Allows to create an external module (destModuleName) used by the plugin's providers
|
||||
// that contains Go structs of the dynamic configuration and nothing else.
|
||||
// These Go structs do not have any non-exported fields and do not rely on any external dependencies.
|
||||
func main() {
|
||||
dest := filepath.Join(path.Join(build.Default.GOPATH, "src"), destModuleName, destPkg)
|
||||
|
||||
log.Println("Output:", dest)
|
||||
|
||||
err := run(dest)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func run(dest string) error {
|
||||
centrifuge, err := NewCentrifuge(rootPkg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
centrifuge.IncludedImports = []string{
|
||||
"github.com/traefik/traefik/v2/pkg/tls",
|
||||
"github.com/traefik/traefik/v2/pkg/types",
|
||||
}
|
||||
|
||||
centrifuge.ExcludedTypes = []string{
|
||||
// tls
|
||||
"CertificateStore", "Manager",
|
||||
// dynamic
|
||||
"Message", "Configurations",
|
||||
// types
|
||||
"HTTPCodeRanges", "HostResolverConfig",
|
||||
}
|
||||
|
||||
centrifuge.ExcludedFiles = []string{
|
||||
"github.com/traefik/traefik/v2/pkg/types/logs.go",
|
||||
"github.com/traefik/traefik/v2/pkg/types/metrics.go",
|
||||
}
|
||||
|
||||
centrifuge.TypeCleaner = cleanType
|
||||
centrifuge.PackageCleaner = cleanPackage
|
||||
|
||||
err = centrifuge.Run(dest, destPkg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return os.WriteFile(filepath.Join(dest, "marshaler.go"), []byte(fmt.Sprintf(marsh, destPkg)), 0o666)
|
||||
}
|
||||
|
||||
func cleanType(typ types.Type, base string) string {
|
||||
if typ.String() == "github.com/traefik/traefik/v2/pkg/tls.FileOrContent" {
|
||||
return "string"
|
||||
}
|
||||
|
||||
if typ.String() == "[]github.com/traefik/traefik/v2/pkg/tls.FileOrContent" {
|
||||
return "[]string"
|
||||
}
|
||||
|
||||
if typ.String() == "github.com/traefik/paerser/types.Duration" {
|
||||
return "string"
|
||||
}
|
||||
|
||||
if strings.Contains(typ.String(), base) {
|
||||
return strings.ReplaceAll(typ.String(), base+".", "")
|
||||
}
|
||||
|
||||
if strings.Contains(typ.String(), "github.com/traefik/traefik/v2/pkg/") {
|
||||
return strings.ReplaceAll(typ.String(), "github.com/traefik/traefik/v2/pkg/", "")
|
||||
}
|
||||
|
||||
return typ.String()
|
||||
}
|
||||
|
||||
func cleanPackage(src string) string {
|
||||
switch src {
|
||||
case "github.com/traefik/paerser/types":
|
||||
return ""
|
||||
case "github.com/traefik/traefik/v2/pkg/tls":
|
||||
return path.Join(destModuleName, destPkg, "tls")
|
||||
case "github.com/traefik/traefik/v2/pkg/types":
|
||||
return path.Join(destModuleName, destPkg, "types")
|
||||
default:
|
||||
return src
|
||||
}
|
||||
}
|
@@ -1,6 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/traefik/traefik/v2/pkg/config/static"
|
||||
"github.com/traefik/traefik/v2/pkg/plugins"
|
||||
)
|
||||
@@ -8,35 +10,69 @@ import (
|
||||
const outputDir = "./plugins-storage/"
|
||||
|
||||
func createPluginBuilder(staticConfiguration *static.Configuration) (*plugins.Builder, error) {
|
||||
client, plgs, devPlugin, err := initPlugins(staticConfiguration)
|
||||
client, plgs, localPlgs, err := initPlugins(staticConfiguration)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return plugins.NewBuilder(client, plgs, devPlugin)
|
||||
return plugins.NewBuilder(client, plgs, localPlgs)
|
||||
}
|
||||
|
||||
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)
|
||||
func initPlugins(staticCfg *static.Configuration) (*plugins.Client, map[string]plugins.Descriptor, map[string]plugins.LocalDescriptor, error) {
|
||||
err := checkUniquePluginNames(staticCfg.Experimental)
|
||||
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
|
||||
var client *plugins.Client
|
||||
plgs := map[string]plugins.Descriptor{}
|
||||
|
||||
if isPilotEnabled(staticCfg) && hasPlugins(staticCfg) {
|
||||
opts := plugins.ClientOptions{
|
||||
Output: outputDir,
|
||||
Token: staticCfg.Pilot.Token,
|
||||
}
|
||||
|
||||
var err error
|
||||
client, err = plugins.NewClient(opts)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
err = plugins.SetupRemotePlugins(client, staticCfg.Experimental.Plugins)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
plgs = staticCfg.Experimental.Plugins
|
||||
}
|
||||
|
||||
return client, staticCfg.Experimental.Plugins, staticCfg.Experimental.DevPlugin, nil
|
||||
localPlgs := map[string]plugins.LocalDescriptor{}
|
||||
|
||||
if hasLocalPlugins(staticCfg) {
|
||||
err := plugins.SetupLocalPlugins(staticCfg.Experimental.LocalPlugins)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
localPlgs = staticCfg.Experimental.LocalPlugins
|
||||
}
|
||||
|
||||
return client, plgs, localPlgs, nil
|
||||
}
|
||||
|
||||
func checkUniquePluginNames(e *static.Experimental) error {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
for s := range e.LocalPlugins {
|
||||
if _, ok := e.Plugins[s]; ok {
|
||||
return fmt.Errorf("the plugin's name %q must be unique", s)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func isPilotEnabled(staticCfg *static.Configuration) bool {
|
||||
@@ -44,6 +80,9 @@ func isPilotEnabled(staticCfg *static.Configuration) bool {
|
||||
}
|
||||
|
||||
func hasPlugins(staticCfg *static.Configuration) bool {
|
||||
return staticCfg.Experimental != nil &&
|
||||
(len(staticCfg.Experimental.Plugins) > 0 || staticCfg.Experimental.DevPlugin != nil)
|
||||
return staticCfg.Experimental != nil && len(staticCfg.Experimental.Plugins) > 0
|
||||
}
|
||||
|
||||
func hasLocalPlugins(staticCfg *static.Configuration) bool {
|
||||
return staticCfg.Experimental != nil && len(staticCfg.Experimental.LocalPlugins) > 0
|
||||
}
|
||||
|
@@ -2,7 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
stdlog "log"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -14,11 +16,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/coreos/go-systemd/daemon"
|
||||
assetfs "github.com/elazarl/go-bindata-assetfs"
|
||||
"github.com/go-acme/lego/v4/challenge"
|
||||
gokitmetrics "github.com/go-kit/kit/metrics"
|
||||
"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"
|
||||
@@ -106,10 +107,6 @@ func runCmd(staticConfiguration *static.Configuration) error {
|
||||
log.WithoutContext().Debugf("Static configuration loaded %s", string(jsonConf))
|
||||
}
|
||||
|
||||
if staticConfiguration.API != nil && staticConfiguration.API.Dashboard {
|
||||
staticConfiguration.API.DashboardAssets = &assetfs.AssetFS{Asset: genstatic.Asset, AssetInfo: genstatic.AssetInfo, AssetDir: genstatic.AssetDir, Prefix: "static"}
|
||||
}
|
||||
|
||||
if staticConfiguration.Global.CheckNewVersion {
|
||||
checkNewVersion()
|
||||
}
|
||||
@@ -123,12 +120,6 @@ func runCmd(staticConfiguration *static.Configuration) error {
|
||||
|
||||
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -235,6 +226,20 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Providers plugins
|
||||
|
||||
for name, conf := range staticConfiguration.Providers.Plugin {
|
||||
p, err := pluginBuilder.BuildProvider(name, conf)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("plugin: failed to build provider: %w", err)
|
||||
}
|
||||
|
||||
err = providerAggregator.AddProvider(p)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("plugin: failed to add provider: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Metrics
|
||||
|
||||
metricRegistries := registerMetricClients(staticConfiguration.Metrics)
|
||||
@@ -253,7 +258,7 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
|
||||
|
||||
accessLog := setupAccessLog(staticConfiguration.AccessLog)
|
||||
chainBuilder := middleware.NewChainBuilder(*staticConfiguration, metricsRegistry, accessLog)
|
||||
routerFactory := server.NewRouterFactory(*staticConfiguration, managerFactory, tlsManager, chainBuilder, pluginBuilder)
|
||||
routerFactory := server.NewRouterFactory(*staticConfiguration, managerFactory, tlsManager, chainBuilder, pluginBuilder, metricsRegistry)
|
||||
|
||||
// Watcher
|
||||
|
||||
@@ -269,6 +274,11 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
|
||||
watcher.AddListener(func(conf dynamic.Configuration) {
|
||||
ctx := context.Background()
|
||||
tlsManager.UpdateConfigs(ctx, conf.TLS.Stores, conf.TLS.Options, conf.TLS.Certificates)
|
||||
|
||||
gauge := metricsRegistry.TLSCertsNotAfterTimestampGauge()
|
||||
for _, certificate := range tlsManager.GetCertificates() {
|
||||
appendCertMetric(gauge, certificate)
|
||||
}
|
||||
})
|
||||
|
||||
// Metrics
|
||||
@@ -443,6 +453,20 @@ func registerMetricClients(metricsConfig *types.Metrics) []metrics.Registry {
|
||||
return registries
|
||||
}
|
||||
|
||||
func appendCertMetric(gauge gokitmetrics.Gauge, certificate *x509.Certificate) {
|
||||
sort.Strings(certificate.DNSNames)
|
||||
|
||||
labels := []string{
|
||||
"cn", certificate.Subject.CommonName,
|
||||
"serial", certificate.SerialNumber.String(),
|
||||
"sans", strings.Join(certificate.DNSNames, ","),
|
||||
}
|
||||
|
||||
notAfter := float64(certificate.NotAfter.Unix())
|
||||
|
||||
gauge.With(labels...).Set(notAfter)
|
||||
}
|
||||
|
||||
func setupAccessLog(conf *types.AccessLog) *accesslog.Handler {
|
||||
if conf == nil {
|
||||
return nil
|
||||
|
116
cmd/traefik/traefik_test.go
Normal file
116
cmd/traefik/traefik_test.go
Normal file
@@ -0,0 +1,116 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/go-kit/kit/metrics"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// FooCert is a PEM-encoded TLS cert.
|
||||
// generated from src/crypto/tls:
|
||||
// go run generate_cert.go --rsa-bits 1024 --host foo.org,foo.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
||||
const fooCert = `-----BEGIN CERTIFICATE-----
|
||||
MIICHzCCAYigAwIBAgIQXQFLeYRwc5X21t457t2xADANBgkqhkiG9w0BAQsFADAS
|
||||
MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw
|
||||
MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
|
||||
iQKBgQDCjn67GSs/khuGC4GNN+tVo1S+/eSHwr/hWzhfMqO7nYiXkFzmxi+u14CU
|
||||
Pda6WOeps7T2/oQEFMxKKg7zYOqkLSbjbE0ZfosopaTvEsZm/AZHAAvoOrAsIJOn
|
||||
SEiwy8h0tLA4z1SNR6rmIVQWyqBZEPAhBTQM1z7tFp48FakCFwIDAQABo3QwcjAO
|
||||
BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw
|
||||
AwEB/zAdBgNVHQ4EFgQUDHG3ASzeUezElup9zbPpBn/vjogwGwYDVR0RBBQwEoIH
|
||||
Zm9vLm9yZ4IHZm9vLmNvbTANBgkqhkiG9w0BAQsFAAOBgQBT+VLMbB9u27tBX8Aw
|
||||
ZrGY3rbNdBGhXVTksrjiF+6ZtDpD3iI56GH9zLxnqvXkgn3u0+Ard5TqF/xmdwVw
|
||||
NY0V/aWYfcL2G2auBCQrPvM03ozRnVUwVfP23eUzX2ORNHCYhd2ObQx4krrhs7cJ
|
||||
SWxtKwFlstoXY3K2g9oRD9UxdQ==
|
||||
-----END CERTIFICATE-----`
|
||||
|
||||
// BarCert is a PEM-encoded TLS cert.
|
||||
// generated from src/crypto/tls:
|
||||
// go run generate_cert.go --rsa-bits 1024 --host bar.org,bar.com --ca --start-date "Jan 1 00:00:00 1970" --duration=10000h
|
||||
const barCert = `-----BEGIN CERTIFICATE-----
|
||||
MIICHTCCAYagAwIBAgIQcuIcNEXzBHPoxna5S6wG4jANBgkqhkiG9w0BAQsFADAS
|
||||
MRAwDgYDVQQKEwdBY21lIENvMB4XDTcwMDEwMTAwMDAwMFoXDTcxMDIyMTE2MDAw
|
||||
MFowEjEQMA4GA1UEChMHQWNtZSBDbzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
|
||||
gYEAqtcrP+KA7D6NjyztGNIPMup9KiBMJ8QL+preog/YHR7SQLO3kGFhpS3WKMab
|
||||
SzMypC3ZX1PZjBP5ZzwaV3PFbuwlCkPlyxR2lOWmullgI7mjY0TBeYLDIclIzGRp
|
||||
mpSDDSpkW1ay2iJDSpXjlhmwZr84hrCU7BRTQJo91fdsRTsCAwEAAaN0MHIwDgYD
|
||||
VR0PAQH/BAQDAgKkMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMB
|
||||
Af8wHQYDVR0OBBYEFK8jnzFQvBAgWtfzOyXY4VSkwrTXMBsGA1UdEQQUMBKCB2Jh
|
||||
ci5vcmeCB2Jhci5jb20wDQYJKoZIhvcNAQELBQADgYEAJz0ifAExisC/ZSRhWuHz
|
||||
7qs1i6Nd4+YgEVR8dR71MChP+AMxucY1/ajVjb9xlLys3GPE90TWSdVppabEVjZY
|
||||
Oq11nPKc50ItTt8dMku6t0JHBmzoGdkN0V4zJCBqdQJxhop8JpYJ0S9CW0eT93h3
|
||||
ipYQSsmIINGtMXJ8VkP/MlM=
|
||||
-----END CERTIFICATE-----`
|
||||
|
||||
type gaugeMock struct {
|
||||
metrics map[string]float64
|
||||
labels string
|
||||
}
|
||||
|
||||
func (g gaugeMock) With(labelValues ...string) metrics.Gauge {
|
||||
g.labels = strings.Join(labelValues, ",")
|
||||
return g
|
||||
}
|
||||
|
||||
func (g gaugeMock) Set(value float64) {
|
||||
g.metrics[g.labels] = value
|
||||
}
|
||||
|
||||
func (g gaugeMock) Add(delta float64) {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func TestAppendCertMetric(t *testing.T) {
|
||||
testCases := []struct {
|
||||
desc string
|
||||
certs []string
|
||||
expected map[string]float64
|
||||
}{
|
||||
{
|
||||
desc: "No certs",
|
||||
certs: []string{},
|
||||
expected: map[string]float64{},
|
||||
},
|
||||
{
|
||||
desc: "One cert",
|
||||
certs: []string{fooCert},
|
||||
expected: map[string]float64{
|
||||
"cn,,serial,123624926713171615935660664614975025408,sans,foo.com,foo.org": 3.6e+09,
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Two certs",
|
||||
certs: []string{fooCert, barCert},
|
||||
expected: map[string]float64{
|
||||
"cn,,serial,123624926713171615935660664614975025408,sans,foo.com,foo.org": 3.6e+09,
|
||||
"cn,,serial,152706022658490889223053211416725817058,sans,bar.com,bar.org": 3.6e+07,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
test := test
|
||||
t.Run(test.desc, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
gauge := &gaugeMock{
|
||||
metrics: map[string]float64{},
|
||||
}
|
||||
|
||||
for _, cert := range test.certs {
|
||||
block, _ := pem.Decode([]byte(cert))
|
||||
parsedCert, err := x509.ParseCertificate(block.Bytes)
|
||||
require.NoError(t, err)
|
||||
|
||||
appendCertMetric(gauge, parsedCert)
|
||||
}
|
||||
|
||||
assert.Equal(t, test.expected, gauge.metrics)
|
||||
})
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
|
||||
FROM alpine:3.13 as alpine
|
||||
FROM alpine:3.14 as alpine
|
||||
|
||||
RUN apk --no-cache --no-progress add \
|
||||
libcurl \
|
||||
|
@@ -64,7 +64,6 @@ Requirements:
|
||||
|
||||
- `go` v1.16+
|
||||
- environment variable `GO111MODULE=on`
|
||||
- [go-bindata](https://github.com/containous/go-bindata) `GO111MODULE=off go get -u github.com/containous/go-bindata/...`
|
||||
|
||||
!!! tip "Source Directory"
|
||||
|
||||
@@ -101,18 +100,9 @@ Requirements:
|
||||
|
||||
Once you've set up your go environment and cloned the source repository, you can build Traefik.
|
||||
|
||||
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/traefik/traefik
|
||||
|
||||
# Get go-bindata. (Important: the ellipses are required.)
|
||||
GO111MODULE=off go get github.com/containous/go-bindata/...
|
||||
```
|
||||
|
||||
```bash
|
||||
# Generate UI static files
|
||||
rm -rf static/ autogen/; make generate-webui
|
||||
rm -rf ./webui/static/; make generate-webui
|
||||
|
||||
# required to merge non-code components into the final binary,
|
||||
# such as the web dashboard/UI
|
||||
|
@@ -29,7 +29,7 @@ docker run --rm -v /home/user/go/github/traefik/traefik:/mkdocs -p 8000:8000 tr
|
||||
|
||||
!!! tip "Default URL"
|
||||
|
||||
Your local documentation server will run by default on [http://127.0.0.1:8000](http://127.0.0.1:8000).
|
||||
Your local documentation server will run by default on <http://127.0.0.1:8000>.
|
||||
|
||||
If you only want to build the documentation without serving it locally, you can use the following command:
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
* Romain Tribotté [@rtribotte](https://github.com/rtribotte)
|
||||
* Kevin Pollet [@kevinpollet](https://github.com/kevinpollet)
|
||||
* Harold Ozouf [@jspdown](https://github.com/jspdown)
|
||||
* Tom Moulard [@tommoulard](https://github.com/tommoulard)
|
||||
|
||||
## Maintainer's Guidelines
|
||||
|
||||
|
@@ -74,7 +74,7 @@ traefik --help
|
||||
# or
|
||||
|
||||
docker run traefik[:version] --help
|
||||
# ex: docker run traefik:2.1 --help
|
||||
# ex: docker run traefik:v2.6 --help
|
||||
```
|
||||
|
||||
All available arguments can also be found [here](../reference/static-configuration/cli.md).
|
||||
|
@@ -125,7 +125,7 @@ http:
|
||||
the principle of the above example above (a catchall router) still stands,
|
||||
but the `unavailable` service should be adapted to fit such a need.
|
||||
|
||||
## Why Is My TLS Certificate Not Reloaded When Its Contents Change ?
|
||||
## Why Is My TLS Certificate Not Reloaded When Its Contents Change?
|
||||
|
||||
With the file provider,
|
||||
a configuration update is only triggered when one of the [watched](../providers/file.md#provider-configuration) configuration files is modified.
|
||||
@@ -137,3 +137,18 @@ a configuration update is _not_ triggered.
|
||||
To take into account the new certificate contents, the update of the dynamic configuration must be forced.
|
||||
One way to achieve that, is to trigger a file notification,
|
||||
for example, by using the `touch` command on the configuration file.
|
||||
|
||||
## What Are the Forwarded Headers When Proxying HTTP Requests?
|
||||
|
||||
By default, the following headers are automatically added when proxying requests:
|
||||
|
||||
| Property | HTTP Header |
|
||||
|---------------------------|----------------------------|
|
||||
| Client's IP | X-Forwarded-For, X-Real-Ip |
|
||||
| Host | X-Forwarded-Host |
|
||||
| Port | X-Forwarded-Port |
|
||||
| Protocol | X-Forwarded-Proto |
|
||||
| Proxy Server's Hostname | X-Forwarded-Server |
|
||||
|
||||
For more details,
|
||||
please check out the [forwarded header](../routing/entrypoints.md#forwarded-headers) documentation.
|
||||
|
@@ -11,12 +11,12 @@ You can install Traefik with the following flavors:
|
||||
|
||||
Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with one sample configuration file:
|
||||
|
||||
* [YAML](https://raw.githubusercontent.com/traefik/traefik/v2.4/traefik.sample.yml)
|
||||
* [TOML](https://raw.githubusercontent.com/traefik/traefik/v2.4/traefik.sample.toml)
|
||||
* [YAML](https://raw.githubusercontent.com/traefik/traefik/v2.6/traefik.sample.yml)
|
||||
* [TOML](https://raw.githubusercontent.com/traefik/traefik/v2.6/traefik.sample.toml)
|
||||
|
||||
```bash
|
||||
docker run -d -p 8080:8080 -p 80:80 \
|
||||
-v $PWD/traefik.yml:/etc/traefik/traefik.yml traefik:v2.4
|
||||
-v $PWD/traefik.yml:/etc/traefik/traefik.yml traefik:v2.6
|
||||
```
|
||||
|
||||
For more details, go to the [Docker provider documentation](../providers/docker.md)
|
||||
@@ -24,7 +24,7 @@ For more details, go to the [Docker provider documentation](../providers/docker.
|
||||
!!! tip
|
||||
|
||||
* Prefer a fixed version than the latest that could be an unexpected version.
|
||||
ex: `traefik:v2.1.4`
|
||||
ex: `traefik:v2.6`
|
||||
* Docker images are based from the [Alpine Linux Official image](https://hub.docker.com/_/alpine).
|
||||
* Any orchestrator using docker images can fetch the official Traefik docker image.
|
||||
|
||||
@@ -101,13 +101,13 @@ helm install traefik traefik/traefik
|
||||
|
||||
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 :
|
||||
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/
|
||||
It can then be reached at: `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`):
|
||||
|
@@ -15,7 +15,7 @@ version: '3'
|
||||
services:
|
||||
reverse-proxy:
|
||||
# The official v2 Traefik docker image
|
||||
image: traefik:v2.4
|
||||
image: traefik:v2.6
|
||||
# Enables the web UI and tells Traefik to listen to docker
|
||||
command: --api.insecure=true --providers.docker
|
||||
ports:
|
||||
@@ -36,7 +36,7 @@ Start your `reverse-proxy` with the following command:
|
||||
docker-compose up -d reverse-proxy
|
||||
```
|
||||
|
||||
You can open a browser and go to [http://localhost:8080/api/rawdata](http://localhost:8080/api/rawdata) to see Traefik's API rawdata (we'll go back there once we have launched a service in step 2).
|
||||
You can open a browser and go to `http://localhost:8080/api/rawdata` to see Traefik's API rawdata (we'll go back there once we have launched a service in step 2).
|
||||
|
||||
## Traefik Detects New Services and Creates the Route for You
|
||||
|
||||
@@ -61,7 +61,7 @@ Start the `whoami` service with the following command:
|
||||
docker-compose up -d whoami
|
||||
```
|
||||
|
||||
Go back to your browser ([http://localhost:8080/api/rawdata](http://localhost:8080/api/rawdata)) and see that Traefik has automatically detected the new container and updated its own configuration.
|
||||
Go back to your browser (`http://localhost:8080/api/rawdata`) and see that Traefik has automatically detected the new container and updated its own configuration.
|
||||
|
||||
When Traefik detects new services, it creates the corresponding routes so you can call them ... _let's see!_ (Here, we're using curl)
|
||||
|
||||
@@ -85,7 +85,7 @@ Run more instances of your `whoami` service with the following command:
|
||||
docker-compose up -d --scale whoami=2
|
||||
```
|
||||
|
||||
Go back to your browser ([http://localhost:8080/api/rawdata](http://localhost:8080/api/rawdata)) and see that Traefik has automatically detected the new instance of the container.
|
||||
Go back to your browser (`http://localhost:8080/api/rawdata`) and see that Traefik has automatically detected the new instance of the container.
|
||||
|
||||
Finally, see that Traefik load-balances between the two instances of your service by running the following command twice:
|
||||
|
||||
|
@@ -140,7 +140,11 @@ Please check the [configuration examples below](#configuration-examples) for mor
|
||||
|
||||
Traefik automatically tracks the expiry date of ACME certificates it generates.
|
||||
|
||||
If there are less than 30 days remaining before the certificate expires, Traefik will attempt to renew it automatically.
|
||||
By default, Traefik manages 90 days certificates,
|
||||
and starts to renew certificates 30 days before their expiry.
|
||||
|
||||
When using a certificates resolver that issues certificates with custom durations,
|
||||
one can configure the certificates' duration with the [`certificatesDuration`](#certificatesduration) option.
|
||||
|
||||
!!! info ""
|
||||
Certificates that are no longer used may still be renewed, as Traefik does not currently check if the certificate is being used before renewing.
|
||||
@@ -284,6 +288,7 @@ For complete details, refer to your provider's _Additional configuration_ link.
|
||||
|-------------------------------------------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
|
||||
| [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) |
|
||||
| [all-inkl](https://all-inkl.com) | `allinkl` | `ALL_INKL_LOGIN`, `ALL_INKL_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/allinkl) |
|
||||
| [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) |
|
||||
@@ -292,15 +297,15 @@ For complete details, refer to your provider's _Additional configuration_ link.
|
||||
| [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) |
|
||||
| [ClouDNS](https://www.cloudns.net/) | `cloudns` | `CLOUDNS_AUTH_ID`, `CLOUDNS_AUTH_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/cloudns) |
|
||||
| [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) |
|
||||
| [DNSimple](https://dnsimple.com) | `dnsimple` | `DNSIMPLE_OAUTH_TOKEN`, `DNSIMPLE_BASE_URL` | [Additional configuration](https://go-acme.github.io/lego/dns/dnsimple) |
|
||||
| [DNSPod](https://www.dnspod.com/) | `dnspod` | `DNSPOD_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/dnspod) |
|
||||
| [Domain Offensive (do.de)](https://www.do.de/) | `dode` | `DODE_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/dode) |
|
||||
| [Domeneshop](https://domene.shop) | `domeneshop` | `DOMENESHOP_API_TOKEN`, `DOMENESHOP_API_SECRET` | [Additional configuration](https://go-acme.github.io/lego/dns/domeneshop) |
|
||||
@@ -310,21 +315,25 @@ For complete details, refer to your provider's _Additional configuration_ link.
|
||||
| [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) |
|
||||
| [Epik](https://www.epik.com) | `epik` | `EPIK_SIGNATURE` | [Additional configuration](https://go-acme.github.io/lego/dns/epik) |
|
||||
| [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/edgedns) |
|
||||
| [Freemyip.com](https://freemyip.com) | `freemyip` | `FREEMYIP_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/freemyip) |
|
||||
| [G-Core Lab](https://gcorelabs.com/dns/) | `gcore` | `GCORE_PERMANENT_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/gcore) |
|
||||
| [Gandi v5](https://doc.livedns.gandi.net) | `gandiv5` | `GANDIV5_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/gandiv5) |
|
||||
| [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) |
|
||||
| [Hosttech](https://www.hosttech.eu) | `hosttech` | `HOSTTECH_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/hosttech) |
|
||||
| [HyperOne](https://www.hyperone.com) | `hyperone` | `HYPERONE_PASSPORT_LOCATION`, `HYPERONE_LOCATION_ID` | [Additional configuration](https://go-acme.github.io/lego/dns/hyperone) |
|
||||
| [IBM Cloud (SoftLayer)](https://www.ibm.com/cloud/) | `ibmcloud` | `SOFTLAYER_USERNAME`, `SOFTLAYER_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/ibmcloud) |
|
||||
| [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) |
|
||||
| [Infoblox](https://www.infoblox.com/) | `infoblox` | `INFOBLOX_USER`, `INFOBLOX_PASSWORD`, `INFOBLOX_HOST` | [Additional configuration](https://go-acme.github.io/lego/dns/infoblox) |
|
||||
| [Infomaniak](https://www.infomaniak.com) | `infomaniak` | `INFOMANIAK_ACCESS_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/infomaniak) |
|
||||
| [Internet.bs](https://internetbs.net) | `internetbs` | `INTERNET_BS_API_KEY`, `INTERNET_BS_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/internetbs) |
|
||||
| [INWX](https://www.inwx.de/en) | `inwx` | `INWX_USERNAME`, `INWX_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/inwx) |
|
||||
| [ionos](https://ionos.com/) | `ionos` | `IONOS_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/ionos) |
|
||||
| [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) |
|
||||
@@ -333,28 +342,28 @@ For complete details, refer to your provider's _Additional configuration_ link.
|
||||
| [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) |
|
||||
| [Loopia](https://loopia.com/) | `loopia` | `LOOPIA_API_PASSWORD`, `LOOPIA_API_USER` | [Additional configuration](https://go-acme.github.io/lego/dns/loopia) |
|
||||
| [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) |
|
||||
| [Namecheap](https://www.namecheap.com) | `namecheap` | `NAMECHEAP_API_USER`, `NAMECHEAP_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/namecheap) |
|
||||
| [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) |
|
||||
| [Nicmanager](https://www.nicmanager.com) | `nicmanager` | `NICMANAGER_API_EMAIL`, `NICMANAGER_API_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/nicmanager) |
|
||||
| [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) |
|
||||
| [Njalla](https://njal.la) | `njalla` | `NJALLA_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/njalla) |
|
||||
| [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) |
|
||||
| [Oracle Cloud](https://cloud.oracle.com/home) | `oraclecloud` | `OCI_COMPARTMENT_OCID`, `OCI_PRIVKEY_FILE`, `OCI_PRIVKEY_PASS`, `OCI_PUBKEY_FINGERPRINT`, `OCI_REGION`, `OCI_TENANCY_OCID`, `OCI_USER_OCID` | [Additional configuration](https://go-acme.github.io/lego/dns/oraclecloud) |
|
||||
| [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) |
|
||||
| [Porkbun](https://porkbun.com/) | `porkbun` | `PORKBUN_SECRET_API_KEY`, `PORKBUN_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/porkbun) |
|
||||
| [PowerDNS](https://www.powerdns.com) | `pdns` | `PDNS_API_KEY`, `PDNS_API_URL` | [Additional configuration](https://go-acme.github.io/lego/dns/pdns) |
|
||||
| [Rackspace](https://www.rackspace.com/cloud/dns) | `rackspace` | `RACKSPACE_USER`, `RACKSPACE_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/rackspace) |
|
||||
| [reg.ru](https://www.reg.ru) | `regru` | `REGRU_USERNAME`, `REGRU_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/regru) |
|
||||
| [RFC2136](https://tools.ietf.org/html/rfc2136) | `rfc2136` | `RFC2136_TSIG_KEY`, `RFC2136_TSIG_SECRET`, `RFC2136_TSIG_ALGORITHM`, `RFC2136_NAMESERVER` | [Additional configuration](https://go-acme.github.io/lego/dns/rfc2136) |
|
||||
| [Route 53](https://aws.amazon.com/route53/) | `route53` | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `[AWS_REGION]`, `[AWS_HOSTED_ZONE_ID]` or a configured user/instance IAM profile. | [Additional configuration](https://go-acme.github.io/lego/dns/route53) |
|
||||
| [RimuHosting](https://rimuhosting.com) | `rimuhosting` | `RIMUHOSTING_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/rimuhosting) |
|
||||
| [Route 53](https://aws.amazon.com/route53/) | `route53` | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `[AWS_REGION]`, `[AWS_HOSTED_ZONE_ID]` or a configured user/instance IAM profile. | [Additional configuration](https://go-acme.github.io/lego/dns/route53) |
|
||||
| [Sakura Cloud](https://cloud.sakura.ad.jp/) | `sakuracloud` | `SAKURACLOUD_ACCESS_TOKEN`, `SAKURACLOUD_ACCESS_TOKEN_SECRET` | [Additional configuration](https://go-acme.github.io/lego/dns/sakuracloud) |
|
||||
| [Scaleway](https://www.scaleway.com) | `scaleway` | `SCALEWAY_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/scaleway) |
|
||||
| [Selectel](https://selectel.ru/en/) | `selectel` | `SELECTEL_API_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/selectel) |
|
||||
@@ -362,7 +371,9 @@ For complete details, refer to your provider's _Additional configuration_ link.
|
||||
| [Simply.com](https://www.simply.com/en/domains/) | `simply` | `SIMPLY_ACCOUNT_NAME`, `SIMPLY_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/simply) |
|
||||
| [Sonic](https://www.sonic.com/) | `sonic` | `SONIC_USER_ID`, `SONIC_API_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/sonic) |
|
||||
| [Stackpath](https://www.stackpath.com/) | `stackpath` | `STACKPATH_CLIENT_ID`, `STACKPATH_CLIENT_SECRET`, `STACKPATH_STACK_ID` | [Additional configuration](https://go-acme.github.io/lego/dns/stackpath) |
|
||||
| [Tencent Cloud DNS](https://cloud.tencent.com/product/cns) | `tencentcloud` | `TENCENTCLOUD_SECRET_ID`, `TENCENTCLOUD_SECRET_KEY` | [Additional configuration](https://go-acme.github.io/lego/dns/tencentcloud) |
|
||||
| [TransIP](https://www.transip.nl/) | `transip` | `TRANSIP_ACCOUNT_NAME`, `TRANSIP_PRIVATE_KEY_PATH` | [Additional configuration](https://go-acme.github.io/lego/dns/transip) |
|
||||
| [UKFast SafeDNS](https://www.ukfast.co.uk/dns-hosting.html) | `safedns` | `SAFEDNS_AUTH_TOKEN` | [Additional configuration](https://go-acme.github.io/lego/dns/safedns) |
|
||||
| [VegaDNS](https://github.com/shupp/VegaDNS-API) | `vegadns` | `SECRET_VEGADNS_KEY`, `SECRET_VEGADNS_SECRET`, `VEGADNS_URL` | [Additional configuration](https://go-acme.github.io/lego/dns/vegadns) |
|
||||
| [Versio](https://www.versio.nl/domeinnamen) | `versio` | `VERSIO_USERNAME`, `VERSIO_PASSWORD` | [Additional configuration](https://go-acme.github.io/lego/dns/versio) |
|
||||
| [VinylDNS](https://www.vinyldns.io) | `vinyldns` | `VINYLDNS_ACCESS_KEY`, `VINYLDNS_SECRET_KEY`, `VINYLDNS_HOST` | [Additional configuration](https://go-acme.github.io/lego/dns/vinyldns) |
|
||||
@@ -372,6 +383,9 @@ For complete details, refer to your provider's _Additional configuration_ link.
|
||||
| [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) |
|
||||
| External Program | `exec` | `EXEC_PATH` | [Additional configuration](https://go-acme.github.io/lego/dns/exec) |
|
||||
| HTTP request | `httpreq` | `HTTPREQ_ENDPOINT`, `HTTPREQ_MODE`, `HTTPREQ_USERNAME`, `HTTPREQ_PASSWORD` [^1] | [Additional configuration](https://go-acme.github.io/lego/dns/httpreq) |
|
||||
| manual | `manual` | none, but you need to run Traefik interactively [^4], turn on debug log to see instructions and press <kbd>Enter</kbd>. | |
|
||||
|
||||
[^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)
|
||||
@@ -525,6 +539,50 @@ docker run -v "/my/host/acme:/etc/traefik/acme" traefik
|
||||
!!! warning
|
||||
For concurrency reasons, this file cannot be shared across multiple instances of Traefik.
|
||||
|
||||
### `certificatesDuration`
|
||||
|
||||
_Optional, Default=2160_
|
||||
|
||||
The `certificatesDuration` option defines the certificates' duration in hours.
|
||||
It defaults to `2160` (90 days) to follow Let's Encrypt certificates' duration.
|
||||
|
||||
!!! warning "Traefik cannot manage certificates with a duration lower than 1 hour."
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
certificatesResolvers:
|
||||
myresolver:
|
||||
acme:
|
||||
# ...
|
||||
certificatesDuration: 72
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[certificatesResolvers.myresolver.acme]
|
||||
# ...
|
||||
certificatesDuration=72
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesresolvers.myresolver.acme.certificatesduration=72
|
||||
# ...
|
||||
```
|
||||
|
||||
`certificatesDuration` is used to calculate two durations:
|
||||
|
||||
- `Renew Period`: the period before the end of the certificate duration, during which the certificate should be renewed.
|
||||
- `Renew Interval`: the interval between renew attempts.
|
||||
|
||||
| Certificate Duration | Renew Period | Renew Interval |
|
||||
|----------------------|-------------------|-------------------------|
|
||||
| >= 1 year | 4 months | 1 week |
|
||||
| >= 90 days | 30 days | 1 day |
|
||||
| >= 7 days | 1 day | 1 hour |
|
||||
| >= 24 hours | 6 hours | 10 min |
|
||||
| < 24 hours | 20 min | 1 min |
|
||||
|
||||
### `preferredChain`
|
||||
|
||||
_Optional, Default=""_
|
||||
@@ -552,7 +610,7 @@ certificatesResolvers:
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesresolvers.myresolver.acme.preferredChain="ISRG Root X1"
|
||||
--certificatesresolvers.myresolver.acme.preferredChain=ISRG Root X1
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -580,7 +638,7 @@ certificatesResolvers:
|
||||
|
||||
```bash tab="CLI"
|
||||
# ...
|
||||
--certificatesresolvers.myresolver.acme.keyType="RSA4096"
|
||||
--certificatesresolvers.myresolver.acme.keyType=RSA4096
|
||||
# ...
|
||||
```
|
||||
|
||||
|
@@ -22,6 +22,14 @@
|
||||
#
|
||||
# caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
|
||||
# The certificates' duration in hours.
|
||||
# It defaults to 2160 (90 days) to follow Let's Encrypt certificates' duration.
|
||||
#
|
||||
# Optional
|
||||
# Default: 2160
|
||||
#
|
||||
# certificatesDuration=2160
|
||||
|
||||
# Preferred chain to use.
|
||||
#
|
||||
# If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
|
@@ -21,6 +21,14 @@
|
||||
#
|
||||
--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
|
||||
# The certificates' duration in hours.
|
||||
# It defaults to 2160 (90 days) to follow Let's Encrypt certificates' duration.
|
||||
#
|
||||
# Optional
|
||||
# Default: 2160
|
||||
#
|
||||
--certificatesresolvers.myresolver.acme.certificatesDuration=2160
|
||||
|
||||
# Preferred chain to use.
|
||||
#
|
||||
# If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
|
@@ -24,6 +24,14 @@ certificatesResolvers:
|
||||
#
|
||||
# caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
|
||||
# The certificates' duration in hours.
|
||||
# It defaults to 2160 (90 days) to follow Let's Encrypt certificates' duration.
|
||||
#
|
||||
# Optional
|
||||
# Default: 2160
|
||||
#
|
||||
# certificatesDuration: 2160
|
||||
|
||||
# Preferred chain to use.
|
||||
#
|
||||
# If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
|
||||
|
@@ -399,6 +399,47 @@ spec:
|
||||
preferServerCipherSuites: true
|
||||
```
|
||||
|
||||
### ALPN Protocols
|
||||
|
||||
_Optional, Default="h2, http/1.1, acme-tls/1"_
|
||||
|
||||
This option allows to specify the list of supported application level protocols for the TLS handshake,
|
||||
in order of preference.
|
||||
If the client supports ALPN, the selected protocol will be one from this list,
|
||||
and the connection will fail if there is no mutually supported protocol.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Dynamic configuration
|
||||
|
||||
tls:
|
||||
options:
|
||||
default:
|
||||
alpnProtocols:
|
||||
- http/1.1
|
||||
- h2
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Dynamic configuration
|
||||
|
||||
[tls.options]
|
||||
[tls.options.default]
|
||||
alpnProtocols = ["http/1.1", "h2"]
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: TLSOption
|
||||
metadata:
|
||||
name: default
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
alpnProtocols:
|
||||
- http/1.1
|
||||
- h2
|
||||
```
|
||||
|
||||
### Client Authentication (mTLS)
|
||||
|
||||
Traefik supports mutual authentication, through the `clientAuth` section.
|
||||
@@ -447,7 +488,7 @@ metadata:
|
||||
|
||||
spec:
|
||||
clientAuth:
|
||||
# the CA certificate is extracted from key `tls.ca` of the given secrets.
|
||||
# the CA certificate is extracted from key `tls.ca` or `ca.crt` of the given secrets.
|
||||
secretNames:
|
||||
- secretCA
|
||||
clientAuthType: RequireAndVerifyClientCert
|
||||
|
@@ -3,7 +3,7 @@
|
||||
Prefixing the Path
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The AddPrefix middleware updates the path of a request before forwarding it.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
Adding Basic Authentication
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The BasicAuth middleware restricts access to your services to known users.
|
||||
|
||||
@@ -88,12 +88,21 @@ The `users` option is an array of authorized users. Each user must be declared u
|
||||
- If both `users` and `usersFile` are provided, the two are merged. The contents of `usersFile` have precedence over the values in `users`.
|
||||
- For security reasons, the field `users` doesn't exist for Kubernetes IngressRoute, and one should use the `secret` field instead.
|
||||
|
||||
!!! note "Kubernetes kubernetes.io/basic-auth secret type"
|
||||
|
||||
Kubernetes supports a special `kubernetes.io/basic-auth` secret type.
|
||||
This secret must contain two keys: `username` and `password`.
|
||||
Please note that these keys are not hashed or encrypted in any way, and therefore is less secure than other methods.
|
||||
You can find more information on the [Kubernetes Basic Authentication Secret Documentation](https://kubernetes.io/docs/concepts/configuration/secret/#basic-authentication-secret)
|
||||
|
||||
```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 a user:password pair, the following command can be used:
|
||||
# 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"
|
||||
```
|
||||
@@ -118,11 +127,24 @@ kind: Secret
|
||||
metadata:
|
||||
name: authsecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
users: |2
|
||||
dGVzdDokYXByMSRINnVza2trVyRJZ1hMUDZld1RyU3VCa1RycUU4d2ovCnRlc3QyOiRhcHIxJGQ5
|
||||
aHI5SEJCJDRIeHdnVWlyM0hQNEVzZ2dQL1FObzAK
|
||||
|
||||
---
|
||||
# This is an alternate auth secret that demonstrates the basic-auth secret type.
|
||||
# Note: the password is not hashed, and is merely base64 encoded.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: authsecret2
|
||||
namespace: default
|
||||
type: kubernetes.io/basic-auth
|
||||
data:
|
||||
username: dXNlcg== # username: user
|
||||
password: cGFzc3dvcmQ= # password: password
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
@@ -3,7 +3,7 @@
|
||||
How to Read the Request before Forwarding It
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The Buffering middleware limits the size of requests that can be forwarded to services.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
When One Isn't Enough
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The Chain middleware enables you to define reusable combinations of other pieces of middleware.
|
||||
It makes reusing the same groups easier.
|
@@ -3,7 +3,7 @@
|
||||
Don't Waste Time Calling Unhealthy Services
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The circuit breaker protects your system from stacking requests to unhealthy services, resulting in cascading failures.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
Compress Responses before Sending them to the Client
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The Compress middleware uses gzip compression.
|
||||
|
||||
@@ -60,7 +60,7 @@ http:
|
||||
|
||||
Responses are compressed when the following criteria are all met:
|
||||
|
||||
* The response body is larger than `1400` bytes.
|
||||
* The response body is larger than the configured minimum amount of bytes (default is `1024`).
|
||||
* The `Accept-Encoding` request header contains `gzip`.
|
||||
* The response is not already compressed, i.e. the `Content-Encoding` response header is not already set.
|
||||
|
||||
@@ -122,3 +122,55 @@ http:
|
||||
[http.middlewares.test-compress.compress]
|
||||
excludedContentTypes = ["text/event-stream"]
|
||||
```
|
||||
|
||||
### `minResponseBodyBytes`
|
||||
|
||||
`minResponseBodyBytes` specifies the minimum amount of bytes a response body must have to be compressed.
|
||||
|
||||
The default value is `1024`, which should be a reasonable value for most cases.
|
||||
|
||||
Responses smaller than the specified values will not be compressed.
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-compress.compress.minresponsebodybytes=1200"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: test-compress
|
||||
spec:
|
||||
compress:
|
||||
minResponseBodyBytes: 1200
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
- "traefik.http.middlewares.test-compress.compress.minresponsebodybytes=1200"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.test-compress.compress.minresponsebodybytes": 1200
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-compress.compress.minresponsebodybytes=1200"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
http:
|
||||
middlewares:
|
||||
test-compress:
|
||||
compress:
|
||||
minResponseBodyBytes: 1200
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-compress.compress]
|
||||
minResponseBodyBytes = 1200
|
||||
```
|
@@ -3,7 +3,7 @@
|
||||
Adding Digest Authentication
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The DigestAuth middleware restricts access to your services to known users.
|
||||
|
@@ -3,11 +3,12 @@
|
||||
It Has Never Been Easier to Say That Something Went Wrong
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The ErrorPage middleware returns a custom page in lieu of the default, according to configured ranges of HTTP Status codes.
|
||||
|
||||
!!! important
|
||||
|
||||
The error page itself is _not_ hosted by Traefik.
|
||||
|
||||
## Configuration Examples
|
||||
@@ -112,6 +113,11 @@ The service that will serve the new requested error page.
|
||||
|
||||
In Kubernetes, you need to reference a Kubernetes Service instead of a Traefik service.
|
||||
|
||||
!!! info "Host Header"
|
||||
|
||||
By default, the client `Host` header value is forwarded to the configured error [service](#service).
|
||||
To forward the `Host` value corresponding to the configured error service URL, the [passHostHeader](../../../routing/services/#pass-host-header) option must be set to `false`.
|
||||
|
||||
### `query`
|
||||
|
||||
The URL for the error page (hosted by `service`). You can use the `{status}` variable in the `query` option in order to insert the status code in the URL.
|
@@ -3,7 +3,7 @@
|
||||
Using an External Service to Forward Authentication
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The ForwardAuth middleware delegates authentication to an external service.
|
||||
If the service answers with a 2XX code, access is granted, and the original request is performed.
|
||||
@@ -284,6 +284,12 @@ http:
|
||||
authResponseHeadersRegex = "^X-"
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
When defining a regular expression within YAML, any escaped character needs to be escaped twice: `example\.com` needs to be written as `example\\.com`.
|
||||
|
||||
### `authRequestHeaders`
|
||||
|
||||
The `authRequestHeaders` option is the list of the headers to copy from the request to the authentication server.
|
||||
@@ -343,11 +349,16 @@ http:
|
||||
|
||||
### `tls`
|
||||
|
||||
The `tls` option is the TLS configuration from Traefik to the authentication server.
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to the authentication server.
|
||||
|
||||
Certificate Authority used for the secured connection to the authentication server.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secured connection to the authentication server,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
@@ -373,7 +384,8 @@ metadata:
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
# Must contain a certificate under either a `tls.ca` or a `ca.crt` key.
|
||||
tls.ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
@@ -409,13 +421,15 @@ http:
|
||||
ca = "path/to/local.crt"
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to the authentication server.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to the authentication server.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -471,9 +485,12 @@ http:
|
||||
caOptional = true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
The public certificate used for the secure connection to the authentication server.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to the authentication server.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
@@ -546,9 +563,12 @@ http:
|
||||
|
||||
For security reasons, the field does not exist for Kubernetes IngressRoute, and one should use the `secret` field instead.
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
The private certificate used for the secure connection to the authentication server.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to the authentication server.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
@@ -621,7 +641,9 @@ http:
|
||||
|
||||
For security reasons, the field does not exist for Kubernetes IngressRoute, and one should use the `secret` field instead.
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to the authentication server accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
@@ -3,10 +3,12 @@
|
||||
Managing Request/Response headers
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
The Headers middleware manages the headers of requests and responses.
|
||||
|
||||
A set of forwarded headers are automatically added by default. See the [FAQ](../../getting-started/faq.md#what-are-the-forwarded-headers-when-proxying-http-requests) for more information.
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
### Adding Headers to the Request and the Response
|
||||
@@ -141,13 +143,13 @@ http:
|
||||
|
||||
### Using Security Headers
|
||||
|
||||
Security-related headers (HSTS headers, SSL redirection, Browser XSS filter, etc) can be managed similarly to custom headers as shown above.
|
||||
Security-related headers (HSTS headers, Browser XSS filter, etc) can be managed similarly to custom headers as shown above.
|
||||
This functionality makes it possible to easily use security features by adding headers.
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
- "traefik.http.middlewares.testHeader.headers.framedeny=true"
|
||||
- "traefik.http.middlewares.testHeader.headers.sslredirect=true"
|
||||
- "traefik.http.middlewares.testHeader.headers.browserxssfilter=true"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
@@ -158,25 +160,25 @@ metadata:
|
||||
spec:
|
||||
headers:
|
||||
frameDeny: true
|
||||
sslRedirect: true
|
||||
browserxssfilter: true
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
- "traefik.http.middlewares.testheader.headers.framedeny=true"
|
||||
- "traefik.http.middlewares.testheader.headers.sslredirect=true"
|
||||
- "traefik.http.middlewares.testheader.headers.browserxssfilter=true"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.testheader.headers.framedeny": "true",
|
||||
"traefik.http.middlewares.testheader.headers.sslredirect": "true"
|
||||
"traefik.http.middlewares.testheader.headers.browserxssfilter": "true"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
labels:
|
||||
- "traefik.http.middlewares.testheader.headers.framedeny=true"
|
||||
- "traefik.http.middlewares.testheader.headers.sslredirect=true"
|
||||
- "traefik.http.middlewares.testheader.headers.browserxssfilter=true"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
@@ -185,14 +187,14 @@ http:
|
||||
testHeader:
|
||||
headers:
|
||||
frameDeny: true
|
||||
sslRedirect: true
|
||||
browserxssfilter: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[http.middlewares]
|
||||
[http.middlewares.testHeader.headers]
|
||||
frameDeny = true
|
||||
sslRedirect = true
|
||||
browserxssfilter = true
|
||||
```
|
||||
|
||||
### CORS Headers
|
||||
@@ -331,7 +333,9 @@ It allows all origins that contain any match of a regular expression in the `acc
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
When defining a regular expression within YAML, any escaped character needs to be escaped twice: `example\.com` needs to be written as `example\\.com`.
|
||||
|
||||
### `accessControlExposeHeaders`
|
||||
|
||||
@@ -355,14 +359,26 @@ The `hostsProxyHeaders` option is a set of header keys that may hold a proxied h
|
||||
|
||||
### `sslRedirect`
|
||||
|
||||
!!! warning
|
||||
|
||||
Deprecated in favor of [EntryPoint redirection](../../routing/entrypoints.md#redirection) or the [RedirectScheme middleware](./redirectscheme.md).
|
||||
|
||||
The `sslRedirect` only allow HTTPS requests when set to `true`.
|
||||
|
||||
### `sslTemporaryRedirect`
|
||||
|
||||
!!! warning
|
||||
|
||||
Deprecated in favor of [EntryPoint redirection](../../routing/entrypoints.md#redirection) or the [RedirectScheme middleware](./redirectscheme.md).
|
||||
|
||||
Set `sslTemporaryRedirect` to `true` to force an SSL redirection using a 302 (instead of a 301).
|
||||
|
||||
### `sslHost`
|
||||
|
||||
!!! warning
|
||||
|
||||
Deprecated in favor of the [RedirectRegex middleware](./redirectregex.md).
|
||||
|
||||
The `sslHost` option is the host name that is used to redirect HTTP requests to HTTPS.
|
||||
|
||||
### `sslProxyHeaders`
|
||||
@@ -372,6 +388,10 @@ It can be useful when using other proxies (example: `"X-Forwarded-Proto": "https
|
||||
|
||||
### `sslForceHost`
|
||||
|
||||
!!! warning
|
||||
|
||||
Deprecated in favor of the [RedirectRegex middleware](./redirectregex.md).
|
||||
|
||||
Set `sslForceHost` to `true` and set `sslHost` to force requests to use `SSLHost` regardless of whether they already use SSL.
|
||||
|
||||
### `stsSeconds`
|
||||
@@ -427,8 +447,16 @@ The `referrerPolicy` allows sites to control whether browsers forward the `Refer
|
||||
|
||||
### `featurePolicy`
|
||||
|
||||
!!! warning
|
||||
|
||||
Deprecated in favor of `permissionsPolicy`
|
||||
|
||||
The `featurePolicy` allows sites to control browser features.
|
||||
|
||||
### `permissionsPolicy`
|
||||
|
||||
The `permissionsPolicy` allows sites to control browser features.
|
||||
|
||||
### `isDevelopment`
|
||||
|
||||
Set `isDevelopment` to `true` when developing to mitigate the unwanted effects of the `AllowedHosts`, SSL, and STS options.
|
@@ -3,7 +3,7 @@
|
||||
Limiting the Number of Simultaneous In-Flight Requests
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
To proactively prevent services from being overwhelmed with high load, the number of allowed simultaneous in-flight requests can be limited.
|
||||
|
||||
@@ -115,7 +115,7 @@ http:
|
||||
### `sourceCriterion`
|
||||
|
||||
The `sourceCriterion` option defines what criterion is used to group requests as originating from a common source.
|
||||
The precedence order is `ipStrategy`, then `requestHeaderName`, then `requestHost`.
|
||||
If several strategies are defined at the same time, an error will be raised.
|
||||
If none are set, the default is to use the `requestHost`.
|
||||
|
||||
#### `sourceCriterion.ipStrategy`
|
@@ -3,7 +3,7 @@
|
||||
Limiting Clients to Specific IPs
|
||||
{: .subtitle }
|
||||
|
||||

|
||||

|
||||
|
||||
IPWhitelist accepts / refuses requests based on the client IP.
|
||||
|
150
docs/content/middlewares/http/overview.md
Normal file
150
docs/content/middlewares/http/overview.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# HTTP Middlewares
|
||||
|
||||
Controlling connections
|
||||
{: .subtitle }
|
||||
|
||||

|
||||
|
||||
## Configuration Example
|
||||
|
||||
```yaml tab="Docker"
|
||||
# As a Docker Label
|
||||
whoami:
|
||||
# A container that exposes an API to show its IP address
|
||||
image: traefik/whoami
|
||||
labels:
|
||||
# Create a middleware named `foo-add-prefix`
|
||||
- "traefik.http.middlewares.foo-add-prefix.addprefix.prefix=/foo"
|
||||
# Apply the middleware named `foo-add-prefix` to the router named `router1`
|
||||
- "traefik.http.routers.router1.middlewares=foo-add-prefix@docker"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes IngressRoute"
|
||||
# As a Kubernetes Traefik IngressRoute
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: middlewares.traefik.containo.us
|
||||
spec:
|
||||
group: traefik.containo.us
|
||||
version: v1alpha1
|
||||
names:
|
||||
kind: Middleware
|
||||
plural: middlewares
|
||||
singular: middleware
|
||||
scope: Namespaced
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: stripprefix
|
||||
spec:
|
||||
stripPrefix:
|
||||
prefixes:
|
||||
- /stripit
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: ingressroute
|
||||
spec:
|
||||
# more fields...
|
||||
routes:
|
||||
# more fields...
|
||||
middlewares:
|
||||
- name: stripprefix
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
# Create a middleware named `foo-add-prefix`
|
||||
- "traefik.http.middlewares.foo-add-prefix.addprefix.prefix=/foo"
|
||||
# Apply the middleware named `foo-add-prefix` to the router named `router1`
|
||||
- "traefik.http.routers.router1.middlewares=foo-add-prefix@consulcatalog"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.foo-add-prefix.addprefix.prefix": "/foo",
|
||||
"traefik.http.routers.router1.middlewares": "foo-add-prefix@marathon"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# As a Rancher Label
|
||||
labels:
|
||||
# Create a middleware named `foo-add-prefix`
|
||||
- "traefik.http.middlewares.foo-add-prefix.addprefix.prefix=/foo"
|
||||
# Apply the middleware named `foo-add-prefix` to the router named `router1`
|
||||
- "traefik.http.routers.router1.middlewares=foo-add-prefix@rancher"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# As TOML Configuration File
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
middlewares = ["foo-add-prefix"]
|
||||
rule = "Host(`example.com`)"
|
||||
|
||||
[http.middlewares]
|
||||
[http.middlewares.foo-add-prefix.addPrefix]
|
||||
prefix = "/foo"
|
||||
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.loadBalancer]
|
||||
|
||||
[[http.services.service1.loadBalancer.servers]]
|
||||
url = "http://127.0.0.1:80"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# As YAML Configuration File
|
||||
http:
|
||||
routers:
|
||||
router1:
|
||||
service: service1
|
||||
middlewares:
|
||||
- "foo-add-prefix"
|
||||
rule: "Host(`example.com`)"
|
||||
|
||||
middlewares:
|
||||
foo-add-prefix:
|
||||
addPrefix:
|
||||
prefix: "/foo"
|
||||
|
||||
services:
|
||||
service1:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://127.0.0.1:80"
|
||||
```
|
||||
|
||||
## Available HTTP Middlewares
|
||||
|
||||
| Middleware | Purpose | Area |
|
||||
|-------------------------------------------|---------------------------------------------------|-----------------------------|
|
||||
| [AddPrefix](addprefix.md) | Adds a Path Prefix | Path Modifier |
|
||||
| [BasicAuth](basicauth.md) | Adds Basic Authentication | Security, Authentication |
|
||||
| [Buffering](buffering.md) | Buffers the request/response | Request Lifecycle |
|
||||
| [Chain](chain.md) | Combines multiple pieces of middleware | Misc |
|
||||
| [CircuitBreaker](circuitbreaker.md) | Prevents calling unhealthy services | Request Lifecycle |
|
||||
| [Compress](compress.md) | Compresses the response | Content Modifier |
|
||||
| [ContentType](contenttype.md) | Handles Content-Type auto-detection | Misc |
|
||||
| [DigestAuth](digestauth.md) | Adds Digest Authentication | Security, Authentication |
|
||||
| [Errors](errorpages.md) | Defines custom error pages | Request Lifecycle |
|
||||
| [ForwardAuth](forwardauth.md) | Delegates Authentication | Security, Authentication |
|
||||
| [Headers](headers.md) | Adds / Updates headers | Security |
|
||||
| [IPWhiteList](ipwhitelist.md) | Limits the allowed client IPs | Security, Request lifecycle |
|
||||
| [InFlightReq](inflightreq.md) | Limits the number of simultaneous connections | Security, Request lifecycle |
|
||||
| [PassTLSClientCert](passtlsclientcert.md) | Adds Client Certificates in a Header | Security |
|
||||
| [RateLimit](ratelimit.md) | Limits the call frequency | Security, Request lifecycle |
|
||||
| [RedirectScheme](redirectscheme.md) | Redirects based on scheme | Request lifecycle |
|
||||
| [RedirectRegex](redirectregex.md) | Redirects based on regex | Request lifecycle |
|
||||
| [ReplacePath](replacepath.md) | Changes the path of the request | Path Modifier |
|
||||
| [ReplacePathRegex](replacepathregex.md) | Changes the path of the request | Path Modifier |
|
||||
| [Retry](retry.md) | Automatically retries in case of error | Request lifecycle |
|
||||
| [StripPrefix](stripprefix.md) | Changes the path of the request | Path Modifier |
|
||||
| [StripPrefixRegex](stripprefixregex.md) | Changes the path of the request | Path Modifier |
|
@@ -23,7 +23,7 @@ labels:
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: addprefix
|
||||
name: test-passtlsclientcert
|
||||
spec:
|
||||
passTLSClientCert:
|
||||
pem: true
|
||||
@@ -76,6 +76,7 @@ http:
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.domaincomponent=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.locality=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organization=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organizationalunit=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.province=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.serialnumber=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.issuer.commonname=true"
|
||||
@@ -104,6 +105,7 @@ http:
|
||||
province: true
|
||||
locality: true
|
||||
organization: true
|
||||
organizationalUnit: true
|
||||
commonName: true
|
||||
serialNumber: true
|
||||
domainComponent: true
|
||||
@@ -127,6 +129,7 @@ http:
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.domaincomponent=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.locality=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organization=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organizationalunit=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.province=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.serialnumber=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.issuer.commonname=true"
|
||||
@@ -148,6 +151,7 @@ http:
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.domaincomponent": "true",
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.locality": "true",
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organization": "true",
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organizationalunit": "true",
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.province": "true",
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.serialnumber": "true",
|
||||
"traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.issuer.commonname": "true",
|
||||
@@ -171,6 +175,7 @@ http:
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.domaincomponent=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.locality=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organization=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.organizationalunit=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.province=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.subject.serialnumber=true"
|
||||
- "traefik.http.middlewares.test-passtlsclientcert.passtlsclientcert.info.issuer.commonname=true"
|
||||
@@ -197,6 +202,7 @@ http:
|
||||
province: true
|
||||
locality: true
|
||||
organization: true
|
||||
organizationalUnit: true
|
||||
commonName: true
|
||||
serialNumber: true
|
||||
domainComponent: true
|
||||
@@ -223,6 +229,7 @@ http:
|
||||
province = true
|
||||
locality = true
|
||||
organization = true
|
||||
organizationalUnit = true
|
||||
commonName = true
|
||||
serialNumber = true
|
||||
domainComponent = true
|
||||
@@ -247,8 +254,8 @@ PassTLSClientCert can add two headers to the request:
|
||||
|
||||
!!! info
|
||||
|
||||
* The headers are filled with escaped string so it can be safely placed inside a URL query.
|
||||
* These options only work accordingly to the [MutualTLS configuration](../https/tls.md#client-authentication-mtls).
|
||||
* Each header value is a string that has been escaped in order to be a valid URL query.
|
||||
* These options only work accordingly to the [MutualTLS configuration](../../https/tls.md#client-authentication-mtls).
|
||||
That is to say, only the certificates that match the `clientAuth.clientAuthType` policy are passed.
|
||||
|
||||
The following example shows a complete certificate and explains each of the middleware options.
|
||||
@@ -412,15 +419,18 @@ In the example, it is the part between `-----BEGIN CERTIFICATE-----` and `-----E
|
||||
!!! warning "`X-Forwarded-Tls-Client-Cert` value could exceed the web server header size limit"
|
||||
|
||||
The header size limit of web servers is commonly between 4kb and 8kb.
|
||||
You could change the server configuration to allow bigger header or use the `info` option with the needed field(s).
|
||||
If that turns out to be a problem, and if reconfiguring the server to allow larger headers is not an option,
|
||||
one can alleviate the problem by selecting only the interesting parts of the cert,
|
||||
through the use of the `info` options described below. (And by setting `pem` to false).
|
||||
|
||||
### `info`
|
||||
|
||||
The `info` option selects the specific client certificate details you want to add to the `X-Forwarded-Tls-Client-Cert-Info` header.
|
||||
|
||||
The value of the header is an escaped concatenation of all the selected certificate details.
|
||||
But in the following, unless specified otherwise, all the header values examples are shown unescaped, for readability.
|
||||
|
||||
The following example shows an unescaped result that uses all the available fields:
|
||||
The following example shows such a concatenation, when all the available fields are selected:
|
||||
|
||||
```text
|
||||
Subject="DC=org,DC=cheese,C=FR,C=US,ST=Cheese org state,ST=Cheese com state,L=TOULOUSE,L=LYON,O=Cheese,O=Cheese 2,CN=*.example.com";Issuer="DC=org,DC=cheese,C=FR,C=US,ST=Signing State,ST=Signing State 2,L=TOULOUSE,L=LYON,O=Cheese,O=Cheese 2,CN=Simple Signing CA 2";NB="1544094616";NA="1607166616";SAN="*.example.org,*.example.net,*.example.com,test@example.org,test@example.net,10.0.1.0,10.0.1.2"
|
||||
@@ -441,7 +451,7 @@ The data is taken from the following certificate part:
|
||||
Not After : Dec 5 11:10:16 2020 GMT
|
||||
```
|
||||
|
||||
The escaped `notAfter` info part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
NA="1607166616"
|
||||
@@ -458,7 +468,7 @@ Validity
|
||||
Not Before: Dec 6 11:10:16 2018 GMT
|
||||
```
|
||||
|
||||
The escaped `notBefore` info part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
NB="1544094616"
|
||||
@@ -475,7 +485,7 @@ The data is taken from the following certificate part:
|
||||
DNS:*.example.org, DNS:*.example.net, DNS:*.example.com, IP Address:10.0.1.0, IP Address:10.0.1.2, email:test@example.org, email:test@example.net
|
||||
```
|
||||
|
||||
The escape SANs info part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
SAN="*.example.org,*.example.net,*.example.com,test@example.org,test@example.net,10.0.1.0,10.0.1.2"
|
||||
@@ -501,7 +511,7 @@ Set the `info.subject.country` option to `true` to add the `country` information
|
||||
|
||||
The data is taken from the subject part with the `C` key.
|
||||
|
||||
The escape country info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
C=FR,C=US
|
||||
@@ -513,7 +523,7 @@ Set the `info.subject.province` option to `true` to add the `province` informati
|
||||
|
||||
The data is taken from the subject part with the `ST` key.
|
||||
|
||||
The escape province info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
ST=Cheese org state,ST=Cheese com state
|
||||
@@ -525,7 +535,7 @@ Set the `info.subject.locality` option to `true` to add the `locality` informati
|
||||
|
||||
The data is taken from the subject part with the `L` key.
|
||||
|
||||
The escape locality info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
L=TOULOUSE,L=LYON
|
||||
@@ -537,19 +547,31 @@ Set the `info.subject.organization` option to `true` to add the `organization` i
|
||||
|
||||
The data is taken from the subject part with the `O` key.
|
||||
|
||||
The escape organization info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
O=Cheese,O=Cheese 2
|
||||
```
|
||||
|
||||
##### `info.subject.organizationalUnit`
|
||||
|
||||
Set the `info.subject.organizationalUnit` option to `true` to add the `organizationalUnit` information into the subject.
|
||||
|
||||
The data is taken from the subject part with the `OU` key.
|
||||
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
OU=Cheese Section,OU=Cheese Section 2
|
||||
```
|
||||
|
||||
##### `info.subject.commonName`
|
||||
|
||||
Set the `info.subject.commonName` option to `true` to add the `commonName` information into the subject.
|
||||
|
||||
The data is taken from the subject part with the `CN` key.
|
||||
|
||||
The escape common name info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
CN=*.example.com
|
||||
@@ -561,7 +583,7 @@ Set the `info.subject.serialNumber` option to `true` to add the `serialNumber` i
|
||||
|
||||
The data is taken from the subject part with the `SN` key.
|
||||
|
||||
The escape serial number info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
SN=1234567890
|
||||
@@ -573,7 +595,7 @@ Set the `info.subject.domainComponent` option to `true` to add the `domainCompon
|
||||
|
||||
The data is taken from the subject part with the `DC` key.
|
||||
|
||||
The escape domain component info in the subject part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
DC=org,DC=cheese
|
||||
@@ -595,7 +617,7 @@ Set the `info.issuer.country` option to `true` to add the `country` information
|
||||
|
||||
The data is taken from the issuer part with the `C` key.
|
||||
|
||||
The escape country info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
C=FR,C=US
|
||||
@@ -607,7 +629,7 @@ Set the `info.issuer.province` option to `true` to add the `province` informatio
|
||||
|
||||
The data is taken from the issuer part with the `ST` key.
|
||||
|
||||
The escape province info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
ST=Signing State,ST=Signing State 2
|
||||
@@ -619,7 +641,7 @@ Set the `info.issuer.locality` option to `true` to add the `locality` informatio
|
||||
|
||||
The data is taken from the issuer part with the `L` key.
|
||||
|
||||
The escape locality info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
L=TOULOUSE,L=LYON
|
||||
@@ -631,7 +653,7 @@ Set the `info.issuer.organization` option to `true` to add the `organization` in
|
||||
|
||||
The data is taken from the issuer part with the `O` key.
|
||||
|
||||
The escape organization info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
O=Cheese,O=Cheese 2
|
||||
@@ -643,7 +665,7 @@ Set the `info.issuer.commonName` option to `true` to add the `commonName` inform
|
||||
|
||||
The data is taken from the issuer part with the `CN` key.
|
||||
|
||||
The escape common name info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
CN=Simple Signing CA 2
|
||||
@@ -655,7 +677,7 @@ Set the `info.issuer.serialNumber` option to `true` to add the `serialNumber` in
|
||||
|
||||
The data is taken from the issuer part with the `SN` key.
|
||||
|
||||
The escape serial number info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
SN=1234567890
|
||||
@@ -667,7 +689,7 @@ Set the `info.issuer.domainComponent` option to `true` to add the `domainCompone
|
||||
|
||||
The data is taken from the issuer part with the `DC` key.
|
||||
|
||||
The escape domain component info in the issuer part is formatted as below:
|
||||
And it is formatted as follows in the header:
|
||||
|
||||
```text
|
||||
DC=org,DC=cheese
|
@@ -250,7 +250,7 @@ http:
|
||||
### `sourceCriterion`
|
||||
|
||||
The `sourceCriterion` option defines what criterion is used to group requests as originating from a common source.
|
||||
The precedence order is `ipStrategy`, then `requestHeaderName`, then `requestHost`.
|
||||
If several strategies are defined at the same time, an error will be raised.
|
||||
If none are set, the default is to use the request's remote address field (as an `ipStrategy`).
|
||||
|
||||
#### `sourceCriterion.ipStrategy`
|
@@ -73,10 +73,6 @@ http:
|
||||
|
||||
## Configuration Options
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
### `permanent`
|
||||
|
||||
Set the `permanent` option to `true` to apply a permanent redirection.
|
||||
@@ -85,6 +81,12 @@ Set the `permanent` option to `true` to apply a permanent redirection.
|
||||
|
||||
The `regex` option is the regular expression to match and capture elements from the request URL.
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
When defining a regular expression within YAML, any escaped character needs to be escaped twice: `example\.com` needs to be written as `example\\.com`.
|
||||
|
||||
### `replacement`
|
||||
|
||||
The `replacement` option defines how to modify the URL to have the new target URL.
|
@@ -79,7 +79,9 @@ The ReplacePathRegex middleware will:
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
When defining a regular expression within YAML, any escaped character needs to be escaped twice: `example\.com` needs to be written as `example\\.com`.
|
||||
|
||||
### `regex`
|
||||
|
@@ -67,11 +67,13 @@ The StripPrefixRegex middleware strips the matching path prefix and stores it in
|
||||
|
||||
The `regex` option is the regular expression to match the path prefix from the request URL.
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
For instance, `/products` also matches `/products/shoes` and `/products/shirts`.
|
||||
|
||||
If your backend is serving assets (e.g., images or JavaScript files), it can use the `X-Forwarded-Prefix` header to properly construct relative URLs.
|
||||
Using the previous example, the backend should return `/products/shoes/image.png` (and not `/images.png`, which Traefik would likely not be able to associate with the same backend).
|
||||
|
||||
!!! tip
|
||||
|
||||
Regular expressions and replacements can be tested using online tools such as [Go Playground](https://play.golang.org/p/mWU9p-wk2ru) or the [Regex101](https://regex101.com/r/58sIgx/2).
|
||||
|
||||
When defining a regular expression within YAML, any escaped character needs to be escaped twice: `example\.com` needs to be written as `example\\.com`.
|
@@ -9,7 +9,7 @@ Attached to the routers, pieces of middleware are a means of tweaking the reques
|
||||
|
||||
There are several available middleware in Traefik, some can modify the request, the headers, some are in charge of redirections, some add authentication, and so on.
|
||||
|
||||
Pieces of middleware can be combined in chains to fit every scenario.
|
||||
Middlewares that use the same protocol can be combined into chains to fit every scenario.
|
||||
|
||||
!!! warning "Provider Namespace"
|
||||
|
||||
@@ -31,20 +31,6 @@ whoami:
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes IngressRoute"
|
||||
# As a Kubernetes Traefik IngressRoute
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: middlewares.traefik.containo.us
|
||||
spec:
|
||||
group: traefik.containo.us
|
||||
version: v1alpha1
|
||||
names:
|
||||
kind: Middleware
|
||||
plural: middlewares
|
||||
singular: middleware
|
||||
scope: Namespaced
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
@@ -135,26 +121,6 @@ http:
|
||||
|
||||
## Available Middlewares
|
||||
|
||||
| Middleware | Purpose | Area |
|
||||
|-------------------------------------------|---------------------------------------------------|-----------------------------|
|
||||
| [AddPrefix](addprefix.md) | Add a Path Prefix | Path Modifier |
|
||||
| [BasicAuth](basicauth.md) | Basic auth mechanism | Security, Authentication |
|
||||
| [Buffering](buffering.md) | Buffers the request/response | Request Lifecycle |
|
||||
| [Chain](chain.md) | Combine multiple pieces of middleware | Middleware tool |
|
||||
| [CircuitBreaker](circuitbreaker.md) | Stop calling unhealthy services | Request Lifecycle |
|
||||
| [Compress](compress.md) | Compress the response | Content Modifier |
|
||||
| [DigestAuth](digestauth.md) | Adds Digest Authentication | Security, Authentication |
|
||||
| [Errors](errorpages.md) | Define custom error pages | Request Lifecycle |
|
||||
| [ForwardAuth](forwardauth.md) | Authentication delegation | Security, Authentication |
|
||||
| [Headers](headers.md) | Add / Update headers | Security |
|
||||
| [IPWhiteList](ipwhitelist.md) | Limit the allowed client IPs | Security, Request lifecycle |
|
||||
| [InFlightReq](inflightreq.md) | Limit the number of simultaneous connections | Security, Request lifecycle |
|
||||
| [PassTLSClientCert](passtlsclientcert.md) | Adding Client Certificates in a Header | Security |
|
||||
| [RateLimit](ratelimit.md) | Limit the call frequency | Security, Request lifecycle |
|
||||
| [RedirectScheme](redirectscheme.md) | Redirect easily the client elsewhere | Request lifecycle |
|
||||
| [RedirectRegex](redirectregex.md) | Redirect the client elsewhere | Request lifecycle |
|
||||
| [ReplacePath](replacepath.md) | Change the path of the request | Path Modifier |
|
||||
| [ReplacePathRegex](replacepathregex.md) | Change the path of the request | Path Modifier |
|
||||
| [Retry](retry.md) | Automatically retry the request in case of errors | Request lifecycle |
|
||||
| [StripPrefix](stripprefix.md) | Change the path of the request | Path Modifier |
|
||||
| [StripPrefixRegex](stripprefixregex.md) | Change the path of the request | Path Modifier |
|
||||
A list of HTTP middlewares can be found [here](http/overview.md).
|
||||
|
||||
A list of TCP middlewares can be found [here](tcp/overview.md).
|
||||
|
63
docs/content/middlewares/tcp/inflightconn.md
Normal file
63
docs/content/middlewares/tcp/inflightconn.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# InFlightConn
|
||||
|
||||
Limiting the Number of Simultaneous connections.
|
||||
{: .subtitle }
|
||||
|
||||
To proactively prevent services from being overwhelmed with high load, the number of allowed simultaneous connections by IP can be limited.
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
- "traefik.tcp.middlewares.test-inflightconn.inflightconn.amount=10"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: test-inflightconn
|
||||
spec:
|
||||
inFlightConn:
|
||||
amount: 10
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
# Limiting to 10 simultaneous connections
|
||||
- "traefik.tcp.middlewares.test-inflightconn.inflightconn.amount=10"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.tcp.middlewares.test-inflightconn.inflightconn.amount": "10"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Limiting to 10 simultaneous connections.
|
||||
labels:
|
||||
- "traefik.tcp.middlewares.test-inflightconn.inflightconn.amount=10"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Limiting to 10 simultaneous connections.
|
||||
tcp:
|
||||
middlewares:
|
||||
test-inflightconn:
|
||||
inFlightConn:
|
||||
amount: 10
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Limiting to 10 simultaneous connections
|
||||
[tcp.middlewares]
|
||||
[tcp.middlewares.test-inflightconn.inFlightConn]
|
||||
amount = 10
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### `amount`
|
||||
|
||||
The `amount` option defines the maximum amount of allowed simultaneous connections.
|
||||
The middleware closes the connection if there are already `amount` connections opened.
|
67
docs/content/middlewares/tcp/ipwhitelist.md
Normal file
67
docs/content/middlewares/tcp/ipwhitelist.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# IPWhiteList
|
||||
|
||||
Limiting Clients to Specific IPs
|
||||
{: .subtitle }
|
||||
|
||||
IPWhitelist accepts / refuses connections based on the client IP.
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
```yaml tab="Docker"
|
||||
# Accepts connections from defined IP
|
||||
labels:
|
||||
- "traefik.tcp.middlewares.test-ipwhitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: MiddlewareTCP
|
||||
metadata:
|
||||
name: test-ipwhitelist
|
||||
spec:
|
||||
ipWhiteList:
|
||||
sourceRange:
|
||||
- 127.0.0.1/32
|
||||
- 192.168.1.7
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
# Accepts request from defined IP
|
||||
- "traefik.tcp.middlewares.test-ipwhitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.tcp.middlewares.test-ipwhitelist.ipwhitelist.sourcerange": "127.0.0.1/32,192.168.1.7"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Accepts request from defined IP
|
||||
labels:
|
||||
- "traefik.tcp.middlewares.test-ipwhitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# Accepts request from defined IP
|
||||
[tcp.middlewares]
|
||||
[tcp.middlewares.test-ipwhitelist.ipWhiteList]
|
||||
sourceRange = ["127.0.0.1/32", "192.168.1.7"]
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Accepts request from defined IP
|
||||
tcp:
|
||||
middlewares:
|
||||
test-ipwhitelist:
|
||||
ipWhiteList:
|
||||
sourceRange:
|
||||
- "127.0.0.1/32"
|
||||
- "192.168.1.7"
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### `sourceRange`
|
||||
|
||||
The `sourceRange` option sets the allowed IPs (or ranges of allowed IPs by using CIDR notation).
|
135
docs/content/middlewares/tcp/overview.md
Normal file
135
docs/content/middlewares/tcp/overview.md
Normal file
@@ -0,0 +1,135 @@
|
||||
# TCP Middlewares
|
||||
|
||||
Controlling connections
|
||||
{: .subtitle }
|
||||
|
||||

|
||||
|
||||
## Configuration Example
|
||||
|
||||
```yaml tab="Docker"
|
||||
# As a Docker Label
|
||||
whoami:
|
||||
# A container that exposes an API to show its IP address
|
||||
image: traefik/whoami
|
||||
labels:
|
||||
# Create a middleware named `foo-ip-whitelist`
|
||||
- "traefik.tcp.middlewares.foo-ip-whitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
# Apply the middleware named `foo-ip-whitelist` to the router named `router1`
|
||||
- "traefik.tcp.routers.router1.middlewares=foo-ip-whitelist@docker"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes IngressRoute"
|
||||
# As a Kubernetes Traefik IngressRoute
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: middlewaretcps.traefik.containo.us
|
||||
spec:
|
||||
group: traefik.containo.us
|
||||
version: v1alpha1
|
||||
names:
|
||||
kind: MiddlewareTCP
|
||||
plural: middlewaretcps
|
||||
singular: middlewaretcp
|
||||
scope: Namespaced
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: foo-ip-whitelist
|
||||
spec:
|
||||
ipWhiteList:
|
||||
sourcerange:
|
||||
- 127.0.0.1/32
|
||||
- 192.168.1.7
|
||||
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: ingressroute
|
||||
spec:
|
||||
# more fields...
|
||||
routes:
|
||||
# more fields...
|
||||
middlewares:
|
||||
- name: foo-ip-whitelist
|
||||
```
|
||||
|
||||
```yaml tab="Consul Catalog"
|
||||
# Create a middleware named `foo-ip-whitelist`
|
||||
- "traefik.tcp.middlewares.foo-ip-whitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
# Apply the middleware named `foo-ip-whitelist` to the router named `router1`
|
||||
- "traefik.tcp.routers.router1.middlewares=foo-ip-whitelist@consulcatalog"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.tcp.middlewares.foo-ip-whitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7",
|
||||
"traefik.tcp.routers.router1.middlewares=foo-ip-whitelist@marathon"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# As a Rancher Label
|
||||
labels:
|
||||
# Create a middleware named `foo-ip-whitelist`
|
||||
- "traefik.tcp.middlewares.foo-ip-whitelist.ipwhitelist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
# Apply the middleware named `foo-ip-whitelist` to the router named `router1`
|
||||
- "traefik.tcp.routers.router1.middlewares=foo-ip-whitelist@rancher"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
# As TOML Configuration File
|
||||
[tcp.routers]
|
||||
[tcp.routers.router1]
|
||||
service = "myService"
|
||||
middlewares = ["foo-ip-whitelist"]
|
||||
rule = "Host(`example.com`)"
|
||||
|
||||
[tcp.middlewares]
|
||||
[tcp.middlewares.foo-ip-whitelist.ipWhiteList]
|
||||
sourceRange = ["127.0.0.1/32", "192.168.1.7"]
|
||||
|
||||
[tcp.services]
|
||||
[tcp.services.service1]
|
||||
[tcp.services.service1.loadBalancer]
|
||||
[[tcp.services.service1.loadBalancer.servers]]
|
||||
address = "10.0.0.10:4000"
|
||||
[[tcp.services.service1.loadBalancer.servers]]
|
||||
address = "10.0.0.11:4000"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# As YAML Configuration File
|
||||
tcp:
|
||||
routers:
|
||||
router1:
|
||||
service: myService
|
||||
middlewares:
|
||||
- "foo-ip-whitelist"
|
||||
rule: "Host(`example.com`)"
|
||||
|
||||
middlewares:
|
||||
foo-ip-whitelist:
|
||||
ipWhiteList:
|
||||
sourceRange:
|
||||
- "127.0.0.1/32"
|
||||
- "192.168.1.7"
|
||||
|
||||
services:
|
||||
service1:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- address: "10.0.0.10:4000"
|
||||
- address: "10.0.0.11:4000"
|
||||
```
|
||||
|
||||
## Available TCP Middlewares
|
||||
|
||||
| Middleware | Purpose | Area |
|
||||
|-------------------------------------------|---------------------------------------------------|-----------------------------|
|
||||
| [InFlightConn](inflightconn.md) | Limits the number of simultaneous connections. | Security, Request lifecycle |
|
||||
| [IPWhiteList](ipwhitelist.md) | Limit the allowed client IPs. | Security, Request lifecycle |
|
@@ -104,7 +104,7 @@ Then any router can refer to an instance of the wanted middleware.
|
||||
|
||||
```yaml tab="K8s IngressRoute"
|
||||
# The definitions below require the definitions for the Middleware and IngressRoute kinds.
|
||||
# https://doc.traefik.io/traefik/v2.3/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
# https://doc.traefik.io/traefik/v2.6/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://doc.traefik.io/traefik/v2.3/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
# https://doc.traefik.io/traefik/v2.6/reference/dynamic-configuration/kubernetes-crd/#definitions
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: TLSOption
|
||||
metadata:
|
||||
@@ -327,7 +327,7 @@ With Traefik v2 it is applied on an entry point or a [Router](../routing/routers
|
||||
To apply a redirection:
|
||||
|
||||
- on an entry point, the [HTTP redirection](../routing/entrypoints.md#redirection) has to be configured.
|
||||
- on a router, one of the redirect middlewares, [RedirectRegex](../middlewares/redirectregex.md) or [RedirectScheme](../middlewares/redirectscheme.md), has to be configured and added to the router middlewares list.
|
||||
- on a router, one of the redirect middlewares, [RedirectRegex](../middlewares/http/redirectregex.md) or [RedirectScheme](../middlewares/http/redirectscheme.md), has to be configured and added to the router middlewares list.
|
||||
|
||||
!!! example "Global HTTP to HTTPS redirection"
|
||||
|
||||
@@ -545,7 +545,7 @@ Use Case: Incoming requests to `http://example.org/admin` are forwarded to the w
|
||||
with the path `/admin` stripped, e.g. to `http://<IP>:<port>/`. In this case, you must:
|
||||
|
||||
- First, configure a router named `admin` with a rule matching at least the path prefix with the `PathPrefix` keyword,
|
||||
- Then, define a middleware of type [`stripprefix`](../middlewares/stripprefix.md), which removes the prefix `/admin`, associated to the router `admin`.
|
||||
- Then, define a middleware of type [`stripprefix`](../middlewares/http/stripprefix.md), which removes the prefix `/admin`, associated to the router `admin`.
|
||||
|
||||
!!! example "Strip Path Prefix When Forwarding to Backend"
|
||||
|
||||
@@ -660,12 +660,12 @@ with the path `/admin` stripped, e.g. to `http://<IP>:<port>/`. In this case, yo
|
||||
|
||||
??? question "What About Other Path Transformations?"
|
||||
|
||||
Instead of removing the path prefix with the [`stripprefix` middleware](../../middlewares/stripprefix/), you can also:
|
||||
Instead of removing the path prefix with the [`stripprefix` middleware](../../middlewares/http/stripprefix/), you can also:
|
||||
|
||||
- Add a path prefix with the [`addprefix` middleware](../../middlewares/addprefix/)
|
||||
- Replace the complete path of the request with the [`replacepath` middleware](../../middlewares/replacepath/)
|
||||
- ReplaceRewrite path using Regexp with the [`replacepathregex` middleware](../../middlewares/replacepathregex/)
|
||||
- And a lot more on the [`middlewares` page](../../middlewares/overview/)
|
||||
- Add a path prefix with the [`addprefix` middleware](../../middlewares/http/addprefix/)
|
||||
- Replace the complete path of the request with the [`replacepath` middleware](../../middlewares/http/replacepath/)
|
||||
- ReplaceRewrite path using Regexp with the [`replacepathregex` middleware](../../middlewares/http/replacepathregex/)
|
||||
- And a lot more on the [`HTTP middlewares` page](../../middlewares/http/overview/)
|
||||
|
||||
## ACME (LetsEncrypt)
|
||||
|
||||
|
@@ -179,7 +179,7 @@ To enable HTTPS, it is not sufficient anymore to only rely on a TLS section in t
|
||||
|
||||
#### Expose an Ingress on 80 and 443
|
||||
|
||||
Define the default TLS configuration on the HTTPS entry point.
|
||||
Define the default TLS configuration on the HTTPS entry point.
|
||||
|
||||
```yaml tab="Ingress"
|
||||
kind: Ingress
|
||||
@@ -335,7 +335,7 @@ The file parser has been changed, since v2.3 the unknown options/fields in a dyn
|
||||
### 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.
|
||||
In order to be able to use this new resource the [Kubernetes RBAC](../reference/dynamic-configuration/kubernetes-crd.md#rbac) must be updated.
|
||||
|
||||
## v2.3 to v2.4
|
||||
|
||||
@@ -350,7 +350,7 @@ It is therefore necessary to update [RBAC](../reference/dynamic-configuration/ku
|
||||
|
||||
In `v2.4.8`, we introduced a new check on domain names used in HTTP router rule `Host` and `HostRegexp` expressions,
|
||||
and in TCP router rule `HostSNI` expression.
|
||||
This check ensures that provided domain names don't contain non-ASCII characters.
|
||||
This check ensures that provided domain names don't contain non-ASCII characters.
|
||||
If not, an error is raised, and the associated router will be shown as invalid in the dashboard.
|
||||
|
||||
This new behavior is intended to show what was failing silently previously and to help troubleshooting configuration issues.
|
||||
@@ -375,3 +375,66 @@ In `v2.4.10`, the default value for `allowCrossNamespace` has been changed to `f
|
||||
|
||||
In `v2.4.10`, by default, it is no longer authorized to reference Kubernetes ExternalName services.
|
||||
To allow it, the `allowExternalNameServices` option should be set to `true`.
|
||||
|
||||
## v2.4 to v2.5
|
||||
|
||||
### Kubernetes CRD
|
||||
|
||||
In `v2.5`, the [Traefik CRDs](../reference/dynamic-configuration/kubernetes-crd.md#definitions) have been updated to support the new API version `apiextensions.k8s.io/v1`.
|
||||
As required by `apiextensions.k8s.io/v1`, we have included the OpenAPI validation schema.
|
||||
|
||||
After deploying the new [Traefik CRDs](../reference/dynamic-configuration/kubernetes-crd.md#definitions), the resources will be validated only on creation or update.
|
||||
|
||||
Please note that the unknown fields will not be pruned when migrating from `apiextensions.k8s.io/v1beta1` to `apiextensions.k8s.io/v1` CRDs.
|
||||
For more details check out the official [documentation](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema).
|
||||
|
||||
### Kubernetes Ingress
|
||||
|
||||
Traefik v2.5 moves forward for the Ingress provider to support Kubernetes v1.22.
|
||||
|
||||
Traefik now supports only v1.14+ Kubernetes clusters, which means the support of `extensions/v1beta1` API Version ingresses has been dropped.
|
||||
|
||||
The `extensions/v1beta1` API Version should now be replaced either by `networking.k8s.io/v1beta1` or by `networking.k8s.io/v1` (as of Kubernetes v1.19+).
|
||||
|
||||
The support of the `networking.k8s.io/v1beta1` API Version will stop in Kubernetes v1.22.
|
||||
|
||||
### Headers middleware: ssl redirect options
|
||||
|
||||
`sslRedirect`, `sslTemporaryRedirect`, `sslHost` and `sslForceHost` are deprecated in Traefik v2.5.
|
||||
|
||||
For simple HTTP to HTTPS redirection, you may use [EntryPoints redirections](../routing/entrypoints.md#redirection).
|
||||
|
||||
For more advanced use cases, you can use either the [RedirectScheme middleware](../middlewares/http/redirectscheme.md) or the [RedirectRegex middleware](../middlewares/http/redirectregex.md).
|
||||
|
||||
### Headers middleware: accessControlAllowOrigin
|
||||
|
||||
`accessControlAllowOrigin` is no longer supported in Traefik v2.5.
|
||||
|
||||
### X.509 CommonName Deprecation Bis
|
||||
|
||||
Following up on the deprecation started [previously](#x509-commonname-deprecation),
|
||||
as the `x509ignoreCN=0` value for the `GODEBUG` is [deprecated in Go 1.17](https://tip.golang.org/doc/go1.17#crypto/x509),
|
||||
the legacy behavior related to the CommonName field can not be enabled at all anymore.
|
||||
|
||||
## v2.5.3 to v2.5.4
|
||||
|
||||
### Errors middleware
|
||||
|
||||
In `v2.5.4`, when the errors service is configured with the [`PassHostHeader`](../routing/services/index.md#pass-host-header) option to `true` (default),
|
||||
the forwarded Host header value is now set to the client request Host value and not `0.0.0.0`.
|
||||
Check out the [Errors middleware](../middlewares/http/errorpages.md#service) documentation for more details.
|
||||
|
||||
## v2.5 to v2.6
|
||||
|
||||
### HTTP3
|
||||
|
||||
Traefik v2.6 introduces the `AdvertisedPort` option,
|
||||
which allows advertising, in the `Alt-Svc` header, a UDP port different from the one on which Traefik is actually listening (the EntryPoint's port).
|
||||
By doing so, it introduces a new configuration structure `http3`, which replaces the `enableHTTP3` option (which therefore doesn't exist anymore).
|
||||
To enable HTTP3 on an EntryPoint, please check out the [HTTP3 configuration](../routing/entrypoints.md#http3) documentation.
|
||||
|
||||
### Kubernetes Gateway API Provider
|
||||
|
||||
In `v2.6`, the [Kubernetes Gateway API provider](../providers/kubernetes-gateway.md) now only supports the version [v1alpha2](https://gateway-api.sigs.k8s.io/v1alpha2/guides/getting-started/) of the specification and
|
||||
[route namespaces](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.RouteNamespaces) selectors, which requires Traefik to fetch and watch the cluster namespaces.
|
||||
Therefore, the [RBAC](../reference/dynamic-configuration/kubernetes-gateway.md#rbac) and [CRD](../reference/dynamic-configuration/kubernetes-gateway.md#definitions) definitions must be updated.
|
||||
|
@@ -209,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 (in nanoseconds) 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 |
|
||||
@@ -218,8 +218,10 @@ 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 (in nanoseconds) caused by Traefik. |
|
||||
| `Overhead` | The processing time overhead (in nanoseconds) caused by Traefik. |
|
||||
| `RetryAttempts` | The amount of attempts the request was retried. |
|
||||
| `TLSVersion` | The TLS version used by the connection (e.g. `1.2`) (if connection is TLS). |
|
||||
| `TLSCipher` | The TLS cipher used by the connection (e.g. `TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA`) (if connection is TLS) |
|
||||
|
||||
## Log Rotation
|
||||
|
||||
@@ -245,7 +247,7 @@ version: "3.7"
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.2
|
||||
image: traefik:v2.6
|
||||
environment:
|
||||
- TZ=US/Alaska
|
||||
command:
|
||||
|
@@ -59,6 +59,27 @@ metrics:
|
||||
```bash tab="CLI"
|
||||
--metrics.datadog.addEntryPointsLabels=true
|
||||
```
|
||||
#### `addRoutersLabels`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable metrics on routers.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.datadog]
|
||||
addRoutersLabels = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
datadog:
|
||||
addRoutersLabels: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.datadog.addrouterslabels=true
|
||||
```
|
||||
|
||||
#### `addServicesLabels`
|
||||
|
||||
@@ -104,3 +125,24 @@ metrics:
|
||||
--metrics.datadog.pushInterval=10s
|
||||
```
|
||||
|
||||
#### `prefix`
|
||||
|
||||
_Optional, Default="traefik"_
|
||||
|
||||
The prefix to use for metrics collection.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
datadog:
|
||||
prefix: traefik
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.datadog]
|
||||
prefix = "traefik"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.datadog.prefix="traefik"
|
||||
```
|
||||
|
@@ -170,6 +170,28 @@ metrics:
|
||||
--metrics.influxdb.addEntryPointsLabels=true
|
||||
```
|
||||
|
||||
#### `addRoutersLabels`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable metrics on routers.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB]
|
||||
addRoutersLabels = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB:
|
||||
addRoutersLabels: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb.addrouterslabels=true
|
||||
```
|
||||
|
||||
#### `addServicesLabels`
|
||||
|
||||
_Optional, Default=true_
|
||||
@@ -213,3 +235,29 @@ metrics:
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb.pushInterval=10s
|
||||
```
|
||||
|
||||
#### `additionalLabels`
|
||||
|
||||
_Optional, Default={}_
|
||||
|
||||
Additional labels (influxdb tags) on all metrics.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB]
|
||||
[metrics.influxDB.additionalLabels]
|
||||
host = "example.com"
|
||||
environment = "production"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB:
|
||||
additionalLabels:
|
||||
host: example.com
|
||||
environment: production
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb.additionallabels.host=example.com --metrics.influxdb.additionallabels.environment=production
|
||||
```
|
||||
|
@@ -7,22 +7,6 @@ Traefik supports 4 metrics backends:
|
||||
- [Prometheus](./prometheus.md)
|
||||
- [StatsD](./statsd.md)
|
||||
|
||||
## Configuration
|
||||
|
||||
To enable metrics:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics: {}
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics=true
|
||||
```
|
||||
|
||||
## Server Metrics
|
||||
|
||||
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|
||||
@@ -39,7 +23,7 @@ The total count of configuration reloads.
|
||||
config.reload.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.config.reload.total
|
||||
```
|
||||
|
||||
@@ -59,7 +43,7 @@ The total count of configuration reload failures.
|
||||
config.reload.total (with tag "failure" to true)
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.config.reload.total.failure
|
||||
```
|
||||
|
||||
@@ -79,7 +63,7 @@ The timestamp of the last configuration reload success.
|
||||
config.reload.lastSuccessTimestamp
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.config.reload.lastSuccessTimestamp
|
||||
```
|
||||
|
||||
@@ -99,7 +83,7 @@ The timestamp of the last configuration reload failure.
|
||||
config.reload.lastFailureTimestamp
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.config.reload.lastFailureTimestamp
|
||||
```
|
||||
|
||||
@@ -130,7 +114,7 @@ Available labels: `code`, `method`, `protocol`, `entrypoint`.
|
||||
entrypoint.request.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.entrypoint.requests.total
|
||||
```
|
||||
|
||||
@@ -161,7 +145,7 @@ Available labels: `code`, `method`, `protocol`, `entrypoint`.
|
||||
entrypoint.request.duration
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.entrypoint.request.duration
|
||||
```
|
||||
|
||||
@@ -183,7 +167,7 @@ Available labels: `method`, `protocol`, `entrypoint`.
|
||||
entrypoint.connections.open
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.entrypoint.connections.open
|
||||
```
|
||||
|
||||
@@ -216,7 +200,7 @@ Available labels: `code`, `method`, `protocol`, `service`.
|
||||
service.request.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.service.requests.total
|
||||
```
|
||||
|
||||
@@ -247,7 +231,7 @@ Available labels: `code`, `method`, `protocol`, `service`.
|
||||
service.request.duration
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.service.request.duration
|
||||
```
|
||||
|
||||
@@ -269,7 +253,7 @@ Available labels: `method`, `protocol`, `service`.
|
||||
service.connections.open
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.service.connections.open
|
||||
```
|
||||
|
||||
@@ -291,7 +275,7 @@ Available labels: `service`.
|
||||
service.retries.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.service.retries.total
|
||||
```
|
||||
|
||||
@@ -313,7 +297,7 @@ Available labels: `service`, `url`.
|
||||
service.server.up
|
||||
```
|
||||
|
||||
```influxdb tab="InfluDB"
|
||||
```influxdb tab="InfluxDB"
|
||||
traefik.service.server.up
|
||||
```
|
||||
|
||||
|
@@ -64,6 +64,28 @@ metrics:
|
||||
--metrics.prometheus.addEntryPointsLabels=true
|
||||
```
|
||||
|
||||
#### `addRoutersLabels`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable metrics on routers.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.prometheus]
|
||||
addRoutersLabels = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
prometheus:
|
||||
addRoutersLabels: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.prometheus.addrouterslabels=true
|
||||
```
|
||||
|
||||
#### `addServicesLabels`
|
||||
|
||||
_Optional, Default=true_
|
||||
|
@@ -60,6 +60,28 @@ metrics:
|
||||
--metrics.statsd.addEntryPointsLabels=true
|
||||
```
|
||||
|
||||
#### `addRoutersLabels`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable metrics on entry points.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.statsD]
|
||||
addRoutersLabels = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
statsD:
|
||||
addRoutersLabels: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.statsd.addrouterslabels=true
|
||||
```
|
||||
|
||||
#### `addServicesLabels`
|
||||
|
||||
_Optional, Default=true_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Datadog
|
||||
|
||||
To enable the Datadog:
|
||||
To enable the Datadog tracer:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -20,7 +20,7 @@ tracing:
|
||||
|
||||
_Required, Default="127.0.0.1:8126"_
|
||||
|
||||
Local Agent Host Port instructs reporter to send spans to datadog-tracing-agent at this address.
|
||||
Local Agent Host Port instructs the reporter to send spans to the Datadog Agent at this address (host:port).
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -42,7 +42,7 @@ tracing:
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable Datadog debug.
|
||||
Enables Datadog debug.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -64,7 +64,7 @@ tracing:
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Apply shared tag in a form of Key:Value to all the traces.
|
||||
Applies a shared key:value tag on all spans.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -86,7 +86,8 @@ tracing:
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable priority sampling. When using distributed tracing,
|
||||
Enables priority sampling.
|
||||
When using distributed tracing,
|
||||
this option must be enabled in order to get all the parts of a distributed trace sampled.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Elastic
|
||||
|
||||
To enable the Elastic:
|
||||
To enable the Elastic tracer:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -20,7 +20,7 @@ tracing:
|
||||
|
||||
_Optional, Default="http://localhost:8200"_
|
||||
|
||||
APM ServerURL is the URL of the Elastic APM server.
|
||||
URL of the Elastic APM server.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -42,7 +42,7 @@ tracing:
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
APM Secret Token is the token used to connect to Elastic APM Server.
|
||||
Token used to connect to Elastic APM Server.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -64,7 +64,7 @@ tracing:
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
APM Service Environment is the name of the environment Traefik is deployed in, e.g. `production` or `staging`.
|
||||
Environment's name where Traefik is deployed in, e.g. `production` or `staging`.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Haystack
|
||||
|
||||
To enable the Haystack:
|
||||
To enable the Haystack tracer:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -18,9 +18,9 @@ tracing:
|
||||
|
||||
#### `localAgentHost`
|
||||
|
||||
_Require, Default="127.0.0.1"_
|
||||
_Required, Default="127.0.0.1"_
|
||||
|
||||
Local Agent Host instructs reporter to send spans to haystack-agent at this address.
|
||||
Local Agent Host instructs reporter to send spans to the Haystack Agent at this address.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -40,9 +40,9 @@ tracing:
|
||||
|
||||
#### `localAgentPort`
|
||||
|
||||
_Require, Default=35000_
|
||||
_Required, Default=35000_
|
||||
|
||||
Local Agent port instructs reporter to send spans to the haystack-agent at this port.
|
||||
Local Agent Port instructs reporter to send spans to the Haystack Agent at this port.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -64,7 +64,7 @@ tracing:
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Apply shared tag in a form of Key:Value to all the traces.
|
||||
Applies shared key:value tag on all spans.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -86,7 +86,7 @@ tracing:
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Specifies the header name that will be used to store the trace ID.
|
||||
Sets the header name used to store the trace ID.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -108,7 +108,7 @@ tracing:
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Specifies the header name that will be used to store the parent ID.
|
||||
Sets the header name used to store the parent ID.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -130,7 +130,7 @@ tracing:
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Specifies the header name that will be used to store the span ID.
|
||||
Sets the header name used to store the span ID.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -152,7 +152,7 @@ tracing:
|
||||
|
||||
_Optional, Default=empty_
|
||||
|
||||
Specifies the header name prefix that will be used to store baggage items in a map.
|
||||
Sets the header name prefix used to store baggage items in a map.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -166,7 +166,6 @@ tracing:
|
||||
baggagePrefixHeaderName = "sample"
|
||||
```
|
||||
|
||||
|
||||
```bash tab="CLI"
|
||||
--tracing.haystack.baggagePrefixHeaderName=sample
|
||||
```
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Instana
|
||||
|
||||
To enable the Instana:
|
||||
To enable the Instana tracer:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -18,9 +18,9 @@ tracing:
|
||||
|
||||
#### `localAgentHost`
|
||||
|
||||
_Require, Default="127.0.0.1"_
|
||||
_Required, Default="127.0.0.1"_
|
||||
|
||||
Local Agent Host instructs reporter to send spans to instana-agent at this address.
|
||||
Local Agent Host instructs reporter to send spans to the Instana Agent at this address.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -40,9 +40,9 @@ tracing:
|
||||
|
||||
#### `localAgentPort`
|
||||
|
||||
_Require, Default=42699_
|
||||
_Required, Default=42699_
|
||||
|
||||
Local Agent port instructs reporter to send spans to the instana-agent at this port.
|
||||
Local Agent port instructs reporter to send spans to the Instana Agent listening on this port.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -62,11 +62,11 @@ tracing:
|
||||
|
||||
#### `logLevel`
|
||||
|
||||
_Require, Default="info"_
|
||||
_Required, Default="info"_
|
||||
|
||||
Set Instana tracer log level.
|
||||
Sets Instana tracer log level.
|
||||
|
||||
Valid values for logLevel field are:
|
||||
Valid values are:
|
||||
|
||||
- `error`
|
||||
- `warn`
|
||||
@@ -88,3 +88,25 @@ tracing:
|
||||
```bash tab="CLI"
|
||||
--tracing.instana.logLevel=info
|
||||
```
|
||||
|
||||
#### `enableAutoProfile`
|
||||
|
||||
_Required, Default=false_
|
||||
|
||||
Enables [automatic profiling](https://www.ibm.com/docs/en/obi/current?topic=instana-profile-processes) for the Traefik process.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
instana:
|
||||
enableAutoProfile: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[tracing]
|
||||
[tracing.instana]
|
||||
enableAutoProfile = true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--tracing.instana.enableAutoProfile=true
|
||||
```
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Jaeger
|
||||
|
||||
To enable the Jaeger:
|
||||
To enable the Jaeger tracer:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -18,13 +18,16 @@ tracing:
|
||||
|
||||
!!! warning
|
||||
Traefik is able to send data over the compact thrift protocol to the [Jaeger agent](https://www.jaegertracing.io/docs/deployment/#agent)
|
||||
or a [Jaeger collector](https://www.jaegertracing.io/docs/deployment/#collectors).
|
||||
or a [Jaeger collector](https://www.jaegertracing.io/docs/deployment/#collector).
|
||||
|
||||
!!! info
|
||||
All Jaeger configuration can be overridden by [environment variables](https://github.com/jaegertracing/jaeger-client-go#environment-variables)
|
||||
|
||||
#### `samplingServerURL`
|
||||
|
||||
_Required, Default="http://localhost:5778/sampling"_
|
||||
|
||||
Sampling Server URL is the address of jaeger-agent's HTTP sampling server.
|
||||
Address of the Jaeger Agent HTTP sampling server.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -46,7 +49,13 @@ tracing:
|
||||
|
||||
_Required, Default="const"_
|
||||
|
||||
Sampling Type specifies the type of the sampler: `const`, `probabilistic`, `rateLimiting`.
|
||||
Type of the sampler.
|
||||
|
||||
Valid values are:
|
||||
|
||||
- `const`
|
||||
- `probabilistic`
|
||||
- `rateLimiting`
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -68,9 +77,9 @@ tracing:
|
||||
|
||||
_Required, Default=1.0_
|
||||
|
||||
Sampling Param is a value passed to the sampler.
|
||||
Value passed to the sampler.
|
||||
|
||||
Valid values for Param field are:
|
||||
Valid values are:
|
||||
|
||||
- for `const` sampler, 0 or 1 for always false/true respectively
|
||||
- for `probabilistic` sampler, a probability between 0 and 1
|
||||
@@ -96,7 +105,7 @@ tracing:
|
||||
|
||||
_Required, Default="127.0.0.1:6831"_
|
||||
|
||||
Local Agent Host Port instructs reporter to send spans to jaeger-agent at this address.
|
||||
Local Agent Host Port instructs the reporter to send spans to the Jaeger Agent at this address (host:port).
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -118,7 +127,7 @@ tracing:
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Generate 128-bit trace IDs, compatible with OpenCensus.
|
||||
Generates 128 bits trace IDs, compatible with OpenCensus.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -140,8 +149,9 @@ tracing:
|
||||
|
||||
_Required, Default="jaeger"_
|
||||
|
||||
Set the propagation header type.
|
||||
This can be either:
|
||||
Sets the propagation header type.
|
||||
|
||||
Valid values are:
|
||||
|
||||
- `jaeger`, jaeger's default trace header.
|
||||
- `b3`, compatible with OpenZipkin
|
||||
@@ -166,7 +176,7 @@ tracing:
|
||||
|
||||
_Required, Default="uber-trace-id"_
|
||||
|
||||
Trace Context Header Name is the http header name used to propagate tracing context.
|
||||
HTTP header name used to propagate tracing context.
|
||||
This must be in lower-case to avoid mismatches when decoding incoming headers.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
@@ -189,7 +199,7 @@ tracing:
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Disable the UDP connection helper that periodically re-resolves the agent's hostname and reconnects if there was a change.
|
||||
Disables 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.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
@@ -213,7 +223,7 @@ tracing:
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Collector Endpoint instructs reporter to send spans to jaeger-collector at this URL.
|
||||
Collector Endpoint instructs the reporter to send spans to the Jaeger Collector at this URL.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -236,7 +246,7 @@ tracing:
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
User instructs reporter to include a user for basic http authentication when sending spans to jaeger-collector.
|
||||
User instructs the reporter to include a user for basic HTTP authentication when sending spans to the Jaeger Collector.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -259,7 +269,7 @@ tracing:
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Password instructs reporter to include a password for basic http authentication when sending spans to jaeger-collector.
|
||||
Password instructs the reporter to include a password for basic HTTP authentication when sending spans to the Jaeger Collector.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Zipkin
|
||||
|
||||
To enable the Zipkin:
|
||||
To enable the Zipkin tracer:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -20,7 +20,7 @@ tracing:
|
||||
|
||||
_Required, Default="http://localhost:9411/api/v2/spans"_
|
||||
|
||||
Zipkin HTTP endpoint used to send data.
|
||||
HTTP endpoint used to send data.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -42,7 +42,7 @@ tracing:
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Use Zipkin SameSpan RPC style traces.
|
||||
Uses SameSpan RPC style traces.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -64,7 +64,7 @@ tracing:
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Use Zipkin 128 bit trace IDs.
|
||||
Uses 128 bits trace IDs.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
@@ -86,7 +86,7 @@ tracing:
|
||||
|
||||
_Required, Default=1.0_
|
||||
|
||||
The rate between 0.0 and 1.0 of requests to trace.
|
||||
The proportion of requests to trace, specified between 0.0 and 1.0.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
tracing:
|
||||
|
@@ -147,9 +147,16 @@ All the following endpoints must be accessed with a `GET` HTTP request.
|
||||
| `/api/tcp/routers/{name}` | Returns the information of the TCP router specified by `name`. |
|
||||
| `/api/tcp/services` | Lists all the TCP services information. |
|
||||
| `/api/tcp/services/{name}` | Returns the information of the TCP service specified by `name`. |
|
||||
| `/api/tcp/middlewares` | Lists all the TCP middlewares information. |
|
||||
| `/api/tcp/middlewares/{name}` | Returns the information of the TCP middleware specified by `name`. |
|
||||
| `/api/udp/routers` | Lists all the UDP routers information. |
|
||||
| `/api/udp/routers/{name}` | Returns the information of the UDP router specified by `name`. |
|
||||
| `/api/udp/services` | Lists all the UDP services information. |
|
||||
| `/api/udp/services/{name}` | Returns the information of the UDP service specified by `name`. |
|
||||
| `/api/entrypoints` | Lists all the entry points information. |
|
||||
| `/api/entrypoints/{name}` | Returns the information of the entry point specified by `name`. |
|
||||
| `/api/overview` | Returns statistic information about http and tcp as well as enabled features and providers. |
|
||||
| `/api/rawdata` | Returns information about dynamic configurations, errors, status and dependency relations. |
|
||||
| `/api/version` | Returns information about Traefik version. |
|
||||
| `/debug/vars` | See the [expvar](https://golang.org/pkg/expvar/) Go documentation. |
|
||||
| `/debug/pprof/` | See the [pprof Index](https://golang.org/pkg/net/http/pprof/#Index) Go documentation. |
|
||||
|
@@ -66,8 +66,8 @@ with a router attached to the service `api@internal` in the
|
||||
to allow defining:
|
||||
|
||||
- One or more security features through [middlewares](../middlewares/overview.md)
|
||||
like authentication ([basicAuth](../middlewares/basicauth.md) , [digestAuth](../middlewares/digestauth.md),
|
||||
[forwardAuth](../middlewares/forwardauth.md)) or [whitelisting](../middlewares/ipwhitelist.md).
|
||||
like authentication ([basicAuth](../middlewares/http/basicauth.md) , [digestAuth](../middlewares/http/digestauth.md),
|
||||
[forwardAuth](../middlewares/http/forwardauth.md)) or [whitelisting](../middlewares/http/ipwhitelist.md).
|
||||
|
||||
- A [router rule](#dashboard-router-rule) for accessing the dashboard,
|
||||
through Traefik itself (sometimes referred as "Traefik-ception").
|
||||
|
@@ -362,13 +362,14 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
Defines TLS options for Consul server endpoint.
|
||||
Defines the TLS configuration used for the secure connection to Consul Catalog.
|
||||
|
||||
##### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the CA certificate used for Consul communication, defaults to the system bundle if not specified.
|
||||
`ca` is the path to the certificate authority used for the secure connection to Consul Catalog,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -391,11 +392,11 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Consul.
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Consul Catalog.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -422,8 +423,7 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate to use for Consul communication.
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to Consul Catalog.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
@@ -450,8 +450,7 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key for Consul communication.
|
||||
|
||||
`key` is the path to the private key used for the secure connection to Consul Catalog.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
@@ -476,7 +475,7 @@ providers:
|
||||
|
||||
##### `insecureSkipVerify`
|
||||
|
||||
_Optional_
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to Consul accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
@@ -531,8 +530,8 @@ _Optional, Default=```Host(`{{ normalize .Name }}`)```_
|
||||
The default host rule for all services.
|
||||
|
||||
For a given service, if no routing rule was defined by a tag, it is defined by this `defaultRule` instead.
|
||||
The `defaultRule` must be set to a valid [Go template](https://golang.org/pkg/text/template/),
|
||||
and can include [sprig template functions](http://masterminds.github.io/sprig/).
|
||||
The `defaultRule` must be set to a valid [Go template](https://pkg.go.dev/text/template/),
|
||||
and can include [sprig template functions](https://masterminds.github.io/sprig/).
|
||||
The service name can be accessed with the `Name` identifier,
|
||||
and the template has access to all the labels (i.e. tags beginning with the `prefix`) defined on this service.
|
||||
|
||||
@@ -556,6 +555,81 @@ providers:
|
||||
# ...
|
||||
```
|
||||
|
||||
### `connectAware`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable Consul Connect support.
|
||||
If set to `true`, Traefik will be enabled to communicate with Connect services.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consulCatalog]
|
||||
connectAware = true
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
consulCatalog:
|
||||
connectAware: true
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consulcatalog.connectAware=true
|
||||
# ...
|
||||
```
|
||||
|
||||
### `connectByDefault`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Consider every service as Connect capable by default.
|
||||
If set to `true`, Traefik will consider every Consul Catalog service to be Connect capable by default.
|
||||
The option can be overridden on an instance basis with the `traefik.consulcatalog.connect` tag.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consulCatalog]
|
||||
connectByDefault = true
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
consulCatalog:
|
||||
connectByDefault: true
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consulcatalog.connectByDefault=true
|
||||
# ...
|
||||
```
|
||||
|
||||
### `serviceName`
|
||||
|
||||
_Optional, Default="traefik"_
|
||||
|
||||
Name of the Traefik service in Consul Catalog.
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consulCatalog]
|
||||
serviceName = "test"
|
||||
# ...
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
consulCatalog:
|
||||
serviceName: test
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consulcatalog.serviceName=test
|
||||
# ...
|
||||
```
|
||||
|
||||
### `constraints`
|
||||
|
||||
_Optional, Default=""_
|
||||
@@ -618,3 +692,32 @@ providers:
|
||||
```
|
||||
|
||||
For additional information, refer to [Restrict the Scope of Service Discovery](./overview.md#restrict-the-scope-of-service-discovery).
|
||||
|
||||
### `namespace`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
The `namespace` option defines the namespace in which the consul catalog services will be discovered.
|
||||
|
||||
!!! warning
|
||||
|
||||
The namespace option only works with [Consul Enterprise](https://www.consul.io/docs/enterprise),
|
||||
which provides the [Namespaces](https://www.consul.io/docs/enterprise/namespaces) feature.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
consulCatalog:
|
||||
namespace: "production"
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consulCatalog]
|
||||
namespace = "production"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consulcatalog.namespace=production
|
||||
# ...
|
||||
```
|
||||
|
@@ -54,6 +54,34 @@ providers:
|
||||
--providers.consul.rootkey=traefik
|
||||
```
|
||||
|
||||
### `namespace`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
The `namespace` option defines the namespace to query.
|
||||
|
||||
!!! warning
|
||||
|
||||
The namespace option only works with [Consul Enterprise](https://www.consul.io/docs/enterprise),
|
||||
which provides the [Namespaces](https://www.consul.io/docs/enterprise/namespaces) feature.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
consul:
|
||||
# ...
|
||||
namespace: "production"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consul]
|
||||
# ...
|
||||
namespace = "production"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consul.namespace=production
|
||||
```
|
||||
|
||||
### `username`
|
||||
|
||||
_Optional, Default=""_
|
||||
@@ -64,7 +92,7 @@ Defines a username to connect to Consul with.
|
||||
providers:
|
||||
consul:
|
||||
# ...
|
||||
usename: "foo"
|
||||
username: "foo"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
@@ -97,16 +125,44 @@ providers:
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consul.password=foo
|
||||
--providers.consul.password=bar
|
||||
```
|
||||
|
||||
### `token`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
Defines a token with which to connect to Consul.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
consul:
|
||||
# ...
|
||||
token: "bar"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.consul]
|
||||
# ...
|
||||
token = "bar"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.consul.token=bar
|
||||
```
|
||||
|
||||
### `tls`
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to Consul.
|
||||
|
||||
Certificate Authority used for the secure connection to Consul.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to Consul,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -124,13 +180,15 @@ providers:
|
||||
--providers.consul.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Consul.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Consul.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -152,9 +210,12 @@ providers:
|
||||
--providers.consul.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to Consul.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to Consul.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -175,9 +236,12 @@ providers:
|
||||
--providers.consul.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to Consul.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to Consul.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -198,7 +262,9 @@ providers:
|
||||
--providers.consul.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to Consul accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
|
@@ -252,7 +252,7 @@ See the sections [Docker API Access](#docker-api-access) and [Docker Swarm API A
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.4 # The official v2 Traefik docker image
|
||||
image: traefik:v2.6 # The official v2 Traefik docker image
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
@@ -427,8 +427,8 @@ _Optional, Default=```Host(`{{ normalize .Name }}`)```_
|
||||
|
||||
The `defaultRule` option defines what routing rule to apply to a container if no rule is defined by a label.
|
||||
|
||||
It must be a valid [Go template](https://golang.org/pkg/text/template/), and can use
|
||||
[sprig template functions](http://masterminds.github.io/sprig/).
|
||||
It must be a valid [Go template](https://pkg.go.dev/text/template/), and can use
|
||||
[sprig template functions](https://masterminds.github.io/sprig/).
|
||||
The container service name can be accessed with the `Name` identifier,
|
||||
and the template has access to all the labels defined on this container.
|
||||
|
||||
@@ -613,9 +613,14 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to Docker.
|
||||
|
||||
Certificate Authority used for the secure connection to Docker.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to Docker,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -633,13 +638,15 @@ providers:
|
||||
--providers.docker.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Docker.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Docker.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -661,9 +668,10 @@ providers:
|
||||
--providers.docker.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to Docker.
|
||||
`cert` is the path to the public certificate used for the secure connection to Docker.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -684,9 +692,12 @@ providers:
|
||||
--providers.docker.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to Docker.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection Docker.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -707,7 +718,9 @@ providers:
|
||||
--providers.docker.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to Docker accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
|
@@ -138,8 +138,8 @@ _Optional, Default=```Host(`{{ normalize .Name }}`)```_
|
||||
|
||||
The `defaultRule` option defines what routing rule to apply to a container if no rule is defined by a label.
|
||||
|
||||
It must be a valid [Go template](https://golang.org/pkg/text/template/), and can use
|
||||
[sprig template functions](http://masterminds.github.io/sprig/).
|
||||
It must be a valid [Go template](https://pkg.go.dev/text/template/), and can use
|
||||
[sprig template functions](https://masterminds.github.io/sprig/).
|
||||
The container service name can be accessed with the `Name` identifier,
|
||||
and the template has access to all the labels defined on this container.
|
||||
|
||||
|
@@ -64,7 +64,7 @@ Defines a username with which to connect to etcd.
|
||||
providers:
|
||||
etcd:
|
||||
# ...
|
||||
usename: "foo"
|
||||
username: "foo"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
@@ -104,9 +104,14 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to etcd.
|
||||
|
||||
Certificate Authority used for the secure connection to etcd.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to etcd,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -124,13 +129,15 @@ providers:
|
||||
--providers.etcd.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to etcd.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to etcd.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -152,9 +159,12 @@ providers:
|
||||
--providers.etcd.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to etcd.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to etcd.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -175,9 +185,12 @@ providers:
|
||||
--providers.etcd.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to etcd.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to etcd.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -198,7 +211,9 @@ providers:
|
||||
--providers.etcd.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to etcd accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
|
@@ -198,8 +198,8 @@ providers:
|
||||
Templating does not work in the Traefik main static configuration file.
|
||||
|
||||
Traefik supports using Go templating to automatically generate repetitive sections of configuration files.
|
||||
These sections must be a valid [Go template](https://golang.org/pkg/text/template/), and can use
|
||||
[sprig template functions](http://masterminds.github.io/sprig/).
|
||||
These sections must be a valid [Go template](https://pkg.go.dev/text/template/), and can use
|
||||
[sprig template functions](https://masterminds.github.io/sprig/).
|
||||
|
||||
To illustrate, it is possible to easily define multiple routers, services, and TLS certificates as described in the following examples:
|
||||
|
||||
|
@@ -17,8 +17,7 @@ Defines the HTTP(S) endpoint to poll.
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
http:
|
||||
endpoint:
|
||||
- "http://127.0.0.1:9000/api"
|
||||
endpoint: "http://127.0.0.1:9000/api"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
@@ -55,7 +54,7 @@ providers:
|
||||
|
||||
_Optional, Default="5s"_
|
||||
|
||||
Defines the polling timeout when connecting to the configured endpoint.
|
||||
Defines the polling timeout when connecting to the endpoint.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -76,9 +75,14 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to the endpoint.
|
||||
|
||||
Certificate Authority used for the secure connection to the configured endpoint.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to the endpoint,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -96,13 +100,15 @@ providers:
|
||||
--providers.http.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to the configured endpoint.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to the endpoint.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -124,9 +130,12 @@ providers:
|
||||
--providers.http.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to the configured endpoint.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to the endpoint.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -147,9 +156,12 @@ providers:
|
||||
--providers.http.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to the configured endpoint.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to the endpoint.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -170,7 +182,9 @@ providers:
|
||||
--providers.http.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to the endpoint accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
|
@@ -20,11 +20,17 @@ the Traefik engineering team developed a [Custom Resource Definition](https://ku
|
||||
* Apply the needed kubernetesCRD provider [configuration](#provider-configuration)
|
||||
* Add all necessary Traefik custom [resources](../reference/dynamic-configuration/kubernetes-crd.md#resources)
|
||||
|
||||
!!! warning "Deprecated apiextensions.k8s.io/v1beta1 CRD"
|
||||
|
||||
The `apiextensions.k8s.io/v1beta1` CustomResourceDefinition is deprecated in Kubernetes `v1.16+` and will be removed in `v1.22+`.
|
||||
|
||||
For Kubernetes `v1.16+`, please use the Traefik `apiextensions.k8s.io/v1` CRDs instead.
|
||||
|
||||
??? example "Initializing Resource Definition and RBAC"
|
||||
|
||||
```yaml tab="Traefik Resource Definition"
|
||||
# All resources definition must be declared
|
||||
--8<-- "content/reference/dynamic-configuration/kubernetes-crd-definition.yml"
|
||||
--8<-- "content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml"
|
||||
```
|
||||
|
||||
```yaml tab="RBAC for Traefik CRD"
|
||||
@@ -56,7 +62,7 @@ Previous versions of Traefik used a [KV store](https://doc.traefik.io/traefik/v1
|
||||
|
||||
If you need Let's Encrypt with HA in a Kubernetes environment, we recommend using [Traefik Enterprise](https://traefik.io/traefik-enterprise/), which includes distributed Let's Encrypt as a supported feature.
|
||||
|
||||
If you want to keep using Traefik Proxy, high availability for Let's Encrypt can be achieved by using a Certificate Controller such as [Cert-Manager](https://docs.cert-manager.io/en/latest/index.html).
|
||||
If you want to keep using Traefik Proxy, high availability for Let's Encrypt can be achieved by using a Certificate Controller such as [Cert-Manager](https://cert-manager.io/docs/).
|
||||
When using Cert-Manager to manage certificates, it creates secrets in your namespaces that can be referenced as TLS secrets in your [ingress objects](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls).
|
||||
When using the Traefik Kubernetes CRD Provider, unfortunately Cert-Manager cannot yet interface directly with the CRDs.
|
||||
A workaround is to enable the [Kubernetes Ingress provider](./kubernetes-ingress.md) to allow Cert-Manager to create ingress objects to complete the challenges.
|
||||
@@ -189,13 +195,13 @@ See [label-selectors](https://kubernetes.io/docs/concepts/overview/working-with-
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
labelselector: "app=traefik"
|
||||
labelSelector: "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesCRD]
|
||||
labelselector = "app=traefik"
|
||||
labelSelector = "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
|
@@ -9,7 +9,7 @@ The Gateway API project is part of Kubernetes, working under SIG-NETWORK.
|
||||
The Kubernetes Gateway provider is a Traefik implementation of the [Gateway API](https://gateway-api.sigs.k8s.io/)
|
||||
specifications from the Kubernetes Special Interest Groups (SIGs).
|
||||
|
||||
This provider is proposed as an experimental feature and partially supports the Gateway API [v0.2.0](https://github.com/kubernetes-sigs/gateway-api/releases/tag/v0.2.0) specification.
|
||||
This provider is proposed as an experimental feature and partially supports the Gateway API [v0.4.0](https://github.com/kubernetes-sigs/gateway-api/releases/tag/v0.4.0) specification.
|
||||
|
||||
!!! warning "Enabling The Experimental Kubernetes Gateway Provider"
|
||||
|
||||
@@ -41,7 +41,7 @@ This provider is proposed as an experimental feature and partially supports the
|
||||
!!! tip "All Steps for a Successful Deployment"
|
||||
|
||||
* Add/update the Kubernetes Gateway API [definitions](../reference/dynamic-configuration/kubernetes-gateway.md#definitions).
|
||||
* Add/update the [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) for the Traefik custom resources.
|
||||
* Add/update the [RBAC](../reference/dynamic-configuration/kubernetes-gateway.md#rbac) for the Traefik custom resources.
|
||||
* Add all needed Kubernetes Gateway API [resources](../reference/dynamic-configuration/kubernetes-gateway.md#resources).
|
||||
|
||||
## Examples
|
||||
@@ -62,9 +62,9 @@ This provider is proposed as an experimental feature and partially supports the
|
||||
|
||||
```yaml tab="Gateway API CRDs"
|
||||
# All resources definition must be declared
|
||||
--8<-- "content/reference/dynamic-configuration/networking.x-k8s.io_gatewayclasses.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/networking.x-k8s.io_gateways.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/networking.x-k8s.io_httproutes.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/gateway.networking.k8s.io_gatewayclasses.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/gateway.networking.k8s.io_gateways.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/gateway.networking.k8s.io_httproutes.yaml"
|
||||
```
|
||||
|
||||
```yaml tab="RBAC"
|
||||
@@ -73,17 +73,17 @@ This provider is proposed as an experimental feature and partially supports the
|
||||
|
||||
The Kubernetes Gateway API project provides several guides on how to use the APIs.
|
||||
These guides can help you to go further than the example above.
|
||||
The [getting started guide](https://gateway-api.sigs.k8s.io/v1alpha1/guides/getting-started/) details how to install the CRDs from their repository.
|
||||
The [getting started guide](https://gateway-api.sigs.k8s.io/v1alpha2/guides/getting-started/) details how to install the CRDs from their repository.
|
||||
|
||||
!!! note ""
|
||||
|
||||
Keep in mind that the Traefik Gateway provider only supports the `v0.1.0` (v1alpha1).
|
||||
Keep in mind that the Traefik Gateway provider only supports the `v0.4.0` (v1alpha2).
|
||||
|
||||
For now, the Traefik Gateway Provider can be used while following the below guides:
|
||||
|
||||
* [Simple Gateway](https://gateway-api.sigs.k8s.io/v1alpha1/guides/simple-gateway/)
|
||||
* [HTTP routing](https://gateway-api.sigs.k8s.io/v1alpha1/guides/http-routing/)
|
||||
* [TLS](https://gateway-api.sigs.k8s.io/v1alpha1/guides/tls/) (Partial support: only on listeners with terminate mode)
|
||||
* [Simple Gateway](https://gateway-api.sigs.k8s.io/v1alpha2/guides/simple-gateway/)
|
||||
* [HTTP routing](https://gateway-api.sigs.k8s.io/v1alpha2/guides/http-routing/)
|
||||
* [TLS](https://gateway-api.sigs.k8s.io/v1alpha2/guides/tls/)
|
||||
|
||||
## Resource Configuration
|
||||
|
||||
@@ -96,7 +96,9 @@ Traefik implements the following resources:
|
||||
|
||||
* `GatewayClass` defines a set of Gateways that share a common configuration and behaviour.
|
||||
* `Gateway` describes how traffic can be translated to Services within the cluster.
|
||||
* `HTTPRoute` define HTTP rules for mapping requests from a Gateway to Kubernetes Services.
|
||||
* `HTTPRoute` defines HTTP rules for mapping requests from a Gateway to Kubernetes Services.
|
||||
* `TCPRoute` defines TCP rules for mapping requests from a Gateway to Kubernetes Services.
|
||||
* `TLSRoute` defines TLS rules for mapping requests from a Gateway to Kubernetes Services.
|
||||
|
||||
## Provider Configuration
|
||||
|
||||
|
@@ -6,6 +6,10 @@ The Kubernetes Ingress Controller.
|
||||
The Traefik Kubernetes Ingress provider is a Kubernetes Ingress controller; that is to say,
|
||||
it manages access to cluster services by supporting the [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) specification.
|
||||
|
||||
## Requirements
|
||||
|
||||
Traefik supports `1.14+` Kubernetes clusters.
|
||||
|
||||
## Routing Configuration
|
||||
|
||||
See the dedicated section in [routing](../routing/providers/kubernetes-ingress.md).
|
||||
@@ -31,11 +35,39 @@ The provider then watches for incoming ingresses events, such as the example bel
|
||||
and derives the corresponding dynamic configuration from it,
|
||||
which in turn creates the resulting routers, services, handlers, etc.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
```yaml tab="Ingress"
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: "foo"
|
||||
name: foo
|
||||
namespace: production
|
||||
|
||||
spec:
|
||||
rules:
|
||||
- host: example.net
|
||||
http:
|
||||
paths:
|
||||
- path: /bar
|
||||
pathType: Exact
|
||||
backend:
|
||||
service:
|
||||
name: service1
|
||||
port:
|
||||
number: 80
|
||||
- path: /foo
|
||||
pathType: Exact
|
||||
backend:
|
||||
service:
|
||||
name: service1
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
```yaml tab="Ingress v1beta1 (deprecated)"
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: foo
|
||||
namespace: production
|
||||
|
||||
spec:
|
||||
@@ -72,7 +104,7 @@ If you need Let's Encrypt with high availability in a Kubernetes environment,
|
||||
we recommend using [Traefik Enterprise](https://traefik.io/traefik-enterprise/) which includes distributed Let's Encrypt as a supported feature.
|
||||
|
||||
If you want to keep using Traefik Proxy,
|
||||
LetsEncrypt HA can be achieved by using a Certificate Controller such as [Cert-Manager](https://docs.cert-manager.io/en/latest/index.html).
|
||||
LetsEncrypt HA can be achieved by using a Certificate Controller such as [Cert-Manager](https://cert-manager.io/docs/).
|
||||
When using Cert-Manager to manage certificates,
|
||||
it creates secrets in your namespaces that can be referenced as TLS secrets in your [ingress objects](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls).
|
||||
|
||||
@@ -197,7 +229,7 @@ See [label-selectors](https://kubernetes.io/docs/concepts/overview/working-with-
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
labelselector: "app=traefik"
|
||||
labelSelector: "app=traefik"
|
||||
# ...
|
||||
```
|
||||
|
||||
@@ -220,11 +252,13 @@ Value of `kubernetes.io/ingress.class` annotation that identifies Ingress object
|
||||
If the parameter is set, 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.
|
||||
|
||||
!!! info "Kubernetes 1.18+"
|
||||
??? 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*.
|
||||
In that case, Traefik will look for an `IngressClass` in the cluster with the controller value equal to *traefik.io/ingress-controller*.
|
||||
|
||||
In addition to the controller value matching mechanism, the property `ingressClass` (if set) will be used to select IngressClasses by applying a strict matching on their name.
|
||||
|
||||
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.
|
||||
|
||||
@@ -238,22 +272,56 @@ Otherwise, Ingresses missing the annotation, having an empty value, or the value
|
||||
```
|
||||
|
||||
```yaml tab="Ingress"
|
||||
apiVersion: "networking.k8s.io/v1beta1"
|
||||
kind: "Ingress"
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: "example-ingress"
|
||||
name: example-ingress
|
||||
spec:
|
||||
ingressClassName: "traefik-lb"
|
||||
ingressClassName: traefik-lb
|
||||
rules:
|
||||
- host: "*.example.com"
|
||||
http:
|
||||
paths:
|
||||
- path: "/example"
|
||||
- path: /example
|
||||
backend:
|
||||
serviceName: "example-service"
|
||||
serviceName: example-service
|
||||
servicePort: 80
|
||||
```
|
||||
|
||||
??? info "Kubernetes 1.19+"
|
||||
|
||||
If the Kubernetes cluster version is 1.19+,
|
||||
prefer using the `networking.k8s.io/v1` [apiVersion](https://v1-19.docs.kubernetes.io/docs/setup/release/notes/#api-change) of `Ingress` and `IngressClass`.
|
||||
|
||||
```yaml tab="IngressClass"
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
name: traefik-lb
|
||||
spec:
|
||||
controller: traefik.io/ingress-controller
|
||||
```
|
||||
|
||||
```yaml tab="Ingress"
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: example-ingress
|
||||
spec:
|
||||
ingressClassName: traefik-lb
|
||||
rules:
|
||||
- host: "*.example.com"
|
||||
http:
|
||||
paths:
|
||||
- path: /example
|
||||
pathType: Exact
|
||||
backend:
|
||||
service:
|
||||
name: example-service
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
@@ -375,6 +443,30 @@ providers:
|
||||
--providers.kubernetesingress.throttleDuration=10s
|
||||
```
|
||||
|
||||
### `allowEmptyServices`
|
||||
|
||||
_Optional, Default: false
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
allowEmptyServices: true
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesIngress]
|
||||
allowEmptyServices = true
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.kubernetesingress.allowEmptyServices=true
|
||||
```
|
||||
|
||||
Allow the creation of services if there are no endpoints available.
|
||||
This results in `503` http responses instead of `404`.
|
||||
|
||||
### `allowExternalNameServices`
|
||||
|
||||
_Optional, Default: false_
|
||||
@@ -401,4 +493,4 @@ providers:
|
||||
### Further
|
||||
|
||||
To learn more about the various aspects of the Ingress specification that Traefik supports,
|
||||
many examples of Ingresses definitions are located in the test [examples](https://github.com/traefik/traefik/tree/v2.4/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository.
|
||||
many examples of Ingresses definitions are located in the test [examples](https://github.com/traefik/traefik/tree/v2.6/pkg/provider/kubernetes/ingress/fixtures) of the Traefik repository.
|
||||
|
@@ -113,8 +113,8 @@ The default host rule for all services.
|
||||
|
||||
For a given application, 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/),
|
||||
and can include [sprig template functions](http://masterminds.github.io/sprig/).
|
||||
It must be a valid [Go template](https://pkg.go.dev/text/template/),
|
||||
and can include [sprig template functions](https://masterminds.github.io/sprig/).
|
||||
|
||||
The app ID can be accessed with the `Name` identifier,
|
||||
and the template has access to all the labels defined on this Marathon application.
|
||||
@@ -404,9 +404,12 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to Marathon.
|
||||
|
||||
Certificate Authority used for the secure connection to Marathon.
|
||||
#### `ca`
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to Marathon,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -424,13 +427,15 @@ providers:
|
||||
--providers.marathon.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Marathon.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Marathon.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -452,9 +457,12 @@ providers:
|
||||
--providers.marathon.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to Marathon.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to Marathon.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -475,9 +483,12 @@ providers:
|
||||
--providers.marathon.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to Marathon.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to Marathon.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -498,7 +509,9 @@ providers:
|
||||
--providers.marathon.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to Marathon accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
@@ -531,18 +544,18 @@ see [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration).
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
marathon:
|
||||
responseHeaderTimeout: "10s"
|
||||
tlsHandshakeTimeout: "10s"
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.marathon]
|
||||
responseHeaderTimeout = "10s"
|
||||
tlsHandshakeTimeout = "10s"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.marathon.responseHeaderTimeout=10s
|
||||
--providers.marathon.tlsHandshakeTimeout=10s
|
||||
# ...
|
||||
```
|
||||
|
||||
|
@@ -95,8 +95,8 @@ The default host rule for all services.
|
||||
|
||||
The `defaultRule` option defines what routing rule to apply to a container if no rule is defined by a label.
|
||||
|
||||
It must be a valid [Go template](https://golang.org/pkg/text/template/), and can use
|
||||
[sprig template functions](http://masterminds.github.io/sprig/).
|
||||
It must be a valid [Go template](https://pkg.go.dev/text/template/), and can use
|
||||
[sprig template functions](https://masterminds.github.io/sprig/).
|
||||
The service name can be accessed with the `Name` identifier,
|
||||
and the template has access to all the labels defined on this container.
|
||||
|
||||
|
@@ -64,7 +64,7 @@ Defines a username to connect with Redis.
|
||||
providers:
|
||||
redis:
|
||||
# ...
|
||||
usename: "foo"
|
||||
username: "foo"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
@@ -104,9 +104,14 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to Redis.
|
||||
|
||||
Certificate Authority used for the secure connection to Redis.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to Redis,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -124,13 +129,15 @@ providers:
|
||||
--providers.redis.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Redis.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Redis.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -152,9 +159,12 @@ providers:
|
||||
--providers.redis.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to Redis.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to Redis.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -175,9 +185,12 @@ providers:
|
||||
--providers.redis.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to Redis.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to Redis.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -198,7 +211,9 @@ providers:
|
||||
--providers.redis.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to Redis accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
|
@@ -64,7 +64,7 @@ Defines a username to connect with ZooKeeper.
|
||||
providers:
|
||||
zooKeeper:
|
||||
# ...
|
||||
usename: "foo"
|
||||
username: "foo"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
@@ -104,9 +104,14 @@ providers:
|
||||
|
||||
_Optional_
|
||||
|
||||
#### `tls.ca`
|
||||
Defines the TLS configuration used for the secure connection to ZooKeeper.
|
||||
|
||||
Certificate Authority used for the secure connection to ZooKeeper.
|
||||
#### `ca`
|
||||
|
||||
_Optional_
|
||||
|
||||
`ca` is the path to the certificate authority used for the secure connection to ZooKeeper,
|
||||
it defaults to the system bundle.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -124,13 +129,15 @@ providers:
|
||||
--providers.zookeeper.tls.ca=path/to/ca.crt
|
||||
```
|
||||
|
||||
#### `tls.caOptional`
|
||||
#### `caOptional`
|
||||
|
||||
The value of `tls.caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Zookeeper.
|
||||
_Optional_
|
||||
|
||||
The value of `caOptional` defines which policy should be used for the secure connection with TLS Client Authentication to Zookeeper.
|
||||
|
||||
!!! warning ""
|
||||
|
||||
If `tls.ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
|
||||
|
||||
When this option is set to `true`, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
|
||||
|
||||
@@ -152,9 +159,12 @@ providers:
|
||||
--providers.zookeeper.tls.caOptional=true
|
||||
```
|
||||
|
||||
#### `tls.cert`
|
||||
#### `cert`
|
||||
|
||||
Public certificate used for the secure connection to ZooKeeper.
|
||||
_Optional_
|
||||
|
||||
`cert` is the path to the public certificate used for the secure connection to ZooKeeper.
|
||||
When using this option, setting the `key` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -175,9 +185,12 @@ providers:
|
||||
--providers.zookeeper.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.key`
|
||||
#### `key`
|
||||
|
||||
Private certificate used for the secure connection to ZooKeeper.
|
||||
_Optional_
|
||||
|
||||
`key` is the path to the private key used for the secure connection to ZooKeeper.
|
||||
When using this option, setting the `cert` option is required.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
@@ -198,7 +211,9 @@ providers:
|
||||
--providers.zookeeper.tls.key=path/to/foo.key
|
||||
```
|
||||
|
||||
#### `tls.insecureSkipVerify`
|
||||
#### `insecureSkipVerify`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
If `insecureSkipVerify` is `true`, the TLS connection to Zookeeper accepts any certificate presented by the server regardless of the hostnames it covers.
|
||||
|
||||
|
@@ -1 +1,2 @@
|
||||
- "traefik.enable=true"
|
||||
- "traefik.consulcatalog.connect=true"
|
||||
|
@@ -13,6 +13,7 @@
|
||||
- "traefik.http.middlewares.middleware04.circuitbreaker.expression=foobar"
|
||||
- "traefik.http.middlewares.middleware05.compress=true"
|
||||
- "traefik.http.middlewares.middleware05.compress.excludedcontenttypes=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware05.compress.minresponsebodybytes=42"
|
||||
- "traefik.http.middlewares.middleware06.contenttype.autodetect=true"
|
||||
- "traefik.http.middlewares.middleware07.digestauth.headerfield=foobar"
|
||||
- "traefik.http.middlewares.middleware07.digestauth.realm=foobar"
|
||||
@@ -35,7 +36,6 @@
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolallowcredentials=true"
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolallowheaders=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolallowmethods=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolalloworigin=foobar"
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolalloworiginlist=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolalloworiginlistregex=foobar, foobar"
|
||||
- "traefik.http.middlewares.middleware10.headers.accesscontrolexposeheaders=foobar, foobar"
|
||||
@@ -91,6 +91,7 @@
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.domaincomponent=true"
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.locality=true"
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.organization=true"
|
||||
- "traefik.http.middlewares.middleware13.passtlsclientcert.info.subject.organizationalunit=true"
|
||||
- "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"
|
||||
@@ -160,7 +161,9 @@
|
||||
- "traefik.http.services.service01.loadbalancer.server.port=foobar"
|
||||
- "traefik.http.services.service01.loadbalancer.server.scheme=foobar"
|
||||
- "traefik.http.services.service01.loadbalancer.serverstransport=foobar"
|
||||
- "traefik.tcp.middlewares.middleware00.ipwhitelist.sourcerange=foobar, foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.entrypoints=foobar, foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.middlewares=foobar, foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.rule=foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.service=foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.tls=true"
|
||||
@@ -172,6 +175,7 @@
|
||||
- "traefik.tcp.routers.tcprouter0.tls.options=foobar"
|
||||
- "traefik.tcp.routers.tcprouter0.tls.passthrough=true"
|
||||
- "traefik.tcp.routers.tcprouter1.entrypoints=foobar, foobar"
|
||||
- "traefik.tcp.routers.tcprouter1.middlewares=foobar, foobar"
|
||||
- "traefik.tcp.routers.tcprouter1.rule=foobar"
|
||||
- "traefik.tcp.routers.tcprouter1.service=foobar"
|
||||
- "traefik.tcp.routers.tcprouter1.tls=true"
|
||||
|
@@ -69,6 +69,8 @@
|
||||
service = "foobar"
|
||||
maxBodySize = 42
|
||||
|
||||
[http.services.Service02.mirroring.healthCheck]
|
||||
|
||||
[[http.services.Service02.mirroring.mirrors]]
|
||||
name = "foobar"
|
||||
percent = 42
|
||||
@@ -78,6 +80,7 @@
|
||||
percent = 42
|
||||
[http.services.Service03]
|
||||
[http.services.Service03.weighted]
|
||||
[http.services.Service03.weighted.healthCheck]
|
||||
|
||||
[[http.services.Service03.weighted.services]]
|
||||
name = "foobar"
|
||||
@@ -119,6 +122,7 @@
|
||||
[http.middlewares.Middleware05]
|
||||
[http.middlewares.Middleware05.compress]
|
||||
excludedContentTypes = ["foobar", "foobar"]
|
||||
minResponseBodyBytes = 42
|
||||
[http.middlewares.Middleware06]
|
||||
[http.middlewares.Middleware06.contentType]
|
||||
autoDetect = true
|
||||
@@ -152,7 +156,6 @@
|
||||
accessControlAllowCredentials = true
|
||||
accessControlAllowHeaders = ["foobar", "foobar"]
|
||||
accessControlAllowMethods = ["foobar", "foobar"]
|
||||
accessControlAllowOrigin = "foobar"
|
||||
accessControlAllowOriginList = ["foobar", "foobar"]
|
||||
accessControlAllowOriginListRegex = ["foobar", "foobar"]
|
||||
accessControlExposeHeaders = ["foobar", "foobar"]
|
||||
@@ -215,6 +218,7 @@
|
||||
province = true
|
||||
locality = true
|
||||
organization = true
|
||||
organizationalUnit = true
|
||||
commonName = true
|
||||
serialNumber = true
|
||||
domainComponent = true
|
||||
@@ -275,6 +279,8 @@
|
||||
insecureSkipVerify = true
|
||||
rootCAs = ["foobar", "foobar"]
|
||||
maxIdleConnsPerHost = 42
|
||||
disableHTTP2 = true
|
||||
peerCertURI = "foobar"
|
||||
|
||||
[[http.serversTransports.ServersTransport0.certificates]]
|
||||
certFile = "foobar"
|
||||
@@ -292,6 +298,8 @@
|
||||
insecureSkipVerify = true
|
||||
rootCAs = ["foobar", "foobar"]
|
||||
maxIdleConnsPerHost = 42
|
||||
disableHTTP2 = true
|
||||
peerCertURI = "foobar"
|
||||
|
||||
[[http.serversTransports.ServersTransport1.certificates]]
|
||||
certFile = "foobar"
|
||||
@@ -309,6 +317,7 @@
|
||||
[tcp.routers]
|
||||
[tcp.routers.TCPRouter0]
|
||||
entryPoints = ["foobar", "foobar"]
|
||||
middlewares = ["foobar", "foobar"]
|
||||
service = "foobar"
|
||||
rule = "foobar"
|
||||
[tcp.routers.TCPRouter0.tls]
|
||||
@@ -325,6 +334,7 @@
|
||||
sans = ["foobar", "foobar"]
|
||||
[tcp.routers.TCPRouter1]
|
||||
entryPoints = ["foobar", "foobar"]
|
||||
middlewares = ["foobar", "foobar"]
|
||||
service = "foobar"
|
||||
rule = "foobar"
|
||||
[tcp.routers.TCPRouter1.tls]
|
||||
@@ -361,6 +371,10 @@
|
||||
[[tcp.services.TCPService02.weighted.services]]
|
||||
name = "foobar"
|
||||
weight = 42
|
||||
[tcp.middlewares]
|
||||
[tcp.middlewares.Middleware00]
|
||||
[tcp.middlewares.Middleware00.ipWhiteList]
|
||||
sourceRange = ["foobar", "foobar"]
|
||||
|
||||
[udp]
|
||||
[udp.routers]
|
||||
@@ -409,6 +423,7 @@
|
||||
curvePreferences = ["foobar", "foobar"]
|
||||
sniStrict = true
|
||||
preferServerCipherSuites = true
|
||||
alpnProtocols = ["foobar", "foobar"]
|
||||
[tls.options.Options0.clientAuth]
|
||||
caFiles = ["foobar", "foobar"]
|
||||
clientAuthType = "foobar"
|
||||
@@ -419,6 +434,7 @@
|
||||
curvePreferences = ["foobar", "foobar"]
|
||||
sniStrict = true
|
||||
preferServerCipherSuites = true
|
||||
alpnProtocols = ["foobar", "foobar"]
|
||||
[tls.options.Options1.clientAuth]
|
||||
caFiles = ["foobar", "foobar"]
|
||||
clientAuthType = "foobar"
|
||||
|
@@ -75,6 +75,7 @@ http:
|
||||
mirroring:
|
||||
service: foobar
|
||||
maxBodySize: 42
|
||||
healthCheck: {}
|
||||
mirrors:
|
||||
- name: foobar
|
||||
percent: 42
|
||||
@@ -82,6 +83,7 @@ http:
|
||||
percent: 42
|
||||
Service03:
|
||||
weighted:
|
||||
healthCheck: {}
|
||||
services:
|
||||
- name: foobar
|
||||
weight: 42
|
||||
@@ -126,6 +128,7 @@ http:
|
||||
excludedContentTypes:
|
||||
- foobar
|
||||
- foobar
|
||||
minResponseBodyBytes: 42
|
||||
Middleware06:
|
||||
contentType:
|
||||
autoDetect: true
|
||||
@@ -177,7 +180,6 @@ http:
|
||||
accessControlAllowMethods:
|
||||
- foobar
|
||||
- foobar
|
||||
accessControlAllowOrigin: foobar
|
||||
accessControlAllowOriginList:
|
||||
- foobar
|
||||
- foobar
|
||||
@@ -249,6 +251,7 @@ http:
|
||||
province: true
|
||||
locality: true
|
||||
organization: true
|
||||
organizationalUnit: true
|
||||
commonName: true
|
||||
serialNumber: true
|
||||
domainComponent: true
|
||||
@@ -327,6 +330,8 @@ http:
|
||||
dialTimeout: 42s
|
||||
responseHeaderTimeout: 42s
|
||||
idleConnTimeout: 42s
|
||||
disableHTTP2: true
|
||||
peerCertURI: foobar
|
||||
ServersTransport1:
|
||||
serverName: foobar
|
||||
insecureSkipVerify: true
|
||||
@@ -343,12 +348,17 @@ http:
|
||||
dialTimeout: 42s
|
||||
responseHeaderTimeout: 42s
|
||||
idleConnTimeout: 42s
|
||||
disableHTTP2: true
|
||||
peerCertURI: foobar
|
||||
tcp:
|
||||
routers:
|
||||
TCPRouter0:
|
||||
entryPoints:
|
||||
- foobar
|
||||
- foobar
|
||||
middlewares:
|
||||
- foobar
|
||||
- foobar
|
||||
service: foobar
|
||||
rule: foobar
|
||||
tls:
|
||||
@@ -368,6 +378,9 @@ tcp:
|
||||
entryPoints:
|
||||
- foobar
|
||||
- foobar
|
||||
middlewares:
|
||||
- foobar
|
||||
- foobar
|
||||
service: foobar
|
||||
rule: foobar
|
||||
tls:
|
||||
@@ -383,6 +396,12 @@ tcp:
|
||||
sans:
|
||||
- foobar
|
||||
- foobar
|
||||
middlewares:
|
||||
Middleware00:
|
||||
ipWhiteList:
|
||||
sourceRange:
|
||||
- foobar
|
||||
- foobar
|
||||
services:
|
||||
TCPService01:
|
||||
loadBalancer:
|
||||
@@ -453,6 +472,9 @@ tls:
|
||||
clientAuthType: foobar
|
||||
sniStrict: true
|
||||
preferServerCipherSuites: true
|
||||
alpnProtocols:
|
||||
- foobar
|
||||
- foobar
|
||||
Options1:
|
||||
minVersion: foobar
|
||||
maxVersion: foobar
|
||||
@@ -469,6 +491,9 @@ tls:
|
||||
clientAuthType: foobar
|
||||
sniStrict: true
|
||||
preferServerCipherSuites: true
|
||||
alpnProtocols:
|
||||
- foobar
|
||||
- foobar
|
||||
stores:
|
||||
Store0:
|
||||
defaultCertificate:
|
||||
|
@@ -0,0 +1,226 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/891
|
||||
creationTimestamp: null
|
||||
name: gatewayclasses.gateway.networking.k8s.io
|
||||
spec:
|
||||
group: gateway.networking.k8s.io
|
||||
names:
|
||||
categories:
|
||||
- gateway-api
|
||||
kind: GatewayClass
|
||||
listKind: GatewayClassList
|
||||
plural: gatewayclasses
|
||||
shortNames:
|
||||
- gc
|
||||
singular: gatewayclass
|
||||
scope: Cluster
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.controller
|
||||
name: Controller
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- jsonPath: .spec.description
|
||||
name: Description
|
||||
priority: 1
|
||||
type: string
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: "GatewayClass describes a class of Gateways available to the
|
||||
user for creating Gateway resources. \n It is recommended that this resource
|
||||
be used as a template for Gateways. This means that a Gateway is based on
|
||||
the state of the GatewayClass at the time it was created and changes to
|
||||
the GatewayClass or associated parameters are not propagated down to existing
|
||||
Gateways. This recommendation is intended to limit the blast radius of changes
|
||||
to GatewayClass or associated parameters. If implementations choose to propagate
|
||||
GatewayClass changes to existing Gateways, that MUST be clearly documented
|
||||
by the implementation. \n Whenever one or more Gateways are using a GatewayClass,
|
||||
implementations MUST add the `gateway-exists-finalizer.gateway.networking.k8s.io`
|
||||
finalizer on the associated GatewayClass. This ensures that a GatewayClass
|
||||
associated with a Gateway is not deleted while in use. \n GatewayClass is
|
||||
a Cluster level resource."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: Spec defines the desired state of GatewayClass.
|
||||
properties:
|
||||
controllerName:
|
||||
description: "ControllerName is the name of the controller that is
|
||||
managing Gateways of this class. The value of this field MUST be
|
||||
a domain prefixed path. \n Example: \"example.net/gateway-controller\".
|
||||
\n This field is not mutable and cannot be empty. \n Support: Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
|
||||
type: string
|
||||
description:
|
||||
description: Description helps describe a GatewayClass with more details.
|
||||
maxLength: 64
|
||||
type: string
|
||||
parametersRef:
|
||||
description: "ParametersRef is a reference to a resource that contains
|
||||
the configuration parameters corresponding to the GatewayClass.
|
||||
This is optional if the controller does not require any additional
|
||||
configuration. \n ParametersRef can reference a standard Kubernetes
|
||||
resource, i.e. ConfigMap, or an implementation-specific custom resource.
|
||||
The resource can be cluster-scoped or namespace-scoped. \n If the
|
||||
referent cannot be found, the GatewayClass's \"InvalidParameters\"
|
||||
status condition will be true. \n Support: Custom"
|
||||
properties:
|
||||
group:
|
||||
description: Group is the group of the referent.
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is kind of the referent.
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of the referent.
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace is the namespace of the referent. This
|
||||
field is required when referring to a Namespace-scoped resource
|
||||
and MUST be unset when referring to a Cluster-scoped resource.
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
required:
|
||||
- group
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- controllerName
|
||||
type: object
|
||||
status:
|
||||
default:
|
||||
conditions:
|
||||
- lastTransitionTime: "1970-01-01T00:00:00Z"
|
||||
message: Waiting for controller
|
||||
reason: Waiting
|
||||
status: Unknown
|
||||
type: Accepted
|
||||
description: Status defines the current state of GatewayClass.
|
||||
properties:
|
||||
conditions:
|
||||
default:
|
||||
- lastTransitionTime: "1970-01-01T00:00:00Z"
|
||||
message: Waiting for controller
|
||||
reason: Waiting
|
||||
status: Unknown
|
||||
type: Accepted
|
||||
description: "Conditions is the current status from the controller
|
||||
for this GatewayClass. \n Controllers should prefer to publish conditions
|
||||
using values of GatewayClassConditionType for the type of each Condition."
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource. --- This struct is intended for direct
|
||||
use as an array at the field path .status.conditions. For example,
|
||||
type FooStatus struct{ // Represents the observations of a
|
||||
foo's current state. // Known .status.conditions.type are:
|
||||
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
|
||||
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
|
||||
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
|
||||
\n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should be when
|
||||
the underlying condition changed. If that is not known, then
|
||||
using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance, if .metadata.generation
|
||||
is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the current
|
||||
state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier indicating
|
||||
the reason for the condition's last transition. Producers
|
||||
of specific condition types may define expected values and
|
||||
meanings for this field, and whether the values are considered
|
||||
a guaranteed API. The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across resources
|
||||
like Available, but because arbitrary conditions can be useful
|
||||
(see .node.status.conditions), the ability to deconflict is
|
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
maxItems: 8
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
@@ -0,0 +1,719 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/891
|
||||
creationTimestamp: null
|
||||
name: gateways.gateway.networking.k8s.io
|
||||
spec:
|
||||
group: gateway.networking.k8s.io
|
||||
names:
|
||||
categories:
|
||||
- gateway-api
|
||||
kind: Gateway
|
||||
listKind: GatewayList
|
||||
plural: gateways
|
||||
shortNames:
|
||||
- gtw
|
||||
singular: gateway
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.gatewayClassName
|
||||
name: Class
|
||||
type: string
|
||||
- jsonPath: .status.addresses[*].value
|
||||
name: Address
|
||||
type: string
|
||||
- jsonPath: .status.conditions[?(@.type=="Ready")].status
|
||||
name: Ready
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Gateway represents an instance of a service-traffic handling
|
||||
infrastructure by binding Listeners to a set of IP addresses.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: Spec defines the desired state of Gateway.
|
||||
properties:
|
||||
addresses:
|
||||
description: "Addresses requested for this Gateway. This is optional
|
||||
and behavior can depend on the implementation. If a value is set
|
||||
in the spec and the requested address is invalid or unavailable,
|
||||
the implementation MUST indicate this in the associated entry in
|
||||
GatewayStatus.Addresses. \n The Addresses field represents a request
|
||||
for the address(es) on the \"outside of the Gateway\", that traffic
|
||||
bound for this Gateway will use. This could be the IP address or
|
||||
hostname of an external load balancer or other networking infrastructure,
|
||||
or some other address that traffic will be sent to. \n The .listener.hostname
|
||||
field is used to route traffic that has already arrived at the Gateway
|
||||
to the correct in-cluster destination. \n If no Addresses are specified,
|
||||
the implementation MAY schedule the Gateway in an implementation-specific
|
||||
manner, assigning an appropriate set of Addresses. \n The implementation
|
||||
MUST bind all Listeners to every GatewayAddress that it assigns
|
||||
to the Gateway and add a corresponding entry in GatewayStatus.Addresses.
|
||||
\n Support: Core"
|
||||
items:
|
||||
description: GatewayAddress describes an address that can be bound
|
||||
to a Gateway.
|
||||
properties:
|
||||
type:
|
||||
default: IPAddress
|
||||
description: Type of the address.
|
||||
enum:
|
||||
- IPAddress
|
||||
- Hostname
|
||||
- NamedAddress
|
||||
type: string
|
||||
value:
|
||||
description: "Value of the address. The validity of the values
|
||||
will depend on the type and support by the controller. \n
|
||||
Examples: `1.2.3.4`, `128::1`, `my-ip-address`."
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
required:
|
||||
- value
|
||||
type: object
|
||||
maxItems: 16
|
||||
type: array
|
||||
gatewayClassName:
|
||||
description: GatewayClassName used for this Gateway. This is the name
|
||||
of a GatewayClass resource.
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
listeners:
|
||||
description: "Listeners associated with this Gateway. Listeners define
|
||||
logical endpoints that are bound on this Gateway's addresses. At
|
||||
least one Listener MUST be specified. \n Each listener in a Gateway
|
||||
must have a unique combination of Hostname, Port, and Protocol.
|
||||
\n An implementation MAY group Listeners by Port and then collapse
|
||||
each group of Listeners into a single Listener if the implementation
|
||||
determines that the Listeners in the group are \"compatible\". An
|
||||
implementation MAY also group together and collapse compatible Listeners
|
||||
belonging to different Gateways. \n For example, an implementation
|
||||
might consider Listeners to be compatible with each other if all
|
||||
of the following conditions are met: \n 1. Either each Listener
|
||||
within the group specifies the \"HTTP\" Protocol or each Listener
|
||||
within the group specifies either the \"HTTPS\" or \"TLS\" Protocol.
|
||||
\n 2. Each Listener within the group specifies a Hostname that is
|
||||
unique within the group. \n 3. As a special case, one Listener
|
||||
within a group may omit Hostname, in which case this Listener
|
||||
matches when no other Listener matches. \n If the implementation
|
||||
does collapse compatible Listeners, the hostname provided in the
|
||||
incoming client request MUST be matched to a Listener to find the
|
||||
correct set of Routes. The incoming hostname MUST be matched using
|
||||
the Hostname field for each Listener in order of most to least specific.
|
||||
That is, exact matches must be processed before wildcard matches.
|
||||
\n If this field specifies multiple Listeners that have the same
|
||||
Port value but are not compatible, the implementation must raise
|
||||
a \"Conflicted\" condition in the Listener status. \n Support: Core"
|
||||
items:
|
||||
description: Listener embodies the concept of a logical endpoint
|
||||
where a Gateway accepts network connections.
|
||||
properties:
|
||||
allowedRoutes:
|
||||
default:
|
||||
namespaces:
|
||||
from: Same
|
||||
description: "AllowedRoutes defines the types of routes that
|
||||
MAY be attached to a Listener and the trusted namespaces where
|
||||
those Route resources MAY be present. \n Although a client
|
||||
request may match multiple route rules, only one rule may
|
||||
ultimately receive the request. Matching precedence MUST be
|
||||
determined in order of the following criteria: \n * The most
|
||||
specific match as defined by the Route type. * The oldest
|
||||
Route based on creation timestamp. For example, a Route with
|
||||
\ a creation timestamp of \"2020-09-08 01:02:03\" is given
|
||||
precedence over a Route with a creation timestamp of \"2020-09-08
|
||||
01:02:04\". * If everything else is equivalent, the Route
|
||||
appearing first in alphabetical order (namespace/name) should
|
||||
be given precedence. For example, foo/bar is given precedence
|
||||
over foo/baz. \n All valid rules within a Route attached to
|
||||
this Listener should be implemented. Invalid Route rules can
|
||||
be ignored (sometimes that will mean the full Route). If a
|
||||
Route rule transitions from valid to invalid, support for
|
||||
that Route rule should be dropped to ensure consistency. For
|
||||
example, even if a filter specified by a Route rule is invalid,
|
||||
the rest of the rules within that Route should still be supported.
|
||||
\n Support: Core"
|
||||
properties:
|
||||
kinds:
|
||||
description: "Kinds specifies the groups and kinds of Routes
|
||||
that are allowed to bind to this Gateway Listener. When
|
||||
unspecified or empty, the kinds of Routes selected are
|
||||
determined using the Listener protocol. \n A RouteGroupKind
|
||||
MUST correspond to kinds of Routes that are compatible
|
||||
with the application protocol specified in the Listener's
|
||||
Protocol field. If an implementation does not support
|
||||
or recognize this resource type, it MUST set the \"ResolvedRefs\"
|
||||
condition to False for this Listener with the \"InvalidRoutesRef\"
|
||||
reason. \n Support: Core"
|
||||
items:
|
||||
description: RouteGroupKind indicates the group and kind
|
||||
of a Route resource.
|
||||
properties:
|
||||
group:
|
||||
default: gateway.networking.k8s.io
|
||||
description: Group is the group of the Route.
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the kind of the Route.
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
type: object
|
||||
maxItems: 8
|
||||
type: array
|
||||
namespaces:
|
||||
default:
|
||||
from: Same
|
||||
description: "Namespaces indicates namespaces from which
|
||||
Routes may be attached to this Listener. This is restricted
|
||||
to the namespace of this Gateway by default. \n Support:
|
||||
Core"
|
||||
properties:
|
||||
from:
|
||||
default: Same
|
||||
description: "From indicates where Routes will be selected
|
||||
for this Gateway. Possible values are: * All: Routes
|
||||
in all namespaces may be used by this Gateway. * Selector:
|
||||
Routes in namespaces selected by the selector may
|
||||
be used by this Gateway. * Same: Only Routes in
|
||||
the same namespace may be used by this Gateway. \n
|
||||
Support: Core"
|
||||
enum:
|
||||
- All
|
||||
- Selector
|
||||
- Same
|
||||
type: string
|
||||
selector:
|
||||
description: "Selector must be specified when From is
|
||||
set to \"Selector\". In that case, only Routes in
|
||||
Namespaces matching this Selector will be selected
|
||||
by this Gateway. This field is ignored for other values
|
||||
of \"From\". \n Support: Core"
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a
|
||||
selector that contains values, a key, and an
|
||||
operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the
|
||||
selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship
|
||||
to a set of values. Valid operators are
|
||||
In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist, the
|
||||
values array must be empty. This array is
|
||||
replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In",
|
||||
and the values array contains only "value". The
|
||||
requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
hostname:
|
||||
description: "Hostname specifies the virtual hostname to match
|
||||
for protocol types that define this concept. When unspecified,
|
||||
all hostnames are matched. This field is ignored for protocols
|
||||
that don't require hostname based matching. \n Implementations
|
||||
MUST apply Hostname matching appropriately for each of the
|
||||
following protocols: \n * TLS: The Listener Hostname MUST
|
||||
match the SNI. * HTTP: The Listener Hostname MUST match the
|
||||
Host header of the request. * HTTPS: The Listener Hostname
|
||||
SHOULD match at both the TLS and HTTP protocol layers as
|
||||
described above. If an implementation does not ensure that
|
||||
both the SNI and Host header match the Listener hostname,
|
||||
\ it MUST clearly document that. \n For HTTPRoute and TLSRoute
|
||||
resources, there is an interaction with the `spec.hostnames`
|
||||
array. When both listener and route specify hostnames, there
|
||||
MUST be an intersection between the values for a Route to
|
||||
be accepted. For more information, refer to the Route specific
|
||||
Hostnames documentation. \n Support: Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
name:
|
||||
description: "Name is the name of the Listener. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
port:
|
||||
description: "Port is the network port. Multiple listeners may
|
||||
use the same port, subject to the Listener compatibility rules.
|
||||
\n Support: Core"
|
||||
format: int32
|
||||
maximum: 65535
|
||||
minimum: 1
|
||||
type: integer
|
||||
protocol:
|
||||
description: "Protocol specifies the network protocol this listener
|
||||
expects to receive. \n Support: Core"
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z0-9]([-a-zSA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9]+$
|
||||
type: string
|
||||
tls:
|
||||
description: "TLS is the TLS configuration for the Listener.
|
||||
This field is required if the Protocol field is \"HTTPS\"
|
||||
or \"TLS\". It is invalid to set this field if the Protocol
|
||||
field is \"HTTP\", \"TCP\", or \"UDP\". \n The association
|
||||
of SNIs to Certificate defined in GatewayTLSConfig is defined
|
||||
based on the Hostname field for this listener. \n The GatewayClass
|
||||
MUST use the longest matching SNI out of all available certificates
|
||||
for any TLS handshake. \n Support: Core"
|
||||
properties:
|
||||
certificateRefs:
|
||||
description: "CertificateRefs contains a series of references
|
||||
to Kubernetes objects that contains TLS certificates and
|
||||
private keys. These certificates are used to establish
|
||||
a TLS handshake for requests that match the hostname of
|
||||
the associated listener. \n A single CertificateRef to
|
||||
a Kubernetes Secret has \"Core\" support. Implementations
|
||||
MAY choose to support attaching multiple certificates
|
||||
to a Listener, but this behavior is implementation-specific.
|
||||
\n References to a resource in different namespace are
|
||||
invalid UNLESS there is a ReferencePolicy in the target
|
||||
namespace that allows the certificate to be attached.
|
||||
If a ReferencePolicy does not allow this reference, the
|
||||
\"ResolvedRefs\" condition MUST be set to False for this
|
||||
listener with the \"InvalidCertificateRef\" reason. \n
|
||||
This field is required to have at least one element when
|
||||
the mode is set to \"Terminate\" (default) and is optional
|
||||
otherwise. \n CertificateRefs can reference to standard
|
||||
Kubernetes resources, i.e. Secret, or implementation-specific
|
||||
custom resources. \n Support: Core - A single reference
|
||||
to a Kubernetes Secret \n Support: Implementation-specific
|
||||
(More than one reference or other resource types)"
|
||||
items:
|
||||
description: "SecretObjectReference identifies an API
|
||||
object including its namespace, defaulting to Secret.
|
||||
\n The API object must be valid in the cluster; the
|
||||
Group and Kind must be registered in the cluster for
|
||||
this reference to be valid. \n References to objects
|
||||
with invalid Group and Kind are not valid, and must
|
||||
be rejected by the implementation, with appropriate
|
||||
Conditions set on the containing object."
|
||||
properties:
|
||||
group:
|
||||
default: ""
|
||||
description: Group is the group of the referent. For
|
||||
example, "networking.k8s.io". When unspecified (empty
|
||||
string), core API group is inferred.
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Secret
|
||||
description: Kind is kind of the referent. For example
|
||||
"HTTPRoute" or "Service".
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of the referent.
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the backend.
|
||||
When unspecified, the local namespace is inferred.
|
||||
\n Note that when a namespace is specified, a ReferencePolicy
|
||||
object is required in the referent namespace to
|
||||
allow that namespace's owner to accept the reference.
|
||||
See the ReferencePolicy documentation for details.
|
||||
\n Support: Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
maxItems: 64
|
||||
type: array
|
||||
mode:
|
||||
default: Terminate
|
||||
description: "Mode defines the TLS behavior for the TLS
|
||||
session initiated by the client. There are two possible
|
||||
modes: \n - Terminate: The TLS session between the downstream
|
||||
client and the Gateway is terminated at the Gateway.
|
||||
This mode requires certificateRefs to be set and contain
|
||||
at least one element. - Passthrough: The TLS session is
|
||||
NOT terminated by the Gateway. This implies that the
|
||||
Gateway can't decipher the TLS stream except for the
|
||||
ClientHello message of the TLS protocol. CertificateRefs
|
||||
field is ignored in this mode. \n Support: Core"
|
||||
enum:
|
||||
- Terminate
|
||||
- Passthrough
|
||||
type: string
|
||||
options:
|
||||
additionalProperties:
|
||||
description: AnnotationValue is the value of an annotation
|
||||
in Gateway API. This is used for validation of maps
|
||||
such as TLS options. This roughly matches Kubernetes
|
||||
annotation validation, although the length validation
|
||||
in that case is based on the entire size of the annotations
|
||||
struct.
|
||||
maxLength: 4096
|
||||
minLength: 0
|
||||
type: string
|
||||
description: "Options are a list of key/value pairs to enable
|
||||
extended TLS configuration for each implementation. For
|
||||
example, configuring the minimum TLS version or supported
|
||||
cipher suites. \n A set of common keys MAY be defined
|
||||
by the API in the future. To avoid any ambiguity, implementation-specific
|
||||
definitions MUST use domain-prefixed names, such as `example.com/my-custom-option`.
|
||||
Un-prefixed names are reserved for key names defined by
|
||||
Gateway API. \n Support: Implementation-specific"
|
||||
maxProperties: 16
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- port
|
||||
- protocol
|
||||
type: object
|
||||
maxItems: 64
|
||||
minItems: 1
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- name
|
||||
x-kubernetes-list-type: map
|
||||
required:
|
||||
- gatewayClassName
|
||||
- listeners
|
||||
type: object
|
||||
status:
|
||||
default:
|
||||
conditions:
|
||||
- lastTransitionTime: "1970-01-01T00:00:00Z"
|
||||
message: Waiting for controller
|
||||
reason: NotReconciled
|
||||
status: Unknown
|
||||
type: Scheduled
|
||||
description: Status defines the current state of Gateway.
|
||||
properties:
|
||||
addresses:
|
||||
description: Addresses lists the IP addresses that have actually been
|
||||
bound to the Gateway. These addresses may differ from the addresses
|
||||
in the Spec, e.g. if the Gateway automatically assigns an address
|
||||
from a reserved pool.
|
||||
items:
|
||||
description: GatewayAddress describes an address that can be bound
|
||||
to a Gateway.
|
||||
properties:
|
||||
type:
|
||||
default: IPAddress
|
||||
description: Type of the address.
|
||||
enum:
|
||||
- IPAddress
|
||||
- Hostname
|
||||
- NamedAddress
|
||||
type: string
|
||||
value:
|
||||
description: "Value of the address. The validity of the values
|
||||
will depend on the type and support by the controller. \n
|
||||
Examples: `1.2.3.4`, `128::1`, `my-ip-address`."
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
required:
|
||||
- value
|
||||
type: object
|
||||
maxItems: 16
|
||||
type: array
|
||||
conditions:
|
||||
default:
|
||||
- lastTransitionTime: "1970-01-01T00:00:00Z"
|
||||
message: Waiting for controller
|
||||
reason: NotReconciled
|
||||
status: Unknown
|
||||
type: Scheduled
|
||||
description: "Conditions describe the current conditions of the Gateway.
|
||||
\n Implementations should prefer to express Gateway conditions using
|
||||
the `GatewayConditionType` and `GatewayConditionReason` constants
|
||||
so that operators and tools can converge on a common vocabulary
|
||||
to describe Gateway state. \n Known condition types are: \n * \"Scheduled\"
|
||||
* \"Ready\""
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource. --- This struct is intended for direct
|
||||
use as an array at the field path .status.conditions. For example,
|
||||
type FooStatus struct{ // Represents the observations of a
|
||||
foo's current state. // Known .status.conditions.type are:
|
||||
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
|
||||
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
|
||||
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
|
||||
\n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should be when
|
||||
the underlying condition changed. If that is not known, then
|
||||
using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance, if .metadata.generation
|
||||
is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the current
|
||||
state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier indicating
|
||||
the reason for the condition's last transition. Producers
|
||||
of specific condition types may define expected values and
|
||||
meanings for this field, and whether the values are considered
|
||||
a guaranteed API. The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across resources
|
||||
like Available, but because arbitrary conditions can be useful
|
||||
(see .node.status.conditions), the ability to deconflict is
|
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
maxItems: 8
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
listeners:
|
||||
description: Listeners provide status for each unique listener port
|
||||
defined in the Spec.
|
||||
items:
|
||||
description: ListenerStatus is the status associated with a Listener.
|
||||
properties:
|
||||
attachedRoutes:
|
||||
description: AttachedRoutes represents the total number of Routes
|
||||
that have been successfully attached to this Listener.
|
||||
format: int32
|
||||
type: integer
|
||||
conditions:
|
||||
description: Conditions describe the current condition of this
|
||||
listener.
|
||||
items:
|
||||
description: "Condition contains details for one aspect of
|
||||
the current state of this API Resource. --- This struct
|
||||
is intended for direct use as an array at the field path
|
||||
.status.conditions. For example, type FooStatus struct{
|
||||
\ // Represents the observations of a foo's current state.
|
||||
\ // Known .status.conditions.type are: \"Available\",
|
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type
|
||||
\ // +patchStrategy=merge // +listType=map //
|
||||
+listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
|
||||
\n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should
|
||||
be when the underlying condition changed. If that is
|
||||
not known, then using the time when the API field changed
|
||||
is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance,
|
||||
if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the
|
||||
current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. The value should
|
||||
be a CamelCase string. This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across
|
||||
resources like Available, but because arbitrary conditions
|
||||
can be useful (see .node.status.conditions), the ability
|
||||
to deconflict is important. The regex it matches is
|
||||
(dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
maxItems: 8
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
name:
|
||||
description: Name is the name of the Listener that this status
|
||||
corresponds to.
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
supportedKinds:
|
||||
description: "SupportedKinds is the list indicating the Kinds
|
||||
supported by this listener. This MUST represent the kinds
|
||||
an implementation supports for that Listener configuration.
|
||||
\n If kinds are specified in Spec that are not supported,
|
||||
they MUST NOT appear in this list and an implementation MUST
|
||||
set the \"ResolvedRefs\" condition to \"False\" with the \"InvalidRouteKinds\"
|
||||
reason. If both valid and invalid Route kinds are specified,
|
||||
the implementation MUST reference the valid Route kinds that
|
||||
have been specified."
|
||||
items:
|
||||
description: RouteGroupKind indicates the group and kind of
|
||||
a Route resource.
|
||||
properties:
|
||||
group:
|
||||
default: gateway.networking.k8s.io
|
||||
description: Group is the group of the Route.
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the kind of the Route.
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
type: object
|
||||
maxItems: 8
|
||||
type: array
|
||||
required:
|
||||
- attachedRoutes
|
||||
- conditions
|
||||
- name
|
||||
- supportedKinds
|
||||
type: object
|
||||
maxItems: 64
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- name
|
||||
x-kubernetes-list-type: map
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,431 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/891
|
||||
creationTimestamp: null
|
||||
name: tcproutes.gateway.networking.k8s.io
|
||||
spec:
|
||||
group: gateway.networking.k8s.io
|
||||
names:
|
||||
categories:
|
||||
- gateway-api
|
||||
kind: TCPRoute
|
||||
listKind: TCPRouteList
|
||||
plural: tcproutes
|
||||
singular: tcproute
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: TCPRoute provides a way to route TCP requests. When combined
|
||||
with a Gateway listener, it can be used to forward connections on the port
|
||||
specified by the listener to a set of backends specified by the TCPRoute.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: Spec defines the desired state of TCPRoute.
|
||||
properties:
|
||||
parentRefs:
|
||||
description: "ParentRefs references the resources (usually Gateways)
|
||||
that a Route wants to be attached to. Note that the referenced parent
|
||||
resource needs to allow this for the attachment to be complete.
|
||||
For Gateways, that means the Gateway needs to allow attachment from
|
||||
Routes of this kind and namespace. \n The only kind of parent resource
|
||||
with \"Core\" support is Gateway. This API may be extended in the
|
||||
future to support additional kinds of parent resources such as one
|
||||
of the route kinds. \n It is invalid to reference an identical parent
|
||||
more than once. It is valid to reference multiple distinct sections
|
||||
within the same parent resource, such as 2 Listeners within a Gateway.
|
||||
\n It is possible to separately reference multiple distinct objects
|
||||
that may be collapsed by an implementation. For example, some implementations
|
||||
may choose to merge compatible Gateway Listeners together. If that
|
||||
is the case, the list of routes attached to those resources should
|
||||
also be merged."
|
||||
items:
|
||||
description: "ParentRef identifies an API object (usually a Gateway)
|
||||
that can be considered a parent of this resource (usually a route).
|
||||
The only kind of parent resource with \"Core\" support is Gateway.
|
||||
This API may be extended in the future to support additional kinds
|
||||
of parent resources, such as HTTPRoute. \n The API object must
|
||||
be valid in the cluster; the Group and Kind must be registered
|
||||
in the cluster for this reference to be valid. \n References to
|
||||
objects with invalid Group and Kind are not valid, and must be
|
||||
rejected by the implementation, with appropriate Conditions set
|
||||
on the containing object."
|
||||
properties:
|
||||
group:
|
||||
default: gateway.networking.k8s.io
|
||||
description: "Group is the group of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Gateway
|
||||
description: "Kind is kind of the referent. \n Support: Core
|
||||
(Gateway) Support: Custom (Other Resources)"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: "Name is the name of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the referent. When
|
||||
unspecified (or empty string), this refers to the local namespace
|
||||
of the Route. \n Support: Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
sectionName:
|
||||
description: "SectionName is the name of a section within the
|
||||
target resource. In the following resources, SectionName is
|
||||
interpreted as the following: \n * Gateway: Listener Name
|
||||
\n Implementations MAY choose to support attaching Routes
|
||||
to other resources. If that is the case, they MUST clearly
|
||||
document how SectionName is interpreted. \n When unspecified
|
||||
(empty string), this will reference the entire resource. For
|
||||
the purpose of status, an attachment is considered successful
|
||||
if at least one section in the parent resource accepts it.
|
||||
For example, Gateway listeners can restrict which Routes can
|
||||
attach to them by Route kind, namespace, or hostname. If 1
|
||||
of 2 Gateway listeners accept attachment from the referencing
|
||||
Route, the Route MUST be considered successfully attached.
|
||||
If no Gateway listeners accept attachment from this Route,
|
||||
the Route MUST be considered detached from the Gateway. \n
|
||||
Support: Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
maxItems: 32
|
||||
type: array
|
||||
rules:
|
||||
description: Rules are a list of TCP matchers and actions.
|
||||
items:
|
||||
description: TCPRouteRule is the configuration for a given rule.
|
||||
properties:
|
||||
backendRefs:
|
||||
description: "BackendRefs defines the backend(s) where matching
|
||||
requests should be sent. If unspecified or invalid (refers
|
||||
to a non-existent resource or a Service with no endpoints),
|
||||
the underlying implementation MUST actively reject connection
|
||||
attempts to this backend. Connection rejections must respect
|
||||
weight; if an invalid backend is requested to have 80% of
|
||||
connections, then 80% of connections must be rejected instead.
|
||||
\n Support: Core for Kubernetes Service Support: Custom for
|
||||
any other resource \n Support for weight: Extended"
|
||||
items:
|
||||
description: "BackendRef defines how a Route should forward
|
||||
a request to a Kubernetes resource. \n Note that when a
|
||||
namespace is specified, a ReferencePolicy object is required
|
||||
in the referent namespace to allow that namespace's owner
|
||||
to accept the reference. See the ReferencePolicy documentation
|
||||
for details."
|
||||
properties:
|
||||
group:
|
||||
default: ""
|
||||
description: Group is the group of the referent. For example,
|
||||
"networking.k8s.io". When unspecified (empty string),
|
||||
core API group is inferred.
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Service
|
||||
description: Kind is kind of the referent. For example
|
||||
"HTTPRoute" or "Service".
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of the referent.
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the backend.
|
||||
When unspecified, the local namespace is inferred. \n
|
||||
Note that when a namespace is specified, a ReferencePolicy
|
||||
object is required in the referent namespace to allow
|
||||
that namespace's owner to accept the reference. See
|
||||
the ReferencePolicy documentation for details. \n Support:
|
||||
Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
port:
|
||||
description: Port specifies the destination port number
|
||||
to use for this resource. Port is required when the
|
||||
referent is a Kubernetes Service. For other resources,
|
||||
destination port might be derived from the referent
|
||||
resource or this field.
|
||||
format: int32
|
||||
maximum: 65535
|
||||
minimum: 1
|
||||
type: integer
|
||||
weight:
|
||||
default: 1
|
||||
description: "Weight specifies the proportion of requests
|
||||
forwarded to the referenced backend. This is computed
|
||||
as weight/(sum of all weights in this BackendRefs list).
|
||||
For non-zero values, there may be some epsilon from
|
||||
the exact proportion defined here depending on the precision
|
||||
an implementation supports. Weight is not a percentage
|
||||
and the sum of weights does not need to equal 100. \n
|
||||
If only one backend is specified and it has a weight
|
||||
greater than 0, 100% of the traffic is forwarded to
|
||||
that backend. If weight is set to 0, no traffic should
|
||||
be forwarded for this entry. If unspecified, weight
|
||||
defaults to 1. \n Support for this field varies based
|
||||
on the context where used."
|
||||
format: int32
|
||||
maximum: 1000000
|
||||
minimum: 0
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
maxItems: 16
|
||||
minItems: 1
|
||||
type: array
|
||||
type: object
|
||||
maxItems: 16
|
||||
minItems: 1
|
||||
type: array
|
||||
required:
|
||||
- rules
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the current state of TCPRoute.
|
||||
properties:
|
||||
parents:
|
||||
description: "Parents is a list of parent resources (usually Gateways)
|
||||
that are associated with the route, and the status of the route
|
||||
with respect to each parent. When this route attaches to a parent,
|
||||
the controller that manages the parent must add an entry to this
|
||||
list when the controller first sees the route and should update
|
||||
the entry as appropriate when the route or gateway is modified.
|
||||
\n Note that parent references that cannot be resolved by an implementation
|
||||
of this API will not be added to this list. Implementations of this
|
||||
API can only populate Route status for the Gateways/parent resources
|
||||
they are responsible for. \n A maximum of 32 Gateways will be represented
|
||||
in this list. An empty list means the route has not been attached
|
||||
to any Gateway."
|
||||
items:
|
||||
description: RouteParentStatus describes the status of a route with
|
||||
respect to an associated Parent.
|
||||
properties:
|
||||
conditions:
|
||||
description: "Conditions describes the status of the route with
|
||||
respect to the Gateway. Note that the route's availability
|
||||
is also subject to the Gateway's own status conditions and
|
||||
listener status. \n If the Route's ParentRef specifies an
|
||||
existing Gateway that supports Routes of this kind AND that
|
||||
Gateway's controller has sufficient access, then that Gateway's
|
||||
controller MUST set the \"Accepted\" condition on the Route,
|
||||
to indicate whether the route has been accepted or rejected
|
||||
by the Gateway, and why. \n A Route MUST be considered \"Accepted\"
|
||||
if at least one of the Route's rules is implemented by the
|
||||
Gateway. \n There are a number of cases where the \"Accepted\"
|
||||
condition may not be set due to lack of controller visibility,
|
||||
that includes when: \n * The Route refers to a non-existent
|
||||
parent. * The Route is of a type that the controller does
|
||||
not support. * The Route is in a namespace the the controller
|
||||
does not have access to."
|
||||
items:
|
||||
description: "Condition contains details for one aspect of
|
||||
the current state of this API Resource. --- This struct
|
||||
is intended for direct use as an array at the field path
|
||||
.status.conditions. For example, type FooStatus struct{
|
||||
\ // Represents the observations of a foo's current state.
|
||||
\ // Known .status.conditions.type are: \"Available\",
|
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type
|
||||
\ // +patchStrategy=merge // +listType=map //
|
||||
+listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
|
||||
\n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should
|
||||
be when the underlying condition changed. If that is
|
||||
not known, then using the time when the API field changed
|
||||
is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance,
|
||||
if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the
|
||||
current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. The value should
|
||||
be a CamelCase string. This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across
|
||||
resources like Available, but because arbitrary conditions
|
||||
can be useful (see .node.status.conditions), the ability
|
||||
to deconflict is important. The regex it matches is
|
||||
(dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
maxItems: 8
|
||||
minItems: 1
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
controllerName:
|
||||
description: "ControllerName is a domain/path string that indicates
|
||||
the name of the controller that wrote this status. This corresponds
|
||||
with the controllerName field on GatewayClass. \n Example:
|
||||
\"example.net/gateway-controller\". \n The format of this
|
||||
field is DOMAIN \"/\" PATH, where DOMAIN and PATH are valid
|
||||
Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)."
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
|
||||
type: string
|
||||
parentRef:
|
||||
description: ParentRef corresponds with a ParentRef in the spec
|
||||
that this RouteParentStatus struct describes the status of.
|
||||
properties:
|
||||
group:
|
||||
default: gateway.networking.k8s.io
|
||||
description: "Group is the group of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Gateway
|
||||
description: "Kind is kind of the referent. \n Support:
|
||||
Core (Gateway) Support: Custom (Other Resources)"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: "Name is the name of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the referent.
|
||||
When unspecified (or empty string), this refers to the
|
||||
local namespace of the Route. \n Support: Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
sectionName:
|
||||
description: "SectionName is the name of a section within
|
||||
the target resource. In the following resources, SectionName
|
||||
is interpreted as the following: \n * Gateway: Listener
|
||||
Name \n Implementations MAY choose to support attaching
|
||||
Routes to other resources. If that is the case, they MUST
|
||||
clearly document how SectionName is interpreted. \n When
|
||||
unspecified (empty string), this will reference the entire
|
||||
resource. For the purpose of status, an attachment is
|
||||
considered successful if at least one section in the parent
|
||||
resource accepts it. For example, Gateway listeners can
|
||||
restrict which Routes can attach to them by Route kind,
|
||||
namespace, or hostname. If 1 of 2 Gateway listeners accept
|
||||
attachment from the referencing Route, the Route MUST
|
||||
be considered successfully attached. If no Gateway listeners
|
||||
accept attachment from this Route, the Route MUST be considered
|
||||
detached from the Gateway. \n Support: Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- controllerName
|
||||
- parentRef
|
||||
type: object
|
||||
maxItems: 32
|
||||
type: array
|
||||
required:
|
||||
- parents
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
@@ -0,0 +1,480 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/891
|
||||
creationTimestamp: null
|
||||
name: tlsroutes.gateway.networking.k8s.io
|
||||
spec:
|
||||
group: gateway.networking.k8s.io
|
||||
names:
|
||||
categories:
|
||||
- gateway-api
|
||||
kind: TLSRoute
|
||||
listKind: TLSRouteList
|
||||
plural: tlsroutes
|
||||
singular: tlsroute
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: "The TLSRoute resource is similar to TCPRoute, but can be configured
|
||||
to match against TLS-specific metadata. This allows more flexibility in
|
||||
matching streams for a given TLS listener. \n If you need to forward traffic
|
||||
to a single target for a TLS listener, you could choose to use a TCPRoute
|
||||
with a TLS listener."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: Spec defines the desired state of TLSRoute.
|
||||
properties:
|
||||
hostnames:
|
||||
description: "Hostnames defines a set of SNI names that should match
|
||||
against the SNI attribute of TLS ClientHello message in TLS handshake.
|
||||
This matches the RFC 1123 definition of a hostname with 2 notable
|
||||
exceptions: \n 1. IPs are not allowed in SNI names per RFC 6066.
|
||||
2. A hostname may be prefixed with a wildcard label (`*.`). The
|
||||
wildcard label must appear by itself as the first label. \n If
|
||||
a hostname is specified by both the Listener and TLSRoute, there
|
||||
must be at least one intersecting hostname for the TLSRoute to be
|
||||
attached to the Listener. For example: \n * A Listener with `test.example.com`
|
||||
as the hostname matches TLSRoutes that have either not specified
|
||||
any hostnames, or have specified at least one of `test.example.com`
|
||||
or `*.example.com`. * A Listener with `*.example.com` as the hostname
|
||||
matches TLSRoutes that have either not specified any hostnames
|
||||
or have specified at least one hostname that matches the Listener
|
||||
hostname. For example, `test.example.com` and `*.example.com`
|
||||
would both match. On the other hand, `example.com` and `test.example.net`
|
||||
would not match. \n If both the Listener and TLSRoute have specified
|
||||
hostnames, any TLSRoute hostnames that do not match the Listener
|
||||
hostname MUST be ignored. For example, if a Listener specified `*.example.com`,
|
||||
and the TLSRoute specified `test.example.com` and `test.example.net`,
|
||||
`test.example.net` must not be considered for a match. \n If both
|
||||
the Listener and TLSRoute have specified hostnames, and none match
|
||||
with the criteria above, then the TLSRoute is not accepted. The
|
||||
implementation must raise an 'Accepted' Condition with a status
|
||||
of `False` in the corresponding RouteParentStatus. \n Support: Core"
|
||||
items:
|
||||
description: "Hostname is the fully qualified domain name of a network
|
||||
host. This matches the RFC 1123 definition of a hostname with
|
||||
2 notable exceptions: \n 1. IPs are not allowed. 2. A hostname
|
||||
may be prefixed with a wildcard label (`*.`). The wildcard label
|
||||
must appear by itself as the first label. \n Hostname can be \"precise\"
|
||||
which is a domain name without the terminating dot of a network
|
||||
host (e.g. \"foo.example.com\") or \"wildcard\", which is a domain
|
||||
name prefixed with a single wildcard label (e.g. `*.example.com`).
|
||||
\n Note that as per RFC1035 and RFC1123, a *label* must consist
|
||||
of lower case alphanumeric characters or '-', and must start and
|
||||
end with an alphanumeric character. No other punctuation is allowed."
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
maxItems: 16
|
||||
type: array
|
||||
parentRefs:
|
||||
description: "ParentRefs references the resources (usually Gateways)
|
||||
that a Route wants to be attached to. Note that the referenced parent
|
||||
resource needs to allow this for the attachment to be complete.
|
||||
For Gateways, that means the Gateway needs to allow attachment from
|
||||
Routes of this kind and namespace. \n The only kind of parent resource
|
||||
with \"Core\" support is Gateway. This API may be extended in the
|
||||
future to support additional kinds of parent resources such as one
|
||||
of the route kinds. \n It is invalid to reference an identical parent
|
||||
more than once. It is valid to reference multiple distinct sections
|
||||
within the same parent resource, such as 2 Listeners within a Gateway.
|
||||
\n It is possible to separately reference multiple distinct objects
|
||||
that may be collapsed by an implementation. For example, some implementations
|
||||
may choose to merge compatible Gateway Listeners together. If that
|
||||
is the case, the list of routes attached to those resources should
|
||||
also be merged."
|
||||
items:
|
||||
description: "ParentRef identifies an API object (usually a Gateway)
|
||||
that can be considered a parent of this resource (usually a route).
|
||||
The only kind of parent resource with \"Core\" support is Gateway.
|
||||
This API may be extended in the future to support additional kinds
|
||||
of parent resources, such as HTTPRoute. \n The API object must
|
||||
be valid in the cluster; the Group and Kind must be registered
|
||||
in the cluster for this reference to be valid. \n References to
|
||||
objects with invalid Group and Kind are not valid, and must be
|
||||
rejected by the implementation, with appropriate Conditions set
|
||||
on the containing object."
|
||||
properties:
|
||||
group:
|
||||
default: gateway.networking.k8s.io
|
||||
description: "Group is the group of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Gateway
|
||||
description: "Kind is kind of the referent. \n Support: Core
|
||||
(Gateway) Support: Custom (Other Resources)"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: "Name is the name of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the referent. When
|
||||
unspecified (or empty string), this refers to the local namespace
|
||||
of the Route. \n Support: Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
sectionName:
|
||||
description: "SectionName is the name of a section within the
|
||||
target resource. In the following resources, SectionName is
|
||||
interpreted as the following: \n * Gateway: Listener Name
|
||||
\n Implementations MAY choose to support attaching Routes
|
||||
to other resources. If that is the case, they MUST clearly
|
||||
document how SectionName is interpreted. \n When unspecified
|
||||
(empty string), this will reference the entire resource. For
|
||||
the purpose of status, an attachment is considered successful
|
||||
if at least one section in the parent resource accepts it.
|
||||
For example, Gateway listeners can restrict which Routes can
|
||||
attach to them by Route kind, namespace, or hostname. If 1
|
||||
of 2 Gateway listeners accept attachment from the referencing
|
||||
Route, the Route MUST be considered successfully attached.
|
||||
If no Gateway listeners accept attachment from this Route,
|
||||
the Route MUST be considered detached from the Gateway. \n
|
||||
Support: Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
maxItems: 32
|
||||
type: array
|
||||
rules:
|
||||
description: Rules are a list of TLS matchers and actions.
|
||||
items:
|
||||
description: TLSRouteRule is the configuration for a given rule.
|
||||
properties:
|
||||
backendRefs:
|
||||
description: "BackendRefs defines the backend(s) where matching
|
||||
requests should be sent. If unspecified or invalid (refers
|
||||
to a non-existent resource or a Service with no endpoints),
|
||||
the rule performs no forwarding; if no filters are specified
|
||||
that would result in a response being sent, the underlying
|
||||
implementation must actively reject request attempts to this
|
||||
backend, by rejecting the connection or returning a 503 status
|
||||
code. Request rejections must respect weight; if an invalid
|
||||
backend is requested to have 80% of requests, then 80% of
|
||||
requests must be rejected instead. \n Support: Core for Kubernetes
|
||||
Service Support: Custom for any other resource \n Support
|
||||
for weight: Extended"
|
||||
items:
|
||||
description: "BackendRef defines how a Route should forward
|
||||
a request to a Kubernetes resource. \n Note that when a
|
||||
namespace is specified, a ReferencePolicy object is required
|
||||
in the referent namespace to allow that namespace's owner
|
||||
to accept the reference. See the ReferencePolicy documentation
|
||||
for details."
|
||||
properties:
|
||||
group:
|
||||
default: ""
|
||||
description: Group is the group of the referent. For example,
|
||||
"networking.k8s.io". When unspecified (empty string),
|
||||
core API group is inferred.
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Service
|
||||
description: Kind is kind of the referent. For example
|
||||
"HTTPRoute" or "Service".
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of the referent.
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the backend.
|
||||
When unspecified, the local namespace is inferred. \n
|
||||
Note that when a namespace is specified, a ReferencePolicy
|
||||
object is required in the referent namespace to allow
|
||||
that namespace's owner to accept the reference. See
|
||||
the ReferencePolicy documentation for details. \n Support:
|
||||
Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
port:
|
||||
description: Port specifies the destination port number
|
||||
to use for this resource. Port is required when the
|
||||
referent is a Kubernetes Service. For other resources,
|
||||
destination port might be derived from the referent
|
||||
resource or this field.
|
||||
format: int32
|
||||
maximum: 65535
|
||||
minimum: 1
|
||||
type: integer
|
||||
weight:
|
||||
default: 1
|
||||
description: "Weight specifies the proportion of requests
|
||||
forwarded to the referenced backend. This is computed
|
||||
as weight/(sum of all weights in this BackendRefs list).
|
||||
For non-zero values, there may be some epsilon from
|
||||
the exact proportion defined here depending on the precision
|
||||
an implementation supports. Weight is not a percentage
|
||||
and the sum of weights does not need to equal 100. \n
|
||||
If only one backend is specified and it has a weight
|
||||
greater than 0, 100% of the traffic is forwarded to
|
||||
that backend. If weight is set to 0, no traffic should
|
||||
be forwarded for this entry. If unspecified, weight
|
||||
defaults to 1. \n Support for this field varies based
|
||||
on the context where used."
|
||||
format: int32
|
||||
maximum: 1000000
|
||||
minimum: 0
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
maxItems: 16
|
||||
minItems: 1
|
||||
type: array
|
||||
type: object
|
||||
maxItems: 16
|
||||
minItems: 1
|
||||
type: array
|
||||
required:
|
||||
- rules
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the current state of TLSRoute.
|
||||
properties:
|
||||
parents:
|
||||
description: "Parents is a list of parent resources (usually Gateways)
|
||||
that are associated with the route, and the status of the route
|
||||
with respect to each parent. When this route attaches to a parent,
|
||||
the controller that manages the parent must add an entry to this
|
||||
list when the controller first sees the route and should update
|
||||
the entry as appropriate when the route or gateway is modified.
|
||||
\n Note that parent references that cannot be resolved by an implementation
|
||||
of this API will not be added to this list. Implementations of this
|
||||
API can only populate Route status for the Gateways/parent resources
|
||||
they are responsible for. \n A maximum of 32 Gateways will be represented
|
||||
in this list. An empty list means the route has not been attached
|
||||
to any Gateway."
|
||||
items:
|
||||
description: RouteParentStatus describes the status of a route with
|
||||
respect to an associated Parent.
|
||||
properties:
|
||||
conditions:
|
||||
description: "Conditions describes the status of the route with
|
||||
respect to the Gateway. Note that the route's availability
|
||||
is also subject to the Gateway's own status conditions and
|
||||
listener status. \n If the Route's ParentRef specifies an
|
||||
existing Gateway that supports Routes of this kind AND that
|
||||
Gateway's controller has sufficient access, then that Gateway's
|
||||
controller MUST set the \"Accepted\" condition on the Route,
|
||||
to indicate whether the route has been accepted or rejected
|
||||
by the Gateway, and why. \n A Route MUST be considered \"Accepted\"
|
||||
if at least one of the Route's rules is implemented by the
|
||||
Gateway. \n There are a number of cases where the \"Accepted\"
|
||||
condition may not be set due to lack of controller visibility,
|
||||
that includes when: \n * The Route refers to a non-existent
|
||||
parent. * The Route is of a type that the controller does
|
||||
not support. * The Route is in a namespace the the controller
|
||||
does not have access to."
|
||||
items:
|
||||
description: "Condition contains details for one aspect of
|
||||
the current state of this API Resource. --- This struct
|
||||
is intended for direct use as an array at the field path
|
||||
.status.conditions. For example, type FooStatus struct{
|
||||
\ // Represents the observations of a foo's current state.
|
||||
\ // Known .status.conditions.type are: \"Available\",
|
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type
|
||||
\ // +patchStrategy=merge // +listType=map //
|
||||
+listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
|
||||
\n // other fields }"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another. This should
|
||||
be when the underlying condition changed. If that is
|
||||
not known, then using the time when the API field changed
|
||||
is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human readable message indicating
|
||||
details about the transition. This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: observedGeneration represents the .metadata.generation
|
||||
that the condition was set based upon. For instance,
|
||||
if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
|
||||
is 9, the condition is out of date with respect to the
|
||||
current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: reason contains a programmatic identifier
|
||||
indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected
|
||||
values and meanings for this field, and whether the
|
||||
values are considered a guaranteed API. The value should
|
||||
be a CamelCase string. This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False,
|
||||
Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
--- Many .condition.type values are consistent across
|
||||
resources like Available, but because arbitrary conditions
|
||||
can be useful (see .node.status.conditions), the ability
|
||||
to deconflict is important. The regex it matches is
|
||||
(dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
maxItems: 8
|
||||
minItems: 1
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
- type
|
||||
x-kubernetes-list-type: map
|
||||
controllerName:
|
||||
description: "ControllerName is a domain/path string that indicates
|
||||
the name of the controller that wrote this status. This corresponds
|
||||
with the controllerName field on GatewayClass. \n Example:
|
||||
\"example.net/gateway-controller\". \n The format of this
|
||||
field is DOMAIN \"/\" PATH, where DOMAIN and PATH are valid
|
||||
Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)."
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
|
||||
type: string
|
||||
parentRef:
|
||||
description: ParentRef corresponds with a ParentRef in the spec
|
||||
that this RouteParentStatus struct describes the status of.
|
||||
properties:
|
||||
group:
|
||||
default: gateway.networking.k8s.io
|
||||
description: "Group is the group of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
kind:
|
||||
default: Gateway
|
||||
description: "Kind is kind of the referent. \n Support:
|
||||
Core (Gateway) Support: Custom (Other Resources)"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
|
||||
type: string
|
||||
name:
|
||||
description: "Name is the name of the referent. \n Support:
|
||||
Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
type: string
|
||||
namespace:
|
||||
description: "Namespace is the namespace of the referent.
|
||||
When unspecified (or empty string), this refers to the
|
||||
local namespace of the Route. \n Support: Core"
|
||||
maxLength: 63
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
|
||||
type: string
|
||||
sectionName:
|
||||
description: "SectionName is the name of a section within
|
||||
the target resource. In the following resources, SectionName
|
||||
is interpreted as the following: \n * Gateway: Listener
|
||||
Name \n Implementations MAY choose to support attaching
|
||||
Routes to other resources. If that is the case, they MUST
|
||||
clearly document how SectionName is interpreted. \n When
|
||||
unspecified (empty string), this will reference the entire
|
||||
resource. For the purpose of status, an attachment is
|
||||
considered successful if at least one section in the parent
|
||||
resource accepts it. For example, Gateway listeners can
|
||||
restrict which Routes can attach to them by Route kind,
|
||||
namespace, or hostname. If 1 of 2 Gateway listeners accept
|
||||
attachment from the referencing Route, the Route MUST
|
||||
be considered successfully attached. If no Gateway listeners
|
||||
accept attachment from this Route, the Route MUST be considered
|
||||
detached from the Gateway. \n Support: Core"
|
||||
maxLength: 253
|
||||
minLength: 1
|
||||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- controllerName
|
||||
- parentRef
|
||||
type: object
|
||||
maxItems: 32
|
||||
type: array
|
||||
required:
|
||||
- parents
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
@@ -0,0 +1,9 @@
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_ingressroutes.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_ingressroutetcps.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_ingressrouteudps.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_middlewaretcps.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_serverstransports.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_tlsoptions.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_tlsstores.yaml"
|
||||
--8<-- "content/reference/dynamic-configuration/traefik.containo.us_traefikservices.yaml"
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user