diff --git a/docs/toml.md b/docs/toml.md index 6c72c88ea..ad2fe3ccd 100644 --- a/docs/toml.md +++ b/docs/toml.md @@ -824,6 +824,89 @@ Labels can be used on containers to override default behaviour: - `traefik.frontend.entryPoints=http,https`: assign this frontend to entry points `http` and `https`. Overrides `defaultEntryPoints`. +## Mesos generic backend + +Træfɪk can be configured to use Mesos as a backend configuration: + + +```toml +################################################################ +# Mesos configuration backend +################################################################ + +# Enable Mesos configuration backend +# +# Optional +# +[mesos] + +# Mesos server endpoint. +# You can also specify multiple endpoint for Mesos: +# endpoint = "192.168.35.40:5050,192.168.35.41:5050,192.168.35.42:5050" +# endpoint = "zk://192.168.35.20:2181,192.168.35.21:2181,192.168.35.22:2181/mesos" +# +# Required +# +endpoint = "http://127.0.0.1:8080" + +# Enable watch Mesos changes +# +# Optional +# +watch = true + +# Default domain used. +# Can be overridden by setting the "traefik.domain" label on an application. +# +# Required +# +domain = "mesos.localhost" + +# Override default configuration template. For advanced users :) +# +# Optional +# +# filename = "mesos.tmpl" + +# Expose Mesos apps by default in traefik +# +# Optional +# Default: false +# +# ExposedByDefault = true + +# TLS client configuration. https://golang.org/pkg/crypto/tls/#Config +# +# Optional +# +# [mesos.TLS] +# InsecureSkipVerify = true + +# Zookeeper timeout (in seconds) +# +# Optional +# +# ZkDetectionTimeout = 30 + +# Polling interval (in seconds) +# +# Optional +# +# RefreshSeconds = 30 + +# IP sources (e.g. host, docker, mesos, rkt) +# +# Optional +# +# IPSources = "host" + +# HTTP Timeout (in seconds) +# +# Optional +# +# StateTimeoutSecond = "host" +``` + ## Kubernetes Ingress backend diff --git a/provider/mesos.go b/provider/mesos.go index 5d8378412..4064c1671 100644 --- a/provider/mesos.go +++ b/provider/mesos.go @@ -33,9 +33,9 @@ type Mesos struct { Domain string `description:"Default domain used"` ExposedByDefault bool `description:"Expose Mesos apps by default"` GroupsAsSubDomains bool `description:"Convert Mesos groups to subdomains"` - ZkDetectionTimeout int `description:"ZkDetectionTimeout"` - RefreshSeconds int `description:"RefreshSeconds"` - IPSources string `description:"IPSources"` // e.g. "host", "docker", "mesos", "rkt" + ZkDetectionTimeout int `description:"Zookeeper timeout (in seconds)"` + RefreshSeconds int `description:"Polling interval (in seconds)"` + IPSources string `description:"IPSources (e.g. host, docker, mesos, rkt)"` // e.g. "host", "docker", "mesos", "rkt" StateTimeoutSecond int `description:"HTTP Timeout (in seconds)"` Masters []string } diff --git a/traefik.sample.toml b/traefik.sample.toml index 989395a73..754e6cc80 100644 --- a/traefik.sample.toml +++ b/traefik.sample.toml @@ -550,24 +550,30 @@ # [mesos.TLS] # InsecureSkipVerify = true -# +# Zookeeper timeout (in seconds) # # Optional # # ZkDetectionTimeout = 30 -# +# Polling interval (in seconds) # # Optional # # RefreshSeconds = 30 -# +# IP sources (e.g. host, docker, mesos, rkt) # # Optional # # IPSources = "host" +# HTTP Timeout (in seconds) +# +# Optional +# +# StateTimeoutSecond = "host" + ################################################################ # Kubernetes Ingress configuration backend ################################################################