Support YAML for the dynamic configuration.

This commit is contained in:
Ludovic Fernandez 2019-06-26 18:18:04 +02:00 committed by Traefiker Bot
parent 96962dd21f
commit e69d4cba88
36 changed files with 1529 additions and 289 deletions

View file

@ -1,8 +1,12 @@
# File Configuration Reference
Dynamic configuration with toml files
Dynamic configuration with files
{: .subtitle }
```toml
```toml tab="TOML"
--8<-- "content/reference/dynamic-configuration/file.toml"
```
```yml tab="YAML"
--8<-- "content/reference/dynamic-configuration/file.yaml"
```

View file

@ -0,0 +1,294 @@
http:
routers:
Router0:
entrypoints:
- foobar
- foobar
middlewares:
- foobar
- foobar
service: foobar
rule: foobar
priority: 42
tls:
options: TLS0
middlewares:
Middleware0:
addPrefix:
prefix: foobar
Middleware1:
stripPrefix:
prefixes:
- foobar
- foobar
Middleware2:
stripPrefixRegex:
regex:
- foobar
- foobar
Middleware3:
replacePath:
path: foobar
Middleware4:
replacePathRegex:
regex: foobar
replacement: foobar
Middleware5:
chain:
middlewares:
- foobar
- foobar
Middleware6:
ipWhiteList:
sourcerange:
- foobar
- foobar
ipstrategy: null
Middleware7:
ipWhiteList:
sourcerange: []
ipstrategy:
depth: 42
excludedips:
- foobar
- foobar
Middleware8:
headers:
customrequestheaders:
name0: foobar
name1: foobar
customresponseheaders:
name0: foobar
name1: foobar
accesscontrolallowcredentials: true
accesscontrolallowheaders:
- foobar
- foobar
accesscontrolallowmethods:
- foobar
- foobar
accesscontrolalloworigin: foobar
accesscontrolexposeheaders:
- foobar
- foobar
accesscontrolmaxage: 42
addvaryheader: true
allowedhosts:
- foobar
- foobar
hostsproxyheaders:
- foobar
- foobar
sslredirect: true
ssltemporaryredirect: true
sslhost: foobar
sslproxyheaders:
name0: foobar
name1: foobar
sslforcehost: true
stsseconds: 42
stsincludesubdomains: true
stspreload: true
forcestsheader: true
framedeny: true
customframeoptionsvalue: foobar
contenttypenosniff: true
browserxssfilter: true
custombrowserxssvalue: foobar
contentsecuritypolicy: foobar
publickey: foobar
referrerpolicy: foobar
isdevelopment: true
Middleware9:
errors:
status:
- foobar
- foobar
service: foobar
query: foobar
Middleware10:
rateLimit:
rateset:
Rate0:
period: 42000000000
average: 42
burst: 42
Rate1:
period: 42000000000
average: 42
burst: 42
extractorfunc: foobar
Middleware11:
redirectRegex:
regex: foobar
replacement: foobar
permanent: true
Middleware12:
redirectScheme:
scheme: foobar
port: foobar
permanent: true
Middleware13:
basicAuth:
users:
- foobar
- foobar
usersfile: foobar
realm: foobar
removeheader: true
headerfield: foobar
Middleware14:
digestAuth:
users:
- foobar
- foobar
usersfile: foobar
removeheader: true
realm: foobar
headerfield: foobar
Middleware15:
forwardAuth:
address: foobar
tls:
ca: foobar
caoptional: true
cert: foobar
key: foobar
insecureskipverify: true
trustforwardheader: true
authresponseheaders:
- foobar
- foobar
Middleware16:
maxConn:
amount: 42
extractorfunc: foobar
Middleware17:
buffering:
maxrequestbodybytes: 42
memrequestbodybytes: 42
maxresponsebodybytes: 42
memresponsebodybytes: 42
retryexpression: foobar
Middleware18:
circuitBreaker:
expression: foobar
Middleware19:
compress: {}
Middleware20:
passTLSClientCert:
pem: true
info:
notafter: true
notbefore: true
sans: true
subject:
country: true
province: true
locality: true
organization: true
commonname: true
serialnumber: true
domaincomponent: true
issuer:
country: true
province: true
locality: true
organization: true
commonname: true
serialnumber: true
domaincomponent: true
Middleware21:
retry:
attempts: 42
services:
Service0:
loadbalancer:
stickiness:
cookiename: foobar
securecookie: false
httponlycookie: false
servers:
- url: foobar
scheme: ""
port: ""
- url: foobar
scheme: ""
port: ""
healthcheck:
scheme: foobar
path: foobar
port: 42
interval: foobar
timeout: foobar
hostname: foobar
headers:
name0: foobar
name1: foobar
passhostheader: true
responseforwarding:
flushinterval: foobar
tcp:
routers:
TCPRouter0:
entrypoints:
- foobar
- foobar
service: foobar
rule: foobar
tls:
passthrough: true
options: TLS1
services:
TCPService0:
loadbalancer:
servers:
- address: foobar
port: ""
- address: foobar
port: ""
tls:
- stores:
- foobar
- foobar
certificate:
certfile: foobar
keyfile: foobar
- stores:
- foobar
- foobar
certificate:
certfile: foobar
keyfile: foobar
tlsoptions:
TLS0:
minversion: foobar
ciphersuites:
- foobar
- foobar
clientca:
files:
- foobar
- foobar
optional: true
snistrict: true
TLS1:
minversion: foobar
ciphersuites:
- foobar
- foobar
clientca:
files:
- foobar
- foobar
optional: true
snistrict: true
tlsstores:
Store0:
defaultcertificate:
certfile: foobar
keyfile: foobar
Store1:
defaultcertificate:
certfile: foobar
keyfile: foobar

View file

@ -1,7 +1,9 @@
# Static Configuration: File
## TOML
```toml
```toml tab="TOML"
--8<-- "content/reference/static-configuration/file.toml"
```
```yml tab="YAML"
--8<-- "content/reference/static-configuration/file.yaml"
```

View file

@ -133,16 +133,16 @@
[Metrics.Datadog]
Address = "foobar"
PushInterval = "foobar"
PushInterval = "10s"
[Metrics.StatsD]
Address = "foobar"
PushInterval = "foobar"
PushInterval = "10s"
[Metrics.InfluxDB]
Address = "foobar"
Protocol = "foobar"
PushInterval = "foobar"
PushInterval = "10s"
Database = "foobar"
RetentionPolicy = "foobar"
Username = "foobar"

View file

@ -0,0 +1,240 @@
global:
checknewversion: true
sendanonymoususage: true
serverstransport:
insecureskipverify: true
rootcas:
- foobar
- foobar
maxidleconnsperhost: 42
forwardingtimeouts:
dialtimeout: 42000000000
responseheadertimeout: 42000000000
entrypoints:
EntryPoint0:
address: foobar
transport:
lifecycle:
requestacceptgracetimeout: 42000000000
gracetimeout: 42000000000
respondingtimeouts:
readtimeout: 42000000000
writetimeout: 42000000000
idletimeout: 42000000000
proxyprotocol:
insecure: true
trustedips:
- foobar
- foobar
forwardedheaders:
insecure: true
trustedips:
- foobar
- foobar
providers:
providersthrottleduration: 42000000000
docker:
constraints: foobar
watch: true
endpoint: foobar
defaultrule: foobar
tls:
ca: foobar
caoptional: true
cert: foobar
key: foobar
insecureskipverify: true
exposedbydefault: true
usebindportip: true
swarmmode: true
network: foobar
swarmmoderefreshseconds: 42000000000
file:
directory: foobar
watch: true
filename: foobar
debugloggeneratedtemplate: true
traefikfile: foobar
marathon:
constraints: foobar
trace: true
watch: true
endpoint: foobar
defaultrule: foobar
exposedbydefault: true
dcostoken: foobar
tls:
ca: foobar
caoptional: true
cert: foobar
key: foobar
insecureskipverify: true
dialertimeout: 42000000000
responseheadertimeout: 42000000000
tlshandshaketimeout: 42000000000
keepalive: 42000000000
forcetaskhostname: true
basic:
httpbasicauthuser: foobar
httpbasicpassword: foobar
respectreadinesschecks: true
kubernetes:
endpoint: foobar
token: foobar
certauthfilepath: foobar
disablepasshostheaders: true
namespaces:
- foobar
- foobar
labelselector: foobar
ingressclass: foobar
ingressendpoint:
ip: foobar
hostname: foobar
publishedservice: foobar
kubernetescrd:
endpoint: foobar
token: foobar
certauthfilepath: foobar
disablepasshostheaders: true
namespaces:
- foobar
- foobar
labelselector: foobar
ingressclass: foobar
rest:
entrypoint: foobar
rancher:
constraints: foobar
watch: true
defaultrule: foobar
exposedbydefault: true
enableservicehealthfilter: true
refreshseconds: 42
intervalpoll: true
prefix: foobar
api:
entrypoint: foobar
dashboard: true
debug: false
statistics:
recenterrors: 42
middlewares:
- foobar
- foobar
dashboardassets: null
metrics:
prometheus:
buckets:
- 42
- 42
entrypoint: foobar
middlewares:
- foobar
- foobar
datadog:
address: foobar
pushinterval: 10000000000
statsd:
address: foobar
pushinterval: 10000000000
influxdb:
address: foobar
protocol: foobar
pushinterval: 10000000000
database: foobar
retentionpolicy: foobar
username: foobar
password: foobar
ping:
entrypoint: foobar
middlewares:
- foobar
- foobar
log:
level: foobar
filepath: foobar
format: foobar
accesslog:
filepath: foobar
format: foobar
filters:
statuscodes:
- foobar
- foobar
retryattempts: true
minduration: 42000000000
fields:
defaultmode: foobar
names:
name0: foobar
name1: foobar
headers:
defaultmode: foobar
names:
name0: foobar
name1: foobar
bufferingsize: 42
tracing:
backend: foobar
servicename: foobar
spannamelimit: 42
jaeger:
samplingserverurl: foobar
samplingtype: foobar
samplingparam: 42
localagenthostport: foobar
gen128bit: true
propagation: foobar
tracecontextheadername: foobar
zipkin:
httpendpoint: foobar
samespan: true
id128bit: true
debug: true
samplerate: 42
datadog:
localagenthostport: foobar
globaltag: foobar
debug: true
prioritysampling: true
traceidheadername: foobar
parentidheadername: foobar
samplingpriorityheadername: foobar
bagageprefixheadername: foobar
instana:
localagenthost: foobar
localagentport: 42
loglevel: foobar
haystack: null
hostresolver:
cnameflattening: true
resolvconfig: foobar
resolvdepth: 42
acme:
email: foobar
acmelogging: true
caserver: foobar
storage: foobar
entrypoint: foobar
keytype: foobar
onhostrule: true
dnschallenge:
provider: foobar
delaybeforecheck: 42000000000
resolvers:
- foobar
- foobar
disablepropagationcheck: true
httpchallenge:
entrypoint: foobar
tlschallenge: {}
domains:
- main: foobar
sans:
- foobar
- foobar
- main: foobar
sans:
- foobar
- foobar