Add Consul Catalog provider

This commit is contained in:
Andrew Privalov 2019-10-15 18:34:08 +03:00 committed by Traefiker Bot
parent d0ed814669
commit 7be2db6e86
52 changed files with 4194 additions and 67 deletions

View file

@ -0,0 +1,11 @@
# Consul Catalog Configuration Reference
Dynamic configuration with Consul Catalog
{: .subtitle }
The labels are case insensitive.
```yaml
--8<-- "content/reference/dynamic-configuration/consul-catalog.yml"
--8<-- "content/reference/dynamic-configuration/docker-labels.yml"
```

View file

@ -0,0 +1 @@
- "traefik.enable=true"

View file

@ -234,6 +234,57 @@ Enable ping. (Default: ```false```)
`--ping.entrypoint`:
EntryPoint (Default: ```traefik```)
`--providers.consulcatalog.constraints`:
Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container.
`--providers.consulcatalog.defaultrule`:
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)
`--providers.consulcatalog.endpoint.address`:
The address of the Consul server (Default: ```http://127.0.0.1:8500```)
`--providers.consulcatalog.endpoint.datacenter`:
Data center to use. If not provided, the default agent data center is used
`--providers.consulcatalog.endpoint.endpointwaittime`:
WaitTime limits how long a Watch will block. If not provided, the agent default values will be used (Default: ```0```)
`--providers.consulcatalog.endpoint.httpauth.password`:
Basic Auth password
`--providers.consulcatalog.endpoint.httpauth.username`:
Basic Auth username
`--providers.consulcatalog.endpoint.scheme`:
The URI scheme for the Consul server
`--providers.consulcatalog.endpoint.tls.ca`:
TLS CA
`--providers.consulcatalog.endpoint.tls.caoptional`:
TLS CA.Optional (Default: ```false```)
`--providers.consulcatalog.endpoint.tls.cert`:
TLS cert
`--providers.consulcatalog.endpoint.tls.insecureskipverify`:
TLS insecure skip verify (Default: ```false```)
`--providers.consulcatalog.endpoint.tls.key`:
TLS key
`--providers.consulcatalog.endpoint.token`:
Token is used to provide a per-request ACL token which overrides the agent's default token
`--providers.consulcatalog.exposedbydefault`:
Expose containers by default. (Default: ```true```)
`--providers.consulcatalog.prefix`:
Prefix for consul service tags. Default 'traefik' (Default: ```traefik```)
`--providers.consulcatalog.refreshinterval`:
Interval for check Consul API. Default 100ms (Default: ```15```)
`--providers.docker`:
Enable Docker backend with default settings. (Default: ```false```)

View file

@ -234,6 +234,57 @@ Enable ping. (Default: ```false```)
`TRAEFIK_PING_ENTRYPOINT`:
EntryPoint (Default: ```traefik```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_CONSTRAINTS`:
Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container.
`TRAEFIK_PROVIDERS_CONSULCATALOG_DEFAULTRULE`:
Default rule. (Default: ```Host(`{{ normalize .Name }}`)```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_ADDRESS`:
The address of the Consul server (Default: ```http://127.0.0.1:8500```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_DATACENTER`:
Data center to use. If not provided, the default agent data center is used
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_ENDPOINTWAITTIME`:
WaitTime limits how long a Watch will block. If not provided, the agent default values will be used (Default: ```0```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_HTTPAUTH_PASSWORD`:
Basic Auth password
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_HTTPAUTH_USERNAME`:
Basic Auth username
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_SCHEME`:
The URI scheme for the Consul server
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_TLS_CA`:
TLS CA
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_TLS_CAOPTIONAL`:
TLS CA.Optional (Default: ```false```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_TLS_CERT`:
TLS cert
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_TLS_INSECURESKIPVERIFY`:
TLS insecure skip verify (Default: ```false```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_TLS_KEY`:
TLS key
`TRAEFIK_PROVIDERS_CONSULCATALOG_ENDPOINT_TOKEN`:
Token is used to provide a per-request ACL token which overrides the agent's default token
`TRAEFIK_PROVIDERS_CONSULCATALOG_EXPOSEDBYDEFAULT`:
Expose containers by default. (Default: ```true```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_PREFIX`:
Prefix for consul service tags. Default 'traefik' (Default: ```traefik```)
`TRAEFIK_PROVIDERS_CONSULCATALOG_REFRESHINTERVAL`:
Interval for check Consul API. Default 100ms (Default: ```15```)
`TRAEFIK_PROVIDERS_DOCKER`:
Enable Docker backend with default settings. (Default: ```false```)

View file

@ -108,6 +108,24 @@
refreshSeconds = 42
intervalPoll = true
prefix = "foobar"
[providers.consulcatalog]
constraints = "foobar"
prefix = "traefik"
defaultRule = "foobar"
exposedByDefault = true
refreshInterval = 15
[providers.consulcatalog.endpoint]
address = "foobar"
scheme = "foobar"
datacenter = "foobar"
token = "foobar"
endpointWaitTime = "15s"
[providers.consulcatalog.endpoint.tls]
ca = "foobar"
caOptional = true
cert = "foobar"
key = "foobar"
insecureSkipVerify = true
[api]
insecure = true

View file

@ -115,6 +115,24 @@ providers:
refreshSeconds: 42
intervalPoll: true
prefix: foobar
consulcatalog:
constraints: foobar
prefix: traefik
defaultRule: foobar
exposedByDefault: true
refreshInterval: 15
endpoint:
address: foobar
scheme: foobar
datacenter: foobar
token: foobar
endpointWaitTime: 15s
tls:
ca: foobar
caOptional: true
cert: foobar
key: foobar
insecureSkipVerify: true
api:
insecure: true
dashboard: true