Use the same case everywhere
This commit is contained in:
parent
f6436663eb
commit
c7d336f958
179 changed files with 5118 additions and 4436 deletions
|
@ -38,17 +38,17 @@ var (
|
|||
|
||||
// Configuration holds ACME configuration provided by users
|
||||
type Configuration struct {
|
||||
Email string `description:"Email address used for registration."`
|
||||
ACMELogging bool `description:"Enable debug logging of ACME actions."`
|
||||
CAServer string `description:"CA server to use."`
|
||||
Storage string `description:"Storage to use."`
|
||||
EntryPoint string `description:"EntryPoint to use."`
|
||||
KeyType string `description:"KeyType used for generating certificate private key. Allow value 'EC256', 'EC384', 'RSA2048', 'RSA4096', 'RSA8192'."`
|
||||
OnHostRule bool `description:"Enable certificate generation on router Host rules."`
|
||||
DNSChallenge *DNSChallenge `description:"Activate DNS-01 Challenge." label:"allowEmpty"`
|
||||
HTTPChallenge *HTTPChallenge `description:"Activate HTTP-01 Challenge." label:"allowEmpty"`
|
||||
TLSChallenge *TLSChallenge `description:"Activate TLS-ALPN-01 Challenge." label:"allowEmpty"`
|
||||
Domains []types.Domain `description:"The list of domains for which certificates are generated on startup. Wildcard domains only accepted with DNSChallenge."`
|
||||
Email string `description:"Email address used for registration." json:"email,omitempty" toml:"email,omitempty" yaml:"email,omitempty"`
|
||||
ACMELogging bool `description:"Enable debug logging of ACME actions." json:"acmeLogging,omitempty" toml:"acmeLogging,omitempty" yaml:"acmeLogging,omitempty"`
|
||||
CAServer string `description:"CA server to use." json:"caServer,omitempty" toml:"caServer,omitempty" yaml:"caServer,omitempty"`
|
||||
Storage string `description:"Storage to use." json:"storage,omitempty" toml:"storage,omitempty" yaml:"storage,omitempty"`
|
||||
EntryPoint string `description:"EntryPoint to use." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty"`
|
||||
KeyType string `description:"KeyType used for generating certificate private key. Allow value 'EC256', 'EC384', 'RSA2048', 'RSA4096', 'RSA8192'." json:"keyType,omitempty" toml:"keyType,omitempty" yaml:"keyType,omitempty"`
|
||||
OnHostRule bool `description:"Enable certificate generation on router Host rules." json:"onHostRule,omitempty" toml:"onHostRule,omitempty" yaml:"onHostRule,omitempty"`
|
||||
DNSChallenge *DNSChallenge `description:"Activate DNS-01 Challenge." json:"dnsChallenge,omitempty" toml:"dnsChallenge,omitempty" yaml:"dnsChallenge,omitempty" label:"allowEmpty"`
|
||||
HTTPChallenge *HTTPChallenge `description:"Activate HTTP-01 Challenge." json:"httpChallenge,omitempty" toml:"httpChallenge,omitempty" yaml:"httpChallenge,omitempty" label:"allowEmpty"`
|
||||
TLSChallenge *TLSChallenge `description:"Activate TLS-ALPN-01 Challenge." json:"tlsChallenge,omitempty" toml:"tlsChallenge,omitempty" yaml:"tlsChallenge,omitempty" label:"allowEmpty"`
|
||||
Domains []types.Domain `description:"The list of domains for which certificates are generated on startup. Wildcard domains only accepted with DNSChallenge." json:"domains,omitempty" toml:"domains,omitempty" yaml:"domains,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -60,22 +60,22 @@ func (a *Configuration) SetDefaults() {
|
|||
|
||||
// Certificate is a struct which contains all data needed from an ACME certificate
|
||||
type Certificate struct {
|
||||
Domain types.Domain
|
||||
Certificate []byte
|
||||
Key []byte
|
||||
Domain types.Domain `json:"domain,omitempty" toml:"domain,omitempty" yaml:"domain,omitempty"`
|
||||
Certificate []byte `json:"certificate,omitempty" toml:"certificate,omitempty" yaml:"certificate,omitempty"`
|
||||
Key []byte `json:"key,omitempty" toml:"key,omitempty" yaml:"key,omitempty"`
|
||||
}
|
||||
|
||||
// DNSChallenge contains DNS challenge Configuration
|
||||
type DNSChallenge struct {
|
||||
Provider string `description:"Use a DNS-01 based challenge provider rather than HTTPS."`
|
||||
DelayBeforeCheck types.Duration `description:"Assume DNS propagates after a delay in seconds rather than finding and querying nameservers."`
|
||||
Resolvers []string `description:"Use following DNS servers to resolve the FQDN authority."`
|
||||
DisablePropagationCheck bool `description:"Disable the DNS propagation checks before notifying ACME that the DNS challenge is ready. [not recommended]"`
|
||||
Provider string `description:"Use a DNS-01 based challenge provider rather than HTTPS." json:"provider,omitempty" toml:"provider,omitempty" yaml:"provider,omitempty"`
|
||||
DelayBeforeCheck types.Duration `description:"Assume DNS propagates after a delay in seconds rather than finding and querying nameservers." json:"delayBeforeCheck,omitempty" toml:"delayBeforeCheck,omitempty" yaml:"delayBeforeCheck,omitempty"`
|
||||
Resolvers []string `description:"Use following DNS servers to resolve the FQDN authority." json:"resolvers,omitempty" toml:"resolvers,omitempty" yaml:"resolvers,omitempty"`
|
||||
DisablePropagationCheck bool `description:"Disable the DNS propagation checks before notifying ACME that the DNS challenge is ready. [not recommended]" json:"disablePropagationCheck,omitempty" toml:"disablePropagationCheck,omitempty" yaml:"disablePropagationCheck,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPChallenge contains HTTP challenge Configuration
|
||||
type HTTPChallenge struct {
|
||||
EntryPoint string `description:"HTTP challenge EntryPoint"`
|
||||
EntryPoint string `description:"HTTP challenge EntryPoint" json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty"`
|
||||
}
|
||||
|
||||
// TLSChallenge contains TLS challenge Configuration
|
||||
|
@ -84,7 +84,7 @@ type TLSChallenge struct{}
|
|||
// Provider holds configurations of the provider.
|
||||
type Provider struct {
|
||||
*Configuration
|
||||
Store Store
|
||||
Store Store `json:"store,omitempty" toml:"store,omitempty" yaml:"store,omitempty"`
|
||||
certificates []*Certificate
|
||||
account *Account
|
||||
client *lego.Client
|
||||
|
|
|
@ -45,16 +45,16 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
|
||||
// Provider holds configurations of the provider.
|
||||
type Provider struct {
|
||||
Constraints string `description:"Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container." export:"true"`
|
||||
Watch bool `description:"Watch provider." export:"true"`
|
||||
Endpoint string `description:"Docker server endpoint. Can be a tcp or a unix socket endpoint."`
|
||||
DefaultRule string `description:"Default rule."`
|
||||
TLS *types.ClientTLS `description:"Enable Docker TLS support." export:"true"`
|
||||
ExposedByDefault bool `description:"Expose containers by default." export:"true"`
|
||||
UseBindPortIP bool `description:"Use the ip address from the bound port, rather than from the inner network." export:"true"`
|
||||
SwarmMode bool `description:"Use Docker on Swarm Mode." export:"true"`
|
||||
Network string `description:"Default Docker network used." export:"true"`
|
||||
SwarmModeRefreshSeconds types.Duration `description:"Polling interval for swarm mode." export:"true"`
|
||||
Constraints string `description:"Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container." json:"constraints,omitempty" toml:"constraints,omitempty" yaml:"constraints,omitempty" export:"true"`
|
||||
Watch bool `description:"Watch provider." json:"watch,omitempty" toml:"watch,omitempty" yaml:"watch,omitempty" export:"true"`
|
||||
Endpoint string `description:"Docker server endpoint. Can be a tcp or a unix socket endpoint." json:"endpoint,omitempty" toml:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||
DefaultRule string `description:"Default rule." json:"defaultRule,omitempty" toml:"defaultRule,omitempty" yaml:"defaultRule,omitempty"`
|
||||
TLS *types.ClientTLS `description:"Enable Docker TLS support." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"`
|
||||
ExposedByDefault bool `description:"Expose containers by default." json:"exposedByDefault,omitempty" toml:"exposedByDefault,omitempty" yaml:"exposedByDefault,omitempty" export:"true"`
|
||||
UseBindPortIP bool `description:"Use the ip address from the bound port, rather than from the inner network." json:"useBindPortIP,omitempty" toml:"useBindPortIP,omitempty" yaml:"useBindPortIP,omitempty" export:"true"`
|
||||
SwarmMode bool `description:"Use Docker on Swarm Mode." json:"swarmMode,omitempty" toml:"swarmMode,omitempty" yaml:"swarmMode,omitempty" export:"true"`
|
||||
Network string `description:"Default Docker network used." json:"network,omitempty" toml:"network,omitempty" yaml:"network,omitempty" export:"true"`
|
||||
SwarmModeRefreshSeconds types.Duration `description:"Polling interval for swarm mode." json:"swarmModeRefreshSeconds,omitempty" toml:"swarmModeRefreshSeconds,omitempty" yaml:"swarmModeRefreshSeconds,omitempty" export:"true"`
|
||||
defaultRuleTpl *template.Template
|
||||
}
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
|
||||
// Provider holds configurations of the provider.
|
||||
type Provider struct {
|
||||
Directory string `description:"Load configuration from one or more .toml files in a directory." export:"true"`
|
||||
Watch bool `description:"Watch provider." export:"true"`
|
||||
Filename string `description:"Override default configuration template. For advanced users :)" export:"true"`
|
||||
DebugLogGeneratedTemplate bool `description:"Enable debug logging of generated configuration template." export:"true"`
|
||||
TraefikFile string `description:"-"`
|
||||
Directory string `description:"Load configuration from one or more .toml files in a directory." json:"directory,omitempty" toml:"directory,omitempty" yaml:"directory,omitempty" export:"true"`
|
||||
Watch bool `description:"Watch provider." json:"watch,omitempty" toml:"watch,omitempty" yaml:"watch,omitempty" export:"true"`
|
||||
Filename string `description:"Override default configuration template. For advanced users :)" json:"filename,omitempty" toml:"filename,omitempty" yaml:"filename,omitempty" export:"true"`
|
||||
DebugLogGeneratedTemplate bool `description:"Enable debug logging of generated configuration template." json:"debugLogGeneratedTemplate,omitempty" toml:"debugLogGeneratedTemplate,omitempty" yaml:"debugLogGeneratedTemplate,omitempty" export:"true"`
|
||||
TraefikFile string `description:"-" json:"traefikFile,omitempty" toml:"traefikFile,omitempty" yaml:"traefikFile,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[http.routers]
|
||||
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
[http.services]
|
||||
|
||||
[http.services.application-1.loadbalancer]
|
||||
[[http.services.application-1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
[http.services.application-1.loadBalancer]
|
||||
[[http.services.application-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
|
||||
[http.services.application-2.loadbalancer]
|
||||
[[http.services.application-2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
[http.services.application-2.loadBalancer]
|
||||
[[http.services.application-2.loadBalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
|
||||
[http.services.application-3.loadbalancer]
|
||||
[[http.services.application-3.loadbalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
[http.services.application-3.loadBalancer]
|
||||
[[http.services.application-3.loadBalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[TLS]
|
||||
[tls]
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
|
|
|
@ -1,57 +1,58 @@
|
|||
[http.routers]
|
||||
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
|
||||
[http.routers."router3"]
|
||||
service = "application-3"
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
|
||||
[http.routers."router3"]
|
||||
service = "application-3"
|
||||
|
||||
[http.services]
|
||||
|
||||
[http.services.application-1.loadbalancer]
|
||||
[[http.services.application-1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
[http.services.application-1.loadBalancer]
|
||||
[[http.services.application-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
|
||||
[http.services.application-2.loadbalancer]
|
||||
[[http.services.application-2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
[http.services.application-2.loadBalancer]
|
||||
[[http.services.application-2.loadBalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
|
||||
[http.services.application-3.loadbalancer]
|
||||
[[http.services.application-3.loadbalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
[http.services.application-3.loadBalancer]
|
||||
[[http.services.application-3.loadBalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
|
||||
[http.services.application-4.loadbalancer]
|
||||
[[http.services.application-4.loadbalancer.servers]]
|
||||
url = "http://172.17.0.4:80"
|
||||
[http.services.application-4.loadBalancer]
|
||||
[[http.services.application-4.loadBalancer.servers]]
|
||||
url = "http://172.17.0.4:80"
|
||||
|
||||
[http.services.application-5.loadbalancer]
|
||||
[[http.services.application-5.loadbalancer.servers]]
|
||||
url = "http://172.17.0.5:80"
|
||||
[http.services.application-5.loadBalancer]
|
||||
[[http.services.application-5.loadBalancer.servers]]
|
||||
url = "http://172.17.0.5:80"
|
||||
|
||||
[http.services.application-6.loadbalancer]
|
||||
[[http.services.application-6.loadbalancer.servers]]
|
||||
url = "http://172.17.0.6:80"
|
||||
[http.services.application-6.loadBalancer]
|
||||
[[http.services.application-6.loadBalancer.servers]]
|
||||
url = "http://172.17.0.6:80"
|
||||
|
||||
[TLS]
|
||||
[tls]
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest5.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest5.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest5.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest5.com.key"
|
||||
|
|
|
@ -1,64 +1,65 @@
|
|||
[http.routers]
|
||||
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
|
||||
[http.routers."router3"]
|
||||
service = "application-3"
|
||||
[http.routers."router3"]
|
||||
service = "application-3"
|
||||
|
||||
[http.routers."router4"]
|
||||
service = "application-4"
|
||||
|
||||
[http.routers."router4"]
|
||||
service = "application-4"
|
||||
[http.services]
|
||||
|
||||
[http.services.application-1.loadbalancer]
|
||||
[[http.services.application-1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
[http.services.application-1.loadBalancer]
|
||||
[[http.services.application-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
|
||||
[http.services.application-2.loadbalancer]
|
||||
[[http.services.application-2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
[http.services.application-2.loadBalancer]
|
||||
[[http.services.application-2.loadBalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
|
||||
[http.services.application-3.loadbalancer]
|
||||
[[http.services.application-3.loadbalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
[http.services.application-3.loadBalancer]
|
||||
[[http.services.application-3.loadBalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
|
||||
[http.services.application-4.loadbalancer]
|
||||
[[http.services.application-4.loadbalancer.servers]]
|
||||
url = "http://172.17.0.4:80"
|
||||
[http.services.application-4.loadBalancer]
|
||||
[[http.services.application-4.loadBalancer.servers]]
|
||||
url = "http://172.17.0.4:80"
|
||||
|
||||
[http.services.application-5.loadbalancer]
|
||||
[[http.services.application-5.loadbalancer.servers]]
|
||||
url = "http://172.17.0.5:80"
|
||||
[http.services.application-5.loadBalancer]
|
||||
[[http.services.application-5.loadBalancer.servers]]
|
||||
url = "http://172.17.0.5:80"
|
||||
|
||||
[http.services.application-6.loadbalancer]
|
||||
[[http.services.application-6.loadbalancer.servers]]
|
||||
url = "http://172.17.0.6:80"
|
||||
[http.services.application-6.loadBalancer]
|
||||
[[http.services.application-6.loadBalancer.servers]]
|
||||
url = "http://172.17.0.6:80"
|
||||
|
||||
[http.services.application-7.loadbalancer]
|
||||
[[http.services.application-7.loadbalancer.servers]]
|
||||
url = "http://172.17.0.7:80"
|
||||
[http.services.application-7.loadBalancer]
|
||||
[[http.services.application-7.loadBalancer.servers]]
|
||||
url = "http://172.17.0.7:80"
|
||||
|
||||
[http.services.application-8.loadbalancer]
|
||||
[[http.services.application-8.loadbalancer.servers]]
|
||||
url = "http://172.17.0.8:80"
|
||||
[http.services.application-8.loadBalancer]
|
||||
[[http.services.application-8.loadBalancer.servers]]
|
||||
url = "http://172.17.0.8:80"
|
||||
|
||||
[TLS]
|
||||
[tls]
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
|
|
|
@ -1,40 +1,44 @@
|
|||
[providers.file]
|
||||
|
||||
## dynamic configuration ##
|
||||
|
||||
[http.routers]
|
||||
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
[http.services]
|
||||
|
||||
[http.services.application-1.loadbalancer]
|
||||
[[http.services.application-1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
[http.services.application-1.loadBalancer]
|
||||
[[http.services.application-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
|
||||
[http.services.application-2.loadbalancer]
|
||||
[[http.services.application-2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
[http.services.application-2.loadBalancer]
|
||||
[[http.services.application-2.loadBalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
|
||||
[http.services.application-3.loadbalancer]
|
||||
[[http.services.application-3.loadbalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
[http.services.application-3.loadBalancer]
|
||||
[[http.services.application-3.loadBalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
|
||||
[TLS]
|
||||
[tls]
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
|
|
|
@ -2,41 +2,44 @@ temp="{{ getTag \"test\" }}"
|
|||
|
||||
[providers.file]
|
||||
|
||||
## dynamic configuration ##
|
||||
|
||||
[http.routers]
|
||||
|
||||
|
||||
[http.routers."router1"]
|
||||
service = "application-1"
|
||||
service = "application-1"
|
||||
|
||||
[http.routers."router2"]
|
||||
service = "application-2"
|
||||
service = "application-2"
|
||||
|
||||
[http.services]
|
||||
|
||||
[http.services.application-1.loadbalancer]
|
||||
[[http.services.application-1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
[http.services.application-1.loadBalancer]
|
||||
[[http.services.application-1.loadBalancer.servers]]
|
||||
url = "http://172.17.0.1:80"
|
||||
|
||||
[http.services.application-2.loadBalancer]
|
||||
[[http.services.application-2.loadBalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
|
||||
[http.services.application-3.loadBalancer]
|
||||
[[http.services.application-3.loadBalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
|
||||
[http.services.application-2.loadbalancer]
|
||||
[[http.services.application-2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
[tls]
|
||||
|
||||
[http.services.application-3.loadbalancer]
|
||||
[[http.services.application-3.loadbalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
|
||||
[TLS]
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest1.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest1.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest2.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest2.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest3.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest3.com.key"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
CertFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
KeyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
[[tls.certificates]]
|
||||
certFile = "integration/fixtures/https/snitest4.com.cert"
|
||||
keyFile = "integration/fixtures/https/snitest4.com.key"
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
http:
|
||||
services:
|
||||
application-1:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.1:80'
|
||||
application-2:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.2:80'
|
||||
application-3:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.3:80'
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
tls:
|
||||
certificates:
|
||||
- certfile: integration/fixtures/https/snitest1.com.cert
|
||||
keyfile: integration/fixtures/https/snitest1.com.key
|
||||
- certfile: integration/fixtures/https/snitest2.com.cert
|
||||
keyfile: integration/fixtures/https/snitest2.com.key
|
||||
- certfile: integration/fixtures/https/snitest3.com.cert
|
||||
keyfile: integration/fixtures/https/snitest3.com.key
|
||||
- certfile: integration/fixtures/https/snitest4.com.cert
|
||||
keyfile: integration/fixtures/https/snitest4.com.key
|
||||
- certFile: integration/fixtures/https/snitest1.com.cert
|
||||
keyFile: integration/fixtures/https/snitest1.com.key
|
||||
- certFile: integration/fixtures/https/snitest2.com.cert
|
||||
keyFile: integration/fixtures/https/snitest2.com.key
|
||||
- certFile: integration/fixtures/https/snitest3.com.cert
|
||||
keyFile: integration/fixtures/https/snitest3.com.key
|
||||
- certFile: integration/fixtures/https/snitest4.com.cert
|
||||
keyFile: integration/fixtures/https/snitest4.com.key
|
||||
|
|
|
@ -8,39 +8,39 @@ http:
|
|||
service: application-3
|
||||
services:
|
||||
application-1:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.1:80'
|
||||
application-2:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.2:80'
|
||||
application-3:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.3:80'
|
||||
application-4:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.4:80'
|
||||
application-5:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.5:80'
|
||||
application-6:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.6:80'
|
||||
|
||||
tls:
|
||||
certificates:
|
||||
- certfile: integration/fixtures/https/snitest1.com.cert
|
||||
keyfile: integration/fixtures/https/snitest1.com.key
|
||||
- certfile: integration/fixtures/https/snitest2.com.cert
|
||||
keyfile: integration/fixtures/https/snitest2.com.key
|
||||
- certfile: integration/fixtures/https/snitest3.com.cert
|
||||
keyfile: integration/fixtures/https/snitest3.com.key
|
||||
- certfile: integration/fixtures/https/snitest4.com.cert
|
||||
keyfile: integration/fixtures/https/snitest4.com.key
|
||||
- certfile: integration/fixtures/https/snitest5.com.cert
|
||||
keyfile: integration/fixtures/https/snitest5.com.key
|
||||
- certFile: integration/fixtures/https/snitest1.com.cert
|
||||
keyFile: integration/fixtures/https/snitest1.com.key
|
||||
- certFile: integration/fixtures/https/snitest2.com.cert
|
||||
keyFile: integration/fixtures/https/snitest2.com.key
|
||||
- certFile: integration/fixtures/https/snitest3.com.cert
|
||||
keyFile: integration/fixtures/https/snitest3.com.key
|
||||
- certFile: integration/fixtures/https/snitest4.com.cert
|
||||
keyFile: integration/fixtures/https/snitest4.com.key
|
||||
- certFile: integration/fixtures/https/snitest5.com.cert
|
||||
keyFile: integration/fixtures/https/snitest5.com.key
|
||||
|
|
|
@ -10,45 +10,44 @@ http:
|
|||
service: application-4
|
||||
services:
|
||||
application-1:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.1:80'
|
||||
application-2:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.2:80'
|
||||
application-3:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.3:80'
|
||||
application-4:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.4:80'
|
||||
application-5:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.5:80'
|
||||
application-6:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.6:80'
|
||||
application-7:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.7:80'
|
||||
application-8:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.8:80'
|
||||
|
||||
tls:
|
||||
certificates:
|
||||
- certfile: integration/fixtures/https/snitest1.com.cert
|
||||
keyfile: integration/fixtures/https/snitest1.com.key
|
||||
- certfile: integration/fixtures/https/snitest2.com.cert
|
||||
keyfile: integration/fixtures/https/snitest2.com.key
|
||||
- certfile: integration/fixtures/https/snitest3.com.cert
|
||||
keyfile: integration/fixtures/https/snitest3.com.key
|
||||
- certfile: integration/fixtures/https/snitest4.com.cert
|
||||
keyfile: integration/fixtures/https/snitest4.com.key
|
||||
- certFile: integration/fixtures/https/snitest1.com.cert
|
||||
keyFile: integration/fixtures/https/snitest1.com.key
|
||||
- certFile: integration/fixtures/https/snitest2.com.cert
|
||||
keyFile: integration/fixtures/https/snitest2.com.key
|
||||
- certFile: integration/fixtures/https/snitest3.com.cert
|
||||
keyFile: integration/fixtures/https/snitest3.com.key
|
||||
- certFile: integration/fixtures/https/snitest4.com.cert
|
||||
keyFile: integration/fixtures/https/snitest4.com.key
|
||||
|
|
|
@ -8,25 +8,25 @@ http:
|
|||
service: application-2
|
||||
services:
|
||||
application-1:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.1:80'
|
||||
application-2:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.2:80'
|
||||
application-3:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://172.17.0.3:80'
|
||||
|
||||
tls:
|
||||
certificates:
|
||||
- certfile: integration/fixtures/https/snitest1.com.cert
|
||||
keyfile: integration/fixtures/https/snitest1.com.key
|
||||
- certfile: integration/fixtures/https/snitest2.com.cert
|
||||
keyfile: integration/fixtures/https/snitest2.com.key
|
||||
- certfile: integration/fixtures/https/snitest3.com.cert
|
||||
keyfile: integration/fixtures/https/snitest3.com.key
|
||||
- certfile: integration/fixtures/https/snitest4.com.cert
|
||||
keyfile: integration/fixtures/https/snitest4.com.key
|
||||
- certFile: integration/fixtures/https/snitest1.com.cert
|
||||
keyFile: integration/fixtures/https/snitest1.com.key
|
||||
- certFile: integration/fixtures/https/snitest2.com.cert
|
||||
keyFile: integration/fixtures/https/snitest2.com.key
|
||||
- certFile: integration/fixtures/https/snitest3.com.cert
|
||||
keyFile: integration/fixtures/https/snitest3.com.key
|
||||
- certFile: integration/fixtures/https/snitest4.com.cert
|
||||
keyFile: integration/fixtures/https/snitest4.com.key
|
||||
|
|
|
@ -2,7 +2,7 @@ http:
|
|||
services:
|
||||
{{ range $i, $e := until 20 }}
|
||||
application-{{ $e }}:
|
||||
loadbalancer:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://127.0.0.1'
|
||||
{{ end }}
|
||||
|
|
|
@ -31,13 +31,13 @@ const (
|
|||
|
||||
// Provider holds configurations of the provider.
|
||||
type Provider struct {
|
||||
Endpoint string `description:"Kubernetes server endpoint (required for external cluster client)."`
|
||||
Token string `description:"Kubernetes bearer token (not needed for in-cluster client)."`
|
||||
CertAuthFilePath string `description:"Kubernetes certificate authority file path (not needed for in-cluster client)."`
|
||||
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers." export:"true"`
|
||||
Namespaces []string `description:"Kubernetes namespaces." export:"true"`
|
||||
LabelSelector string `description:"Kubernetes label selector to use." export:"true"`
|
||||
IngressClass string `description:"Value of kubernetes.io/ingress.class annotation to watch for." export:"true"`
|
||||
Endpoint string `description:"Kubernetes server endpoint (required for external cluster client)." json:"endpoint,omitempty" toml:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||
Token string `description:"Kubernetes bearer token (not needed for in-cluster client)." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty"`
|
||||
CertAuthFilePath string `description:"Kubernetes certificate authority file path (not needed for in-cluster client)." json:"certAuthFilePath,omitempty" toml:"certAuthFilePath,omitempty" yaml:"certAuthFilePath,omitempty"`
|
||||
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers." json:"disablePassHostHeaders,omitempty" toml:"disablePassHostHeaders,omitempty" yaml:"disablePassHostHeaders,omitempty" export:"true"`
|
||||
Namespaces []string `description:"Kubernetes namespaces." json:"namespaces,omitempty" toml:"namespaces,omitempty" yaml:"namespaces,omitempty" export:"true"`
|
||||
LabelSelector string `description:"Kubernetes label selector to use." json:"labelSelector,omitempty" toml:"labelSelector,omitempty" yaml:"labelSelector,omitempty" export:"true"`
|
||||
IngressClass string `description:"Value of kubernetes.io/ingress.class annotation to watch for." json:"ingressClass,omitempty" toml:"ingressClass,omitempty" yaml:"ingressClass,omitempty" export:"true"`
|
||||
lastConfiguration safe.Safe
|
||||
}
|
||||
|
||||
|
|
|
@ -32,22 +32,22 @@ const (
|
|||
|
||||
// Provider holds configurations of the provider.
|
||||
type Provider struct {
|
||||
Endpoint string `description:"Kubernetes server endpoint (required for external cluster client)."`
|
||||
Token string `description:"Kubernetes bearer token (not needed for in-cluster client)."`
|
||||
CertAuthFilePath string `description:"Kubernetes certificate authority file path (not needed for in-cluster client)."`
|
||||
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers." export:"true"`
|
||||
Namespaces []string `description:"Kubernetes namespaces." export:"true"`
|
||||
LabelSelector string `description:"Kubernetes Ingress label selector to use." export:"true"`
|
||||
IngressClass string `description:"Value of kubernetes.io/ingress.class annotation to watch for." export:"true"`
|
||||
IngressEndpoint *EndpointIngress `description:"Kubernetes Ingress Endpoint."`
|
||||
Endpoint string `description:"Kubernetes server endpoint (required for external cluster client)." json:"endpoint,omitempty" toml:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||
Token string `description:"Kubernetes bearer token (not needed for in-cluster client)." json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty"`
|
||||
CertAuthFilePath string `description:"Kubernetes certificate authority file path (not needed for in-cluster client)." json:"certAuthFilePath,omitempty" toml:"certAuthFilePath,omitempty" yaml:"certAuthFilePath,omitempty"`
|
||||
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers." json:"disablePassHostHeaders,omitempty" toml:"disablePassHostHeaders,omitempty" yaml:"disablePassHostHeaders,omitempty" export:"true"`
|
||||
Namespaces []string `description:"Kubernetes namespaces." json:"namespaces,omitempty" toml:"namespaces,omitempty" yaml:"namespaces,omitempty" export:"true"`
|
||||
LabelSelector string `description:"Kubernetes Ingress label selector to use." json:"labelSelector,omitempty" toml:"labelSelector,omitempty" yaml:"labelSelector,omitempty" export:"true"`
|
||||
IngressClass string `description:"Value of kubernetes.io/ingress.class annotation to watch for." json:"ingressClass,omitempty" toml:"ingressClass,omitempty" yaml:"ingressClass,omitempty" export:"true"`
|
||||
IngressEndpoint *EndpointIngress `description:"Kubernetes Ingress Endpoint." json:"ingressEndpoint,omitempty" toml:"ingressEndpoint,omitempty" yaml:"ingressEndpoint,omitempty"`
|
||||
lastConfiguration safe.Safe
|
||||
}
|
||||
|
||||
// EndpointIngress holds the endpoint information for the Kubernetes provider
|
||||
type EndpointIngress struct {
|
||||
IP string `description:"IP used for Kubernetes Ingress endpoints."`
|
||||
Hostname string `description:"Hostname used for Kubernetes Ingress endpoints."`
|
||||
PublishedService string `description:"Published Kubernetes Service to copy status from."`
|
||||
IP string `description:"IP used for Kubernetes Ingress endpoints." json:"ip,omitempty" toml:"ip,omitempty" yaml:"ip,omitempty"`
|
||||
Hostname string `description:"Hostname used for Kubernetes Ingress endpoints." json:"hostname,omitempty" toml:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
PublishedService string `description:"Published Kubernetes Service to copy status from." json:"publishedService,omitempty" toml:"publishedService,omitempty" yaml:"publishedService,omitempty"`
|
||||
}
|
||||
|
||||
func (p *Provider) newK8sClient(ctx context.Context, ingressLabelSelector string) (*clientWrapper, error) {
|
||||
|
|
|
@ -45,21 +45,21 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
|
||||
// Provider holds configuration of the provider.
|
||||
type Provider struct {
|
||||
Constraints string `description:"Constraints is an expression that Traefik matches against the application's labels to determine whether to create any route for that application." export:"true"`
|
||||
Trace bool `description:"Display additional provider logs." export:"true"`
|
||||
Watch bool `description:"Watch provider." export:"true"`
|
||||
Endpoint string `description:"Marathon server endpoint. You can also specify multiple endpoint for Marathon." export:"true"`
|
||||
DefaultRule string `description:"Default rule."`
|
||||
ExposedByDefault bool `description:"Expose Marathon apps by default." export:"true"`
|
||||
DCOSToken string `description:"DCOSToken for DCOS environment, This will override the Authorization header." export:"true"`
|
||||
TLS *types.ClientTLS `description:"Enable TLS support." export:"true"`
|
||||
DialerTimeout types.Duration `description:"Set a dialer timeout for Marathon." export:"true"`
|
||||
ResponseHeaderTimeout types.Duration `description:"Set a response header timeout for Marathon." export:"true"`
|
||||
TLSHandshakeTimeout types.Duration `description:"Set a TLS handshake timeout for Marathon." export:"true"`
|
||||
KeepAlive types.Duration `description:"Set a TCP Keep Alive time." export:"true"`
|
||||
ForceTaskHostname bool `description:"Force to use the task's hostname." export:"true"`
|
||||
Basic *Basic `description:"Enable basic authentication." export:"true"`
|
||||
RespectReadinessChecks bool `description:"Filter out tasks with non-successful readiness checks during deployments." export:"true"`
|
||||
Constraints string `description:"Constraints is an expression that Traefik matches against the application's labels to determine whether to create any route for that application." json:"constraints,omitempty" toml:"constraints,omitempty" yaml:"constraints,omitempty" export:"true"`
|
||||
Trace bool `description:"Display additional provider logs." json:"trace,omitempty" toml:"trace,omitempty" yaml:"trace,omitempty" export:"true"`
|
||||
Watch bool `description:"Watch provider." json:"watch,omitempty" toml:"watch,omitempty" yaml:"watch,omitempty" export:"true"`
|
||||
Endpoint string `description:"Marathon server endpoint. You can also specify multiple endpoint for Marathon." json:"endpoint,omitempty" toml:"endpoint,omitempty" yaml:"endpoint,omitempty" export:"true"`
|
||||
DefaultRule string `description:"Default rule." json:"defaultRule,omitempty" toml:"defaultRule,omitempty" yaml:"defaultRule,omitempty"`
|
||||
ExposedByDefault bool `description:"Expose Marathon apps by default." json:"exposedByDefault,omitempty" toml:"exposedByDefault,omitempty" yaml:"exposedByDefault,omitempty" export:"true"`
|
||||
DCOSToken string `description:"DCOSToken for DCOS environment, This will override the Authorization header." json:"dcosToken,omitempty" toml:"dcosToken,omitempty" yaml:"dcosToken,omitempty" export:"true"`
|
||||
TLS *types.ClientTLS `description:"Enable TLS support." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"`
|
||||
DialerTimeout types.Duration `description:"Set a dialer timeout for Marathon." json:"dialerTimeout,omitempty" toml:"dialerTimeout,omitempty" yaml:"dialerTimeout,omitempty" export:"true"`
|
||||
ResponseHeaderTimeout types.Duration `description:"Set a response header timeout for Marathon." json:"responseHeaderTimeout,omitempty" toml:"responseHeaderTimeout,omitempty" yaml:"responseHeaderTimeout,omitempty" export:"true"`
|
||||
TLSHandshakeTimeout types.Duration `description:"Set a TLS handshake timeout for Marathon." json:"tlsHandshakeTimeout,omitempty" toml:"tlsHandshakeTimeout,omitempty" yaml:"tlsHandshakeTimeout,omitempty" export:"true"`
|
||||
KeepAlive types.Duration `description:"Set a TCP Keep Alive time." json:"keepAlive,omitempty" toml:"keepAlive,omitempty" yaml:"keepAlive,omitempty" export:"true"`
|
||||
ForceTaskHostname bool `description:"Force to use the task's hostname." json:"forceTaskHostname,omitempty" toml:"forceTaskHostname,omitempty" yaml:"forceTaskHostname,omitempty" export:"true"`
|
||||
Basic *Basic `description:"Enable basic authentication." json:"basic,omitempty" toml:"basic,omitempty" yaml:"basic,omitempty" export:"true"`
|
||||
RespectReadinessChecks bool `description:"Filter out tasks with non-successful readiness checks during deployments." json:"respectReadinessChecks,omitempty" toml:"respectReadinessChecks,omitempty" yaml:"respectReadinessChecks,omitempty" export:"true"`
|
||||
readyChecker *readinessChecker
|
||||
marathonClient marathon.Marathon
|
||||
defaultRuleTpl *template.Template
|
||||
|
@ -79,8 +79,8 @@ func (p *Provider) SetDefaults() {
|
|||
|
||||
// Basic holds basic authentication specific configurations
|
||||
type Basic struct {
|
||||
HTTPBasicAuthUser string `description:"Basic authentication User."`
|
||||
HTTPBasicPassword string `description:"Basic authentication Password."`
|
||||
HTTPBasicAuthUser string `description:"Basic authentication User." json:"httpBasicAuthUser,omitempty" toml:"httpBasicAuthUser,omitempty" yaml:"httpBasicAuthUser,omitempty"`
|
||||
HTTPBasicPassword string `description:"Basic authentication Password." json:"httpBasicPassword,omitempty" toml:"httpBasicPassword,omitempty" yaml:"httpBasicPassword,omitempty"`
|
||||
}
|
||||
|
||||
// Init the provider
|
||||
|
|
|
@ -496,7 +496,6 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
},
|
||||
},
|
||||
expected: &config.Configuration{
|
||||
|
||||
TCP: &config.TCPConfiguration{
|
||||
Routers: map[string]*config.TCPRouter{
|
||||
"foo": {
|
||||
|
|
|
@ -40,14 +40,14 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
|
||||
// Provider holds configurations of the provider.
|
||||
type Provider struct {
|
||||
Constraints string `description:"Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container." export:"true"`
|
||||
Watch bool `description:"Watch provider." export:"true"`
|
||||
DefaultRule string `description:"Default rule."`
|
||||
ExposedByDefault bool `description:"Expose containers by default." export:"true"`
|
||||
EnableServiceHealthFilter bool `description:"Filter services with unhealthy states and inactive states." export:"true"`
|
||||
RefreshSeconds int `description:"Defines the polling interval in seconds." export:"true"`
|
||||
IntervalPoll bool `description:"Poll the Rancher metadata service every 'rancher.refreshseconds' (less accurate)."`
|
||||
Prefix string `description:"Prefix used for accessing the Rancher metadata service."`
|
||||
Constraints string `description:"Constraints is an expression that Traefik matches against the container's labels to determine whether to create any route for that container." json:"constraints,omitempty" toml:"constraints,omitempty" yaml:"constraints,omitempty" export:"true"`
|
||||
Watch bool `description:"Watch provider." json:"watch,omitempty" toml:"watch,omitempty" yaml:"watch,omitempty" export:"true"`
|
||||
DefaultRule string `description:"Default rule." json:"defaultRule,omitempty" toml:"defaultRule,omitempty" yaml:"defaultRule,omitempty"`
|
||||
ExposedByDefault bool `description:"Expose containers by default." json:"exposedByDefault,omitempty" toml:"exposedByDefault,omitempty" yaml:"exposedByDefault,omitempty" export:"true"`
|
||||
EnableServiceHealthFilter bool `description:"Filter services with unhealthy states and inactive states." json:"enableServiceHealthFilter,omitempty" toml:"enableServiceHealthFilter,omitempty" yaml:"enableServiceHealthFilter,omitempty" export:"true"`
|
||||
RefreshSeconds int `description:"Defines the polling interval in seconds." json:"refreshSeconds,omitempty" toml:"refreshSeconds,omitempty" yaml:"refreshSeconds,omitempty" export:"true"`
|
||||
IntervalPoll bool `description:"Poll the Rancher metadata service every 'rancher.refreshseconds' (less accurate)." json:"intervalPoll,omitempty" toml:"intervalPoll,omitempty" yaml:"intervalPoll,omitempty"`
|
||||
Prefix string `description:"Prefix used for accessing the Rancher metadata service." json:"prefix,omitempty" toml:"prefix,omitempty" yaml:"prefix,omitempty"`
|
||||
defaultRuleTpl *template.Template
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
// Provider is a provider.Provider implementation that provides a Rest API.
|
||||
type Provider struct {
|
||||
configurationChan chan<- config.Message
|
||||
EntryPoint string `description:"EntryPoint." export:"true"`
|
||||
EntryPoint string `description:"EntryPoint." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue