Use the same case everywhere
This commit is contained in:
parent
f6436663eb
commit
c7d336f958
179 changed files with 5118 additions and 4436 deletions
|
@ -199,7 +199,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
EntryPoint: "MyEntryPoint",
|
||||
Middlewares: []string{"m1", "m2"},
|
||||
},
|
||||
Datadog: &types.Datadog{
|
||||
DataDog: &types.DataDog{
|
||||
Address: "localhost:8181",
|
||||
PushInterval: 12,
|
||||
},
|
||||
|
|
|
@ -895,7 +895,6 @@ func TestHandlerHTTP_API(t *testing.T) {
|
|||
assert.JSONEq(t, string(data), string(contents))
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestHandler_Configuration(t *testing.T) {
|
||||
|
|
4
pkg/api/testdata/getrawdata.json
vendored
4
pkg/api/testdata/getrawdata.json
vendored
|
@ -54,7 +54,7 @@
|
|||
},
|
||||
"services": {
|
||||
"foo-service@myprovider": {
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://127.0.0.1"
|
||||
|
@ -86,7 +86,7 @@
|
|||
},
|
||||
"tcpServices": {
|
||||
"tcpfoo-service@myprovider": {
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "127.0.0.1"
|
||||
|
|
2
pkg/api/testdata/service-bar.json
vendored
2
pkg/api/testdata/service-bar.json
vendored
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"passHostHeader": false,
|
||||
"servers": [
|
||||
{
|
||||
|
|
2
pkg/api/testdata/services-page2.json
vendored
2
pkg/api/testdata/services-page2.json
vendored
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"passHostHeader": false,
|
||||
"servers": [
|
||||
{
|
||||
|
|
4
pkg/api/testdata/services.json
vendored
4
pkg/api/testdata/services.json
vendored
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"passHostHeader": false,
|
||||
"servers": [
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"passHostHeader": false,
|
||||
"servers": [
|
||||
{
|
||||
|
|
2
pkg/api/testdata/tcpservice-bar.json
vendored
2
pkg/api/testdata/tcpservice-bar.json
vendored
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "127.0.0.1:2345"
|
||||
|
|
2
pkg/api/testdata/tcpservices-page2.json
vendored
2
pkg/api/testdata/tcpservices-page2.json
vendored
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "127.0.0.2:2345"
|
||||
|
|
4
pkg/api/testdata/tcpservices.json
vendored
4
pkg/api/testdata/tcpservices.json
vendored
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "127.0.0.1:2345"
|
||||
|
@ -15,7 +15,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"loadbalancer": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "127.0.0.2:2345"
|
||||
|
|
|
@ -1,57 +1,98 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"reflect"
|
||||
|
||||
traefiktls "github.com/containous/traefik/pkg/tls"
|
||||
)
|
||||
|
||||
// Message holds configuration information exchanged between parts of traefik.
|
||||
type Message struct {
|
||||
ProviderName string
|
||||
Configuration *Configuration
|
||||
}
|
||||
|
||||
// Configurations is for currentConfigurations Map.
|
||||
type Configurations map[string]*Configuration
|
||||
|
||||
// Configuration is the root of the dynamic configuration
|
||||
type Configuration struct {
|
||||
HTTP *HTTPConfiguration `json:"http,omitempty" toml:"http,omitempty" yaml:"http,omitempty"`
|
||||
TCP *TCPConfiguration `json:"tcp,omitempty" toml:"tcp,omitempty" yaml:"tcp,omitempty"`
|
||||
TLS *TLSConfiguration `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
}
|
||||
|
||||
// TLSConfiguration contains all the configuration parameters of a TLS connection.
|
||||
type TLSConfiguration struct {
|
||||
Certificates []*traefiktls.CertAndStores `json:"-" toml:"certificates,omitempty" yaml:"certificates,omitempty" label:"-"`
|
||||
Options map[string]traefiktls.Options `json:"options,omitempty" toml:"options,omitempty" yaml:"options,omitempty"`
|
||||
Stores map[string]traefiktls.Store `json:"stores,omitempty" toml:"stores,omitempty" yaml:"stores,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPConfiguration contains all the HTTP configuration parameters.
|
||||
type HTTPConfiguration struct {
|
||||
Routers map[string]*Router `json:"routers,omitempty" toml:"routers,omitempty" yaml:"routers,omitempty"`
|
||||
Middlewares map[string]*Middleware `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty"`
|
||||
Services map[string]*Service `json:"services,omitempty" toml:"services,omitempty" yaml:"services,omitempty"`
|
||||
}
|
||||
|
||||
// TCPConfiguration contains all the TCP configuration parameters.
|
||||
type TCPConfiguration struct {
|
||||
Routers map[string]*TCPRouter `json:"routers,omitempty" toml:"routers,omitempty" yaml:"routers,omitempty"`
|
||||
Services map[string]*TCPService `json:"services,omitempty" toml:"services,omitempty" yaml:"services,omitempty"`
|
||||
}
|
||||
|
||||
// Service holds a service configuration (can only be of one type at the same time).
|
||||
type Service struct {
|
||||
LoadBalancer *LoadBalancerService `json:"loadBalancer,omitempty" toml:"loadBalancer,omitempty" yaml:"loadBalancer,omitempty"`
|
||||
}
|
||||
|
||||
// TCPService holds a tcp service configuration (can only be of one type at the same time).
|
||||
type TCPService struct {
|
||||
LoadBalancer *TCPLoadBalancerService `json:"loadBalancer,omitempty" toml:"loadBalancer,omitempty" yaml:"loadBalancer,omitempty"`
|
||||
}
|
||||
|
||||
// Router holds the router configuration.
|
||||
type Router struct {
|
||||
EntryPoints []string `json:"entryPoints"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:",omitempty"`
|
||||
Service string `json:"service,omitempty" toml:",omitempty"`
|
||||
Rule string `json:"rule,omitempty" toml:",omitempty"`
|
||||
Priority int `json:"priority,omitempty" toml:"priority,omitzero"`
|
||||
TLS *RouterTLSConfig `json:"tls,omitempty" toml:"tls,omitzero" label:"allowEmpty"`
|
||||
EntryPoints []string `json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty"`
|
||||
Rule string `json:"rule,omitempty" toml:"rule,omitempty" yaml:"rule,omitempty"`
|
||||
Priority int `json:"priority,omitempty" toml:"priority,omitempty,omitzero" yaml:"priority,omitempty"`
|
||||
TLS *RouterTLSConfig `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
// RouterTLSConfig holds the TLS configuration for a router
|
||||
type RouterTLSConfig struct {
|
||||
Options string `json:"options,omitempty" toml:"options,omitzero"`
|
||||
Options string `json:"options,omitempty" toml:"options,omitempty" yaml:"options,omitempty"`
|
||||
}
|
||||
|
||||
// TCPRouter holds the router configuration.
|
||||
type TCPRouter struct {
|
||||
EntryPoints []string `json:"entryPoints"`
|
||||
Service string `json:"service,omitempty" toml:",omitempty"`
|
||||
Rule string `json:"rule,omitempty" toml:",omitempty"`
|
||||
TLS *RouterTCPTLSConfig `json:"tls,omitempty" toml:"tls,omitzero" label:"allowEmpty"`
|
||||
EntryPoints []string `json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty"`
|
||||
Rule string `json:"rule,omitempty" toml:"rule,omitempty" yaml:"rule,omitempty"`
|
||||
TLS *RouterTCPTLSConfig `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
// RouterTCPTLSConfig holds the TLS configuration for a router
|
||||
type RouterTCPTLSConfig struct {
|
||||
Passthrough bool `json:"passthrough" toml:"passthrough,omitzero"`
|
||||
Options string `json:"options,omitempty" toml:"options,omitzero"`
|
||||
Passthrough bool `json:"passthrough" toml:"passthrough" yaml:"passthrough"`
|
||||
Options string `json:"options,omitempty" toml:"options,omitempty" yaml:"options,omitempty"`
|
||||
}
|
||||
|
||||
// LoadBalancerService holds the LoadBalancerService configuration.
|
||||
type LoadBalancerService struct {
|
||||
Stickiness *Stickiness `json:"stickiness,omitempty" toml:",omitempty" label:"allowEmpty"`
|
||||
Servers []Server `json:"servers,omitempty" toml:",omitempty" label-slice-as-struct:"server"`
|
||||
HealthCheck *HealthCheck `json:"healthCheck,omitempty" toml:",omitempty"`
|
||||
PassHostHeader bool `json:"passHostHeader" toml:",omitempty"`
|
||||
ResponseForwarding *ResponseForwarding `json:"forwardingResponse,omitempty" toml:",omitempty"`
|
||||
Stickiness *Stickiness `json:"stickiness,omitempty" toml:"stickiness,omitempty" yaml:"stickiness,omitempty" label:"allowEmpty"`
|
||||
Servers []Server `json:"servers,omitempty" toml:"servers,omitempty" yaml:"servers,omitempty" label-slice-as-struct:"server"`
|
||||
HealthCheck *HealthCheck `json:"healthCheck,omitempty" toml:"healthCheck,omitempty" yaml:"healthCheck,omitempty"`
|
||||
PassHostHeader bool `json:"passHostHeader" toml:"passHostHeader" yaml:"passHostHeader"`
|
||||
ResponseForwarding *ResponseForwarding `json:"responseForwarding,omitempty" toml:"responseForwarding,omitempty" yaml:"responseForwarding,omitempty"`
|
||||
}
|
||||
|
||||
// TCPLoadBalancerService holds the LoadBalancerService configuration.
|
||||
type TCPLoadBalancerService struct {
|
||||
Servers []TCPServer `json:"servers,omitempty" toml:",omitempty" label-slice-as-struct:"server"`
|
||||
Servers []TCPServer `json:"servers,omitempty" toml:"servers,omitempty" yaml:"servers,omitempty" label-slice-as-struct:"server" label-slice-as-struct:"server"`
|
||||
}
|
||||
|
||||
// Mergeable tells if the given service is mergeable.
|
||||
|
@ -95,27 +136,27 @@ func (l *LoadBalancerService) SetDefaults() {
|
|||
|
||||
// ResponseForwarding holds configuration for the forward of the response.
|
||||
type ResponseForwarding struct {
|
||||
FlushInterval string `json:"flushInterval,omitempty" toml:",omitempty"`
|
||||
FlushInterval string `json:"flushInterval,omitempty" toml:"flushInterval,omitempty" yaml:"flushInterval,omitempty"`
|
||||
}
|
||||
|
||||
// Stickiness holds the stickiness configuration.
|
||||
type Stickiness struct {
|
||||
CookieName string `json:"cookieName,omitempty" toml:",omitempty"`
|
||||
SecureCookie bool `json:"secureCookie,omitempty" toml:",omitempty"`
|
||||
HTTPOnlyCookie bool `json:"httpOnlyCookie,omitempty" toml:",omitempty"`
|
||||
CookieName string `json:"cookieName,omitempty" toml:"cookieName,omitempty" yaml:"cookieName,omitempty"`
|
||||
SecureCookie bool `json:"secureCookie,omitempty" toml:"secureCookie,omitempty" yaml:"secureCookie,omitempty"`
|
||||
HTTPOnlyCookie bool `json:"httpOnlyCookie,omitempty" toml:"httpOnlyCookie,omitempty" yaml:"httpOnlyCookie,omitempty"`
|
||||
}
|
||||
|
||||
// Server holds the server configuration.
|
||||
type Server struct {
|
||||
URL string `json:"url" label:"-"`
|
||||
Scheme string `toml:"-" json:"-"`
|
||||
Port string `toml:"-" json:"-"`
|
||||
URL string `json:"url,omitempty" toml:"url,omitempty" yaml:"url,omitempty" label:"-"`
|
||||
Scheme string `toml:"-" json:"-" yaml:"-"`
|
||||
Port string `toml:"-" json:"-" yaml:"-"`
|
||||
}
|
||||
|
||||
// TCPServer holds a TCP Server configuration
|
||||
type TCPServer struct {
|
||||
Address string `json:"address" label:"-"`
|
||||
Port string `toml:"-" json:"-"`
|
||||
Address string `json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty" label:"-"`
|
||||
Port string `toml:"-" json:"-" yaml:"-"`
|
||||
}
|
||||
|
||||
// SetDefaults Default values for a Server.
|
||||
|
@ -125,128 +166,13 @@ func (s *Server) SetDefaults() {
|
|||
|
||||
// HealthCheck holds the HealthCheck configuration.
|
||||
type HealthCheck struct {
|
||||
Scheme string `json:"scheme,omitempty" toml:",omitempty"`
|
||||
Path string `json:"path,omitempty" toml:",omitempty"`
|
||||
Port int `json:"port,omitempty" toml:",omitempty,omitzero"`
|
||||
Scheme string `json:"scheme,omitempty" toml:"scheme,omitempty" yaml:"scheme,omitempty"`
|
||||
Path string `json:"path,omitempty" toml:"path,omitempty" yaml:"path,omitempty"`
|
||||
Port int `json:"port,omitempty" toml:"port,omitempty,omitzero" yaml:"port,omitempty"`
|
||||
// FIXME change string to types.Duration
|
||||
Interval string `json:"interval,omitempty" toml:",omitempty"`
|
||||
Interval string `json:"interval,omitempty" toml:"interval,omitempty" yaml:"interval,omitempty"`
|
||||
// FIXME change string to types.Duration
|
||||
Timeout string `json:"timeout,omitempty" toml:",omitempty"`
|
||||
Hostname string `json:"hostname,omitempty" toml:",omitempty"`
|
||||
Headers map[string]string `json:"headers,omitempty" toml:",omitempty"`
|
||||
}
|
||||
|
||||
// CreateTLSConfig creates a TLS config from ClientTLS structures.
|
||||
func (clientTLS *ClientTLS) CreateTLSConfig() (*tls.Config, error) {
|
||||
if clientTLS == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var err error
|
||||
caPool := x509.NewCertPool()
|
||||
clientAuth := tls.NoClientCert
|
||||
if clientTLS.CA != "" {
|
||||
var ca []byte
|
||||
if _, errCA := os.Stat(clientTLS.CA); errCA == nil {
|
||||
ca, err = ioutil.ReadFile(clientTLS.CA)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read CA. %s", err)
|
||||
}
|
||||
} else {
|
||||
ca = []byte(clientTLS.CA)
|
||||
}
|
||||
|
||||
if !caPool.AppendCertsFromPEM(ca) {
|
||||
return nil, fmt.Errorf("failed to parse CA")
|
||||
}
|
||||
|
||||
if clientTLS.CAOptional {
|
||||
clientAuth = tls.VerifyClientCertIfGiven
|
||||
} else {
|
||||
clientAuth = tls.RequireAndVerifyClientCert
|
||||
}
|
||||
}
|
||||
|
||||
cert := tls.Certificate{}
|
||||
_, errKeyIsFile := os.Stat(clientTLS.Key)
|
||||
|
||||
if !clientTLS.InsecureSkipVerify && (len(clientTLS.Cert) == 0 || len(clientTLS.Key) == 0) {
|
||||
return nil, fmt.Errorf("TLS Certificate or Key file must be set when TLS configuration is created")
|
||||
}
|
||||
|
||||
if len(clientTLS.Cert) > 0 && len(clientTLS.Key) > 0 {
|
||||
if _, errCertIsFile := os.Stat(clientTLS.Cert); errCertIsFile == nil {
|
||||
if errKeyIsFile == nil {
|
||||
cert, err = tls.LoadX509KeyPair(clientTLS.Cert, clientTLS.Key)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to load TLS keypair: %v", err)
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("tls cert is a file, but tls key is not")
|
||||
}
|
||||
} else {
|
||||
if errKeyIsFile != nil {
|
||||
cert, err = tls.X509KeyPair([]byte(clientTLS.Cert), []byte(clientTLS.Key))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to load TLS keypair: %v", err)
|
||||
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("TLS key is a file, but tls cert is not")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &tls.Config{
|
||||
Certificates: []tls.Certificate{cert},
|
||||
RootCAs: caPool,
|
||||
InsecureSkipVerify: clientTLS.InsecureSkipVerify,
|
||||
ClientAuth: clientAuth,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Message holds configuration information exchanged between parts of traefik.
|
||||
type Message struct {
|
||||
ProviderName string
|
||||
Configuration *Configuration
|
||||
}
|
||||
|
||||
// Configuration is the root of the dynamic configuration
|
||||
type Configuration struct {
|
||||
HTTP *HTTPConfiguration
|
||||
TCP *TCPConfiguration
|
||||
TLS *TLSConfiguration
|
||||
}
|
||||
|
||||
// TLSConfiguration contains all the configuration parameters of a TLS connection.
|
||||
type TLSConfiguration struct {
|
||||
Certificates []*traefiktls.CertAndStores `json:"-" label:"-" yaml:"certificates"`
|
||||
Options map[string]traefiktls.Options
|
||||
Stores map[string]traefiktls.Store
|
||||
}
|
||||
|
||||
// Configurations is for currentConfigurations Map.
|
||||
type Configurations map[string]*Configuration
|
||||
|
||||
// HTTPConfiguration contains all the HTTP configuration parameters.
|
||||
type HTTPConfiguration struct {
|
||||
Routers map[string]*Router `json:"routers,omitempty" toml:",omitempty"`
|
||||
Middlewares map[string]*Middleware `json:"middlewares,omitempty" toml:",omitempty"`
|
||||
Services map[string]*Service `json:"services,omitempty" toml:",omitempty"`
|
||||
}
|
||||
|
||||
// TCPConfiguration contains all the TCP configuration parameters.
|
||||
type TCPConfiguration struct {
|
||||
Routers map[string]*TCPRouter `json:"routers,omitempty" toml:",omitempty"`
|
||||
Services map[string]*TCPService `json:"services,omitempty" toml:",omitempty"`
|
||||
}
|
||||
|
||||
// Service holds a service configuration (can only be of one type at the same time).
|
||||
type Service struct {
|
||||
LoadBalancer *LoadBalancerService `json:"loadbalancer,omitempty" toml:",omitempty,omitzero"`
|
||||
}
|
||||
|
||||
// TCPService holds a tcp service configuration (can only be of one type at the same time).
|
||||
type TCPService struct {
|
||||
LoadBalancer *TCPLoadBalancerService `json:"loadbalancer,omitempty" toml:",omitempty,omitzero"`
|
||||
Timeout string `json:"timeout,omitempty" toml:"timeout,omitempty" yaml:"timeout,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty" toml:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
Headers map[string]string `json:"headers,omitempty" toml:"headers,omitempty" yaml:"headers,omitempty"`
|
||||
}
|
||||
|
|
|
@ -67,267 +67,235 @@ func Test_decodeFileToNode_Toml(t *testing.T) {
|
|||
expected := &parser.Node{
|
||||
Name: "traefik",
|
||||
Children: []*parser.Node{
|
||||
{Name: "ACME",
|
||||
Children: []*parser.Node{
|
||||
{Name: "ACMELogging", Value: "true"},
|
||||
{Name: "CAServer", Value: "foobar"},
|
||||
{Name: "DNSChallenge", Children: []*parser.Node{
|
||||
{Name: "DelayBeforeCheck", Value: "42"},
|
||||
{Name: "DisablePropagationCheck", Value: "true"},
|
||||
{Name: "Provider", Value: "foobar"},
|
||||
{Name: "Resolvers", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "Domains", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Main", Value: "foobar"},
|
||||
{Name: "SANs", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Main", Value: "foobar"},
|
||||
{Name: "SANs", Value: "foobar,foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "Email", Value: "foobar"},
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "HTTPChallenge", Children: []*parser.Node{
|
||||
{Name: "EntryPoint", Value: "foobar"}}},
|
||||
{Name: "KeyType", Value: "foobar"},
|
||||
{Name: "OnHostRule", Value: "true"},
|
||||
{Name: "Storage", Value: "foobar"},
|
||||
{Name: "TLSChallenge"},
|
||||
},
|
||||
},
|
||||
{Name: "API", Children: []*parser.Node{
|
||||
{Name: "Dashboard", Value: "true"},
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "Middlewares", Value: "foobar,foobar"},
|
||||
{Name: "Statistics", Children: []*parser.Node{
|
||||
{Name: "RecentErrors", Value: "42"}}}}},
|
||||
{Name: "AccessLog", Children: []*parser.Node{
|
||||
{Name: "BufferingSize", Value: "42"},
|
||||
{Name: "Fields", Children: []*parser.Node{
|
||||
{Name: "DefaultMode", Value: "foobar"},
|
||||
{Name: "Headers", Children: []*parser.Node{
|
||||
{Name: "DefaultMode", Value: "foobar"},
|
||||
{Name: "Names", Children: []*parser.Node{
|
||||
{Name: "accessLog", Children: []*parser.Node{
|
||||
{Name: "bufferingSize", Value: "42"},
|
||||
{Name: "fields", Children: []*parser.Node{
|
||||
{Name: "defaultMode", Value: "foobar"},
|
||||
{Name: "headers", Children: []*parser.Node{
|
||||
{Name: "defaultMode", Value: "foobar"},
|
||||
{Name: "names", Children: []*parser.Node{
|
||||
{Name: "name0", Value: "foobar"},
|
||||
{Name: "name1", Value: "foobar"}}}}},
|
||||
{Name: "Names", Children: []*parser.Node{
|
||||
{Name: "names", Children: []*parser.Node{
|
||||
{Name: "name0", Value: "foobar"},
|
||||
{Name: "name1", Value: "foobar"}}}}},
|
||||
{Name: "FilePath", Value: "foobar"},
|
||||
{Name: "Filters", Children: []*parser.Node{
|
||||
{Name: "MinDuration", Value: "42"},
|
||||
{Name: "RetryAttempts", Value: "true"},
|
||||
{Name: "StatusCodes", Value: "foobar,foobar"}}},
|
||||
{Name: "Format", Value: "foobar"}}},
|
||||
{Name: "EntryPoints", Children: []*parser.Node{
|
||||
{Name: "filePath", Value: "foobar"},
|
||||
{Name: "filters", Children: []*parser.Node{
|
||||
{Name: "minDuration", Value: "42"},
|
||||
{Name: "retryAttempts", Value: "true"},
|
||||
{Name: "statusCodes", Value: "foobar,foobar"}}},
|
||||
{Name: "format", Value: "foobar"}}},
|
||||
{Name: "acme",
|
||||
Children: []*parser.Node{
|
||||
{Name: "acmeLogging", Value: "true"},
|
||||
{Name: "caServer", Value: "foobar"},
|
||||
{Name: "dnsChallenge", Children: []*parser.Node{
|
||||
{Name: "delayBeforeCheck", Value: "42"},
|
||||
{Name: "disablePropagationCheck", Value: "true"},
|
||||
{Name: "provider", Value: "foobar"},
|
||||
{Name: "resolvers", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "domains", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "main", Value: "foobar"},
|
||||
{Name: "sans", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "main", Value: "foobar"},
|
||||
{Name: "sans", Value: "foobar,foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "email", Value: "foobar"},
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "httpChallenge", Children: []*parser.Node{
|
||||
{Name: "entryPoint", Value: "foobar"}}},
|
||||
{Name: "keyType", Value: "foobar"},
|
||||
{Name: "onHostRule", Value: "true"},
|
||||
{Name: "storage", Value: "foobar"},
|
||||
{Name: "tlsChallenge"},
|
||||
},
|
||||
},
|
||||
{Name: "api", Children: []*parser.Node{
|
||||
{Name: "dashboard", Value: "true"},
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "middlewares", Value: "foobar,foobar"},
|
||||
{Name: "statistics", Children: []*parser.Node{
|
||||
{Name: "recentErrors", Value: "42"}}}}},
|
||||
{Name: "entryPoints", Children: []*parser.Node{
|
||||
{Name: "EntryPoint0", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "ForwardedHeaders", Children: []*parser.Node{
|
||||
{Name: "Insecure", Value: "true"},
|
||||
{Name: "TrustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "ProxyProtocol", Children: []*parser.Node{
|
||||
{Name: "Insecure", Value: "true"},
|
||||
{Name: "TrustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "Transport", Children: []*parser.Node{
|
||||
{Name: "LifeCycle", Children: []*parser.Node{
|
||||
{Name: "GraceTimeOut", Value: "42"},
|
||||
{Name: "RequestAcceptGraceTimeout", Value: "42"}}},
|
||||
{Name: "RespondingTimeouts", Children: []*parser.Node{
|
||||
{Name: "IdleTimeout", Value: "42"},
|
||||
{Name: "ReadTimeout", Value: "42"},
|
||||
{Name: "WriteTimeout", Value: "42"}}}}}}}}},
|
||||
{Name: "Global", Children: []*parser.Node{
|
||||
{Name: "CheckNewVersion", Value: "true"},
|
||||
{Name: "Debug", Value: "true"},
|
||||
{Name: "SendAnonymousUsage", Value: "true"}}},
|
||||
{Name: "HostResolver", Children: []*parser.Node{
|
||||
{Name: "CnameFlattening", Value: "true"},
|
||||
{Name: "ResolvConfig", Value: "foobar"},
|
||||
{Name: "ResolvDepth", Value: "42"}}},
|
||||
{Name: "Log", Children: []*parser.Node{
|
||||
{Name: "FilePath", Value: "foobar"},
|
||||
{Name: "Format", Value: "foobar"},
|
||||
{Name: "Level", Value: "foobar"}}},
|
||||
{Name: "Metrics", Children: []*parser.Node{
|
||||
{Name: "Datadog", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "PushInterval", Value: "10s"}}},
|
||||
{Name: "InfluxDB", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "Database", Value: "foobar"},
|
||||
{Name: "Password", Value: "foobar"},
|
||||
{Name: "Protocol", Value: "foobar"},
|
||||
{Name: "PushInterval", Value: "10s"},
|
||||
{Name: "RetentionPolicy", Value: "foobar"},
|
||||
{Name: "Username", Value: "foobar"}}},
|
||||
{Name: "Prometheus", Children: []*parser.Node{
|
||||
{Name: "Buckets", Value: "42,42"},
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "Middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "StatsD", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "PushInterval", Value: "10s"}}}}},
|
||||
{Name: "Ping", Children: []*parser.Node{
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "Middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "Providers", Children: []*parser.Node{
|
||||
{Name: "Docker", Children: []*parser.Node{
|
||||
{Name: "Constraints", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "DefaultRule", Value: "foobar"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "ExposedByDefault", Value: "true"},
|
||||
{Name: "Network", Value: "foobar"},
|
||||
{Name: "SwarmMode", Value: "true"},
|
||||
{Name: "SwarmModeRefreshSeconds", Value: "42"},
|
||||
{Name: "TLS", Children: []*parser.Node{
|
||||
{Name: "CA", Value: "foobar"},
|
||||
{Name: "CAOptional", Value: "true"},
|
||||
{Name: "Cert", Value: "foobar"},
|
||||
{Name: "InsecureSkipVerify", Value: "true"},
|
||||
{Name: "Key", Value: "foobar"}}},
|
||||
{Name: "UseBindPortIP", Value: "true"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "File", Children: []*parser.Node{
|
||||
{Name: "DebugLogGeneratedTemplate", Value: "true"},
|
||||
{Name: "Directory", Value: "foobar"},
|
||||
{Name: "Filename", Value: "foobar"},
|
||||
{Name: "TraefikFile", Value: "foobar"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "Kubernetes", Children: []*parser.Node{
|
||||
{Name: "CertAuthFilePath", Value: "foobar"},
|
||||
{Name: "DisablePassHostHeaders", Value: "true"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "IngressClass", Value: "foobar"},
|
||||
{Name: "IngressEndpoint", Children: []*parser.Node{
|
||||
{Name: "Hostname", Value: "foobar"},
|
||||
{Name: "IP", Value: "foobar"},
|
||||
{Name: "PublishedService", Value: "foobar"}}},
|
||||
{Name: "LabelSelector", Value: "foobar"},
|
||||
{Name: "Namespaces", Value: "foobar,foobar"},
|
||||
{Name: "Token", Value: "foobar"}}},
|
||||
{Name: "KubernetesCRD",
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "forwardedHeaders", Children: []*parser.Node{
|
||||
{Name: "insecure", Value: "true"},
|
||||
{Name: "trustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "proxyProtocol", Children: []*parser.Node{
|
||||
{Name: "insecure", Value: "true"},
|
||||
{Name: "trustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "transport", Children: []*parser.Node{
|
||||
{Name: "lifeCycle", Children: []*parser.Node{
|
||||
{Name: "graceTimeOut", Value: "42"},
|
||||
{Name: "requestAcceptGraceTimeout", Value: "42"}}},
|
||||
{Name: "respondingTimeouts", Children: []*parser.Node{
|
||||
{Name: "idleTimeout", Value: "42"},
|
||||
{Name: "readTimeout", Value: "42"},
|
||||
{Name: "writeTimeout", Value: "42"}}}}}}}}},
|
||||
{Name: "global", Children: []*parser.Node{
|
||||
{Name: "checkNewVersion", Value: "true"},
|
||||
{Name: "sendAnonymousUsage", Value: "true"}}},
|
||||
{Name: "hostResolver", Children: []*parser.Node{
|
||||
{Name: "cnameFlattening", Value: "true"},
|
||||
{Name: "resolvConfig", Value: "foobar"},
|
||||
{Name: "resolvDepth", Value: "42"}}},
|
||||
{Name: "log", Children: []*parser.Node{
|
||||
{Name: "filePath", Value: "foobar"},
|
||||
{Name: "format", Value: "foobar"},
|
||||
{Name: "level", Value: "foobar"}}},
|
||||
{Name: "metrics", Children: []*parser.Node{
|
||||
{Name: "dataDog", Children: []*parser.Node{
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "pushInterval", Value: "10s"}}},
|
||||
{Name: "influxDB", Children: []*parser.Node{
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "database", Value: "foobar"},
|
||||
{Name: "password", Value: "foobar"},
|
||||
{Name: "protocol", Value: "foobar"},
|
||||
{Name: "pushInterval", Value: "10s"},
|
||||
{Name: "retentionPolicy", Value: "foobar"},
|
||||
{Name: "username", Value: "foobar"}}},
|
||||
{Name: "prometheus", Children: []*parser.Node{
|
||||
{Name: "buckets", Value: "42,42"},
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "statsD", Children: []*parser.Node{
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "pushInterval", Value: "10s"}}}}},
|
||||
{Name: "ping", Children: []*parser.Node{
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "providers", Children: []*parser.Node{
|
||||
{Name: "docker", Children: []*parser.Node{
|
||||
{Name: "constraints", Value: "foobar"},
|
||||
{Name: "defaultRule", Value: "foobar"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "exposedByDefault", Value: "true"},
|
||||
{Name: "network", Value: "foobar"},
|
||||
{Name: "swarmMode", Value: "true"},
|
||||
{Name: "swarmModeRefreshSeconds", Value: "42"},
|
||||
{Name: "tls", Children: []*parser.Node{
|
||||
{Name: "ca", Value: "foobar"},
|
||||
{Name: "caOptional", Value: "true"},
|
||||
{Name: "cert", Value: "foobar"},
|
||||
{Name: "insecureSkipVerify", Value: "true"},
|
||||
{Name: "key", Value: "foobar"}}},
|
||||
{Name: "useBindPortIP", Value: "true"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "file", Children: []*parser.Node{
|
||||
{Name: "debugLogGeneratedTemplate", Value: "true"},
|
||||
{Name: "directory", Value: "foobar"},
|
||||
{Name: "filename", Value: "foobar"},
|
||||
{Name: "traefikFile", Value: "foobar"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "kubernetes", Children: []*parser.Node{
|
||||
{Name: "certAuthFilePath", Value: "foobar"},
|
||||
{Name: "disablePassHostHeaders", Value: "true"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "ingressClass", Value: "foobar"},
|
||||
{Name: "ingressEndpoint", Children: []*parser.Node{
|
||||
{Name: "hostname", Value: "foobar"},
|
||||
{Name: "ip", Value: "foobar"},
|
||||
{Name: "publishedService", Value: "foobar"}}},
|
||||
{Name: "labelSelector", Value: "foobar"},
|
||||
{Name: "namespaces", Value: "foobar,foobar"},
|
||||
{Name: "token", Value: "foobar"}}},
|
||||
{Name: "kubernetesCRD",
|
||||
Children: []*parser.Node{
|
||||
{Name: "CertAuthFilePath", Value: "foobar"},
|
||||
{Name: "DisablePassHostHeaders", Value: "true"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "IngressClass", Value: "foobar"},
|
||||
{Name: "LabelSelector", Value: "foobar"},
|
||||
{Name: "Namespaces", Value: "foobar,foobar"},
|
||||
{Name: "Token", Value: "foobar"}}},
|
||||
{Name: "Marathon", Children: []*parser.Node{
|
||||
{Name: "Basic", Children: []*parser.Node{
|
||||
{Name: "HTTPBasicAuthUser", Value: "foobar"},
|
||||
{Name: "HTTPBasicPassword", Value: "foobar"}}},
|
||||
{Name: "Constraints", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "DCOSToken", Value: "foobar"},
|
||||
{Name: "DefaultRule", Value: "foobar"},
|
||||
{Name: "DialerTimeout", Value: "42"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "ExposedByDefault", Value: "true"},
|
||||
{Name: "ForceTaskHostname", Value: "true"},
|
||||
{Name: "KeepAlive", Value: "42"},
|
||||
{Name: "RespectReadinessChecks", Value: "true"},
|
||||
{Name: "ResponseHeaderTimeout", Value: "42"},
|
||||
{Name: "TLS", Children: []*parser.Node{
|
||||
{Name: "CA", Value: "foobar"},
|
||||
{Name: "CAOptional", Value: "true"},
|
||||
{Name: "Cert", Value: "foobar"},
|
||||
{Name: "InsecureSkipVerify", Value: "true"},
|
||||
{Name: "Key", Value: "foobar"}}},
|
||||
{Name: "TLSHandshakeTimeout", Value: "42"},
|
||||
{Name: "Trace", Value: "true"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "ProvidersThrottleDuration", Value: "42"},
|
||||
{Name: "Rancher", Children: []*parser.Node{
|
||||
{Name: "Constraints", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "DefaultRule", Value: "foobar"},
|
||||
{Name: "EnableServiceHealthFilter", Value: "true"},
|
||||
{Name: "ExposedByDefault", Value: "true"},
|
||||
{Name: "IntervalPoll", Value: "true"},
|
||||
{Name: "Prefix", Value: "foobar"},
|
||||
{Name: "RefreshSeconds", Value: "42"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "Rest", Children: []*parser.Node{
|
||||
{Name: "EntryPoint", Value: "foobar"}}}}},
|
||||
{Name: "ServersTransport", Children: []*parser.Node{
|
||||
{Name: "ForwardingTimeouts", Children: []*parser.Node{
|
||||
{Name: "DialTimeout", Value: "42"},
|
||||
{Name: "ResponseHeaderTimeout", Value: "42"}}},
|
||||
{Name: "InsecureSkipVerify", Value: "true"},
|
||||
{Name: "MaxIdleConnsPerHost", Value: "42"},
|
||||
{Name: "RootCAs", Value: "foobar,foobar"}}},
|
||||
{Name: "Tracing", Children: []*parser.Node{
|
||||
{Name: "DataDog", Children: []*parser.Node{
|
||||
{Name: "BagagePrefixHeaderName", Value: "foobar"},
|
||||
{Name: "Debug", Value: "true"},
|
||||
{Name: "GlobalTag", Value: "foobar"},
|
||||
{Name: "LocalAgentHostPort", Value: "foobar"},
|
||||
{Name: "ParentIDHeaderName", Value: "foobar"},
|
||||
{Name: "PrioritySampling", Value: "true"},
|
||||
{Name: "SamplingPriorityHeaderName", Value: "foobar"},
|
||||
{Name: "TraceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "Haystack", Children: []*parser.Node{
|
||||
{Name: "GlobalTag", Value: "foobar"},
|
||||
{Name: "LocalAgentHost", Value: "foobar"},
|
||||
{Name: "LocalAgentPort", Value: "42"},
|
||||
{Name: "ParentIDHeaderName", Value: "foobar"},
|
||||
{Name: "SpanIDHeaderName", Value: "foobar"},
|
||||
{Name: "TraceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "Instana", Children: []*parser.Node{
|
||||
{Name: "LocalAgentHost", Value: "foobar"},
|
||||
{Name: "LocalAgentPort", Value: "42"},
|
||||
{Name: "LogLevel", Value: "foobar"}}},
|
||||
{Name: "Jaeger", Children: []*parser.Node{
|
||||
{Name: "Gen128Bit", Value: "true"},
|
||||
{Name: "LocalAgentHostPort", Value: "foobar"},
|
||||
{Name: "Propagation", Value: "foobar"},
|
||||
{Name: "SamplingParam", Value: "42"},
|
||||
{Name: "SamplingServerURL", Value: "foobar"},
|
||||
{Name: "SamplingType", Value: "foobar"},
|
||||
{Name: "TraceContextHeaderName", Value: "foobar"}}},
|
||||
{Name: "ServiceName", Value: "foobar"},
|
||||
{Name: "SpanNameLimit", Value: "42"},
|
||||
{Name: "Zipkin", Children: []*parser.Node{
|
||||
{Name: "Debug", Value: "true"},
|
||||
{Name: "HTTPEndpoint", Value: "foobar"},
|
||||
{Name: "ID128Bit", Value: "true"},
|
||||
{Name: "SameSpan", Value: "true"},
|
||||
{Name: "SampleRate", Value: "42"}}}}}},
|
||||
{Name: "certAuthFilePath", Value: "foobar"},
|
||||
{Name: "disablePassHostHeaders", Value: "true"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "ingressClass", Value: "foobar"},
|
||||
{Name: "labelSelector", Value: "foobar"},
|
||||
{Name: "namespaces", Value: "foobar,foobar"},
|
||||
{Name: "token", Value: "foobar"}}},
|
||||
{Name: "marathon", Children: []*parser.Node{
|
||||
{Name: "basic", Children: []*parser.Node{
|
||||
{Name: "httpBasicAuthUser", Value: "foobar"},
|
||||
{Name: "httpBasicPassword", Value: "foobar"}}},
|
||||
{Name: "constraints", Value: "foobar"},
|
||||
{Name: "dcosToken", Value: "foobar"},
|
||||
{Name: "defaultRule", Value: "foobar"},
|
||||
{Name: "dialerTimeout", Value: "42"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "exposedByDefault", Value: "true"},
|
||||
{Name: "forceTaskHostname", Value: "true"},
|
||||
{Name: "keepAlive", Value: "42"},
|
||||
{Name: "respectReadinessChecks", Value: "true"},
|
||||
{Name: "responseHeaderTimeout", Value: "42"},
|
||||
{Name: "tls", Children: []*parser.Node{
|
||||
{Name: "ca", Value: "foobar"},
|
||||
{Name: "caOptional", Value: "true"},
|
||||
{Name: "cert", Value: "foobar"},
|
||||
{Name: "insecureSkipVerify", Value: "true"},
|
||||
{Name: "key", Value: "foobar"}}},
|
||||
{Name: "tlsHandshakeTimeout", Value: "42"},
|
||||
{Name: "trace", Value: "true"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "providersThrottleDuration", Value: "42"},
|
||||
{Name: "rancher", Children: []*parser.Node{
|
||||
{Name: "constraints", Value: "foobar"},
|
||||
{Name: "defaultRule", Value: "foobar"},
|
||||
{Name: "enableServiceHealthFilter", Value: "true"},
|
||||
{Name: "exposedByDefault", Value: "true"},
|
||||
{Name: "intervalPoll", Value: "true"},
|
||||
{Name: "prefix", Value: "foobar"},
|
||||
{Name: "refreshSeconds", Value: "42"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "rest", Children: []*parser.Node{
|
||||
{Name: "entryPoint", Value: "foobar"}}}}},
|
||||
{Name: "serversTransport", Children: []*parser.Node{
|
||||
{Name: "forwardingTimeouts", Children: []*parser.Node{
|
||||
{Name: "dialTimeout", Value: "42"},
|
||||
{Name: "idleConnTimeout", Value: "42"},
|
||||
{Name: "responseHeaderTimeout", Value: "42"}}},
|
||||
{Name: "insecureSkipVerify", Value: "true"},
|
||||
{Name: "maxIdleConnsPerHost", Value: "42"},
|
||||
{Name: "rootCAs", Value: "foobar,foobar"}}},
|
||||
{Name: "tracing", Children: []*parser.Node{
|
||||
{Name: "dataDog", Children: []*parser.Node{
|
||||
{Name: "bagagePrefixHeaderName", Value: "foobar"},
|
||||
{Name: "debug", Value: "true"},
|
||||
{Name: "globalTag", Value: "foobar"},
|
||||
{Name: "localAgentHostPort", Value: "foobar"},
|
||||
{Name: "parentIDHeaderName", Value: "foobar"},
|
||||
{Name: "prioritySampling", Value: "true"},
|
||||
{Name: "samplingPriorityHeaderName", Value: "foobar"},
|
||||
{Name: "traceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "haystack", Children: []*parser.Node{
|
||||
{Name: "globalTag", Value: "foobar"},
|
||||
{Name: "localAgentHost", Value: "foobar"},
|
||||
{Name: "localAgentPort", Value: "42"},
|
||||
{Name: "parentIDHeaderName", Value: "foobar"},
|
||||
{Name: "spanIDHeaderName", Value: "foobar"},
|
||||
{Name: "traceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "instana", Children: []*parser.Node{
|
||||
{Name: "localAgentHost", Value: "foobar"},
|
||||
{Name: "localAgentPort", Value: "42"},
|
||||
{Name: "logLevel", Value: "foobar"}}},
|
||||
{Name: "jaeger", Children: []*parser.Node{
|
||||
{Name: "gen128Bit", Value: "true"},
|
||||
{Name: "localAgentHostPort", Value: "foobar"},
|
||||
{Name: "propagation", Value: "foobar"},
|
||||
{Name: "samplingParam", Value: "42"},
|
||||
{Name: "samplingServerURL", Value: "foobar"},
|
||||
{Name: "samplingType", Value: "foobar"},
|
||||
{Name: "traceContextHeaderName", Value: "foobar"}}},
|
||||
{Name: "serviceName", Value: "foobar"},
|
||||
{Name: "spanNameLimit", Value: "42"},
|
||||
{Name: "zipkin", Children: []*parser.Node{
|
||||
{Name: "debug", Value: "true"},
|
||||
{Name: "httpEndpoint", Value: "foobar"},
|
||||
{Name: "id128Bit", Value: "true"},
|
||||
{Name: "sameSpan", Value: "true"},
|
||||
{Name: "sampleRate", Value: "42"}}}}},
|
||||
},
|
||||
}
|
||||
|
||||
assert.Equal(t, expected, node)
|
||||
|
@ -342,267 +310,235 @@ func Test_decodeFileToNode_Yaml(t *testing.T) {
|
|||
expected := &parser.Node{
|
||||
Name: "traefik",
|
||||
Children: []*parser.Node{
|
||||
{Name: "ACME",
|
||||
Children: []*parser.Node{
|
||||
{Name: "ACMELogging", Value: "true"},
|
||||
{Name: "CAServer", Value: "foobar"},
|
||||
{Name: "DNSChallenge", Children: []*parser.Node{
|
||||
{Name: "DelayBeforeCheck", Value: "42"},
|
||||
{Name: "DisablePropagationCheck", Value: "true"},
|
||||
{Name: "Provider", Value: "foobar"},
|
||||
{Name: "Resolvers", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "Domains", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Main", Value: "foobar"},
|
||||
{Name: "SANs", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Main", Value: "foobar"},
|
||||
{Name: "SANs", Value: "foobar,foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "Email", Value: "foobar"},
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "HTTPChallenge", Children: []*parser.Node{
|
||||
{Name: "EntryPoint", Value: "foobar"}}},
|
||||
{Name: "KeyType", Value: "foobar"},
|
||||
{Name: "OnHostRule", Value: "true"},
|
||||
{Name: "Storage", Value: "foobar"},
|
||||
{Name: "TLSChallenge"},
|
||||
},
|
||||
},
|
||||
{Name: "API", Children: []*parser.Node{
|
||||
{Name: "Dashboard", Value: "true"},
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "Middlewares", Value: "foobar,foobar"},
|
||||
{Name: "Statistics", Children: []*parser.Node{
|
||||
{Name: "RecentErrors", Value: "42"}}}}},
|
||||
{Name: "AccessLog", Children: []*parser.Node{
|
||||
{Name: "BufferingSize", Value: "42"},
|
||||
{Name: "Fields", Children: []*parser.Node{
|
||||
{Name: "DefaultMode", Value: "foobar"},
|
||||
{Name: "Headers", Children: []*parser.Node{
|
||||
{Name: "DefaultMode", Value: "foobar"},
|
||||
{Name: "Names", Children: []*parser.Node{
|
||||
{Name: "accessLog", Children: []*parser.Node{
|
||||
{Name: "bufferingSize", Value: "42"},
|
||||
{Name: "fields", Children: []*parser.Node{
|
||||
{Name: "defaultMode", Value: "foobar"},
|
||||
{Name: "headers", Children: []*parser.Node{
|
||||
{Name: "defaultMode", Value: "foobar"},
|
||||
{Name: "names", Children: []*parser.Node{
|
||||
{Name: "name0", Value: "foobar"},
|
||||
{Name: "name1", Value: "foobar"}}}}},
|
||||
{Name: "Names", Children: []*parser.Node{
|
||||
{Name: "names", Children: []*parser.Node{
|
||||
{Name: "name0", Value: "foobar"},
|
||||
{Name: "name1", Value: "foobar"}}}}},
|
||||
{Name: "FilePath", Value: "foobar"},
|
||||
{Name: "Filters", Children: []*parser.Node{
|
||||
{Name: "MinDuration", Value: "42"},
|
||||
{Name: "RetryAttempts", Value: "true"},
|
||||
{Name: "StatusCodes", Value: "foobar,foobar"}}},
|
||||
{Name: "Format", Value: "foobar"}}},
|
||||
{Name: "EntryPoints", Children: []*parser.Node{
|
||||
{Name: "filePath", Value: "foobar"},
|
||||
{Name: "filters", Children: []*parser.Node{
|
||||
{Name: "minDuration", Value: "42"},
|
||||
{Name: "retryAttempts", Value: "true"},
|
||||
{Name: "statusCodes", Value: "foobar,foobar"}}},
|
||||
{Name: "format", Value: "foobar"}}},
|
||||
{Name: "acme",
|
||||
Children: []*parser.Node{
|
||||
{Name: "acmeLogging", Value: "true"},
|
||||
{Name: "caServer", Value: "foobar"},
|
||||
{Name: "dnsChallenge", Children: []*parser.Node{
|
||||
{Name: "delayBeforeCheck", Value: "42"},
|
||||
{Name: "disablePropagationCheck", Value: "true"},
|
||||
{Name: "provider", Value: "foobar"},
|
||||
{Name: "resolvers", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "domains", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "main", Value: "foobar"},
|
||||
{Name: "sans", Value: "foobar,foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "main", Value: "foobar"},
|
||||
{Name: "sans", Value: "foobar,foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "email", Value: "foobar"},
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "httpChallenge", Children: []*parser.Node{
|
||||
{Name: "entryPoint", Value: "foobar"}}},
|
||||
{Name: "keyType", Value: "foobar"},
|
||||
{Name: "onHostRule", Value: "true"},
|
||||
{Name: "storage", Value: "foobar"},
|
||||
{Name: "tlsChallenge"},
|
||||
},
|
||||
},
|
||||
{Name: "api", Children: []*parser.Node{
|
||||
{Name: "dashboard", Value: "true"},
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "middlewares", Value: "foobar,foobar"},
|
||||
{Name: "statistics", Children: []*parser.Node{
|
||||
{Name: "recentErrors", Value: "42"}}}}},
|
||||
{Name: "entryPoints", Children: []*parser.Node{
|
||||
{Name: "EntryPoint0", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "ForwardedHeaders", Children: []*parser.Node{
|
||||
{Name: "Insecure", Value: "true"},
|
||||
{Name: "TrustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "ProxyProtocol", Children: []*parser.Node{
|
||||
{Name: "Insecure", Value: "true"},
|
||||
{Name: "TrustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "Transport", Children: []*parser.Node{
|
||||
{Name: "LifeCycle", Children: []*parser.Node{
|
||||
{Name: "GraceTimeOut", Value: "42"},
|
||||
{Name: "RequestAcceptGraceTimeout", Value: "42"}}},
|
||||
{Name: "RespondingTimeouts", Children: []*parser.Node{
|
||||
{Name: "IdleTimeout", Value: "42"},
|
||||
{Name: "ReadTimeout", Value: "42"},
|
||||
{Name: "WriteTimeout", Value: "42"}}}}}}}}},
|
||||
{Name: "Global", Children: []*parser.Node{
|
||||
{Name: "CheckNewVersion", Value: "true"},
|
||||
{Name: "Debug", Value: "true"},
|
||||
{Name: "SendAnonymousUsage", Value: "true"}}},
|
||||
{Name: "HostResolver", Children: []*parser.Node{
|
||||
{Name: "CnameFlattening", Value: "true"},
|
||||
{Name: "ResolvConfig", Value: "foobar"},
|
||||
{Name: "ResolvDepth", Value: "42"}}},
|
||||
{Name: "Log", Children: []*parser.Node{
|
||||
{Name: "FilePath", Value: "foobar"},
|
||||
{Name: "Format", Value: "foobar"},
|
||||
{Name: "Level", Value: "foobar"}}},
|
||||
{Name: "Metrics", Children: []*parser.Node{
|
||||
{Name: "Datadog", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "PushInterval", Value: "10s"}}},
|
||||
{Name: "InfluxDB", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "Database", Value: "foobar"},
|
||||
{Name: "Password", Value: "foobar"},
|
||||
{Name: "Protocol", Value: "foobar"},
|
||||
{Name: "PushInterval", Value: "10s"},
|
||||
{Name: "RetentionPolicy", Value: "foobar"},
|
||||
{Name: "Username", Value: "foobar"}}},
|
||||
{Name: "Prometheus", Children: []*parser.Node{
|
||||
{Name: "Buckets", Value: "42,42"},
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "Middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "StatsD", Children: []*parser.Node{
|
||||
{Name: "Address", Value: "foobar"},
|
||||
{Name: "PushInterval", Value: "10s"}}}}},
|
||||
{Name: "Ping", Children: []*parser.Node{
|
||||
{Name: "EntryPoint", Value: "foobar"},
|
||||
{Name: "Middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "Providers", Children: []*parser.Node{
|
||||
{Name: "Docker", Children: []*parser.Node{
|
||||
{Name: "Constraints", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "DefaultRule", Value: "foobar"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "ExposedByDefault", Value: "true"},
|
||||
{Name: "Network", Value: "foobar"},
|
||||
{Name: "SwarmMode", Value: "true"},
|
||||
{Name: "SwarmModeRefreshSeconds", Value: "42"},
|
||||
{Name: "TLS", Children: []*parser.Node{
|
||||
{Name: "CA", Value: "foobar"},
|
||||
{Name: "CAOptional", Value: "true"},
|
||||
{Name: "Cert", Value: "foobar"},
|
||||
{Name: "InsecureSkipVerify", Value: "true"},
|
||||
{Name: "Key", Value: "foobar"}}},
|
||||
{Name: "UseBindPortIP", Value: "true"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "File", Children: []*parser.Node{
|
||||
{Name: "DebugLogGeneratedTemplate", Value: "true"},
|
||||
{Name: "Directory", Value: "foobar"},
|
||||
{Name: "Filename", Value: "foobar"},
|
||||
{Name: "TraefikFile", Value: "foobar"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "Kubernetes", Children: []*parser.Node{
|
||||
{Name: "CertAuthFilePath", Value: "foobar"},
|
||||
{Name: "DisablePassHostHeaders", Value: "true"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "IngressClass", Value: "foobar"},
|
||||
{Name: "IngressEndpoint", Children: []*parser.Node{
|
||||
{Name: "Hostname", Value: "foobar"},
|
||||
{Name: "IP", Value: "foobar"},
|
||||
{Name: "PublishedService", Value: "foobar"}}},
|
||||
{Name: "LabelSelector", Value: "foobar"},
|
||||
{Name: "Namespaces", Value: "foobar,foobar"},
|
||||
{Name: "Token", Value: "foobar"}}},
|
||||
{Name: "KubernetesCRD",
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "forwardedHeaders", Children: []*parser.Node{
|
||||
{Name: "insecure", Value: "true"},
|
||||
{Name: "trustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "proxyProtocol", Children: []*parser.Node{
|
||||
{Name: "insecure", Value: "true"},
|
||||
{Name: "trustedIPs", Value: "foobar,foobar"}}},
|
||||
{Name: "transport", Children: []*parser.Node{
|
||||
{Name: "lifeCycle", Children: []*parser.Node{
|
||||
{Name: "graceTimeOut", Value: "42"},
|
||||
{Name: "requestAcceptGraceTimeout", Value: "42"}}},
|
||||
{Name: "respondingTimeouts", Children: []*parser.Node{
|
||||
{Name: "idleTimeout", Value: "42"},
|
||||
{Name: "readTimeout", Value: "42"},
|
||||
{Name: "writeTimeout", Value: "42"}}}}}}}}},
|
||||
{Name: "global", Children: []*parser.Node{
|
||||
{Name: "checkNewVersion", Value: "true"},
|
||||
{Name: "sendAnonymousUsage", Value: "true"}}},
|
||||
{Name: "hostResolver", Children: []*parser.Node{
|
||||
{Name: "cnameFlattening", Value: "true"},
|
||||
{Name: "resolvConfig", Value: "foobar"},
|
||||
{Name: "resolvDepth", Value: "42"}}},
|
||||
{Name: "log", Children: []*parser.Node{
|
||||
{Name: "filePath", Value: "foobar"},
|
||||
{Name: "format", Value: "foobar"},
|
||||
{Name: "level", Value: "foobar"}}},
|
||||
{Name: "metrics", Children: []*parser.Node{
|
||||
{Name: "dataDog", Children: []*parser.Node{
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "pushInterval", Value: "10s"}}},
|
||||
{Name: "influxDB", Children: []*parser.Node{
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "database", Value: "foobar"},
|
||||
{Name: "password", Value: "foobar"},
|
||||
{Name: "protocol", Value: "foobar"},
|
||||
{Name: "pushInterval", Value: "10s"},
|
||||
{Name: "retentionPolicy", Value: "foobar"},
|
||||
{Name: "username", Value: "foobar"}}},
|
||||
{Name: "prometheus", Children: []*parser.Node{
|
||||
{Name: "buckets", Value: "42,42"},
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "statsD", Children: []*parser.Node{
|
||||
{Name: "address", Value: "foobar"},
|
||||
{Name: "pushInterval", Value: "10s"}}}}},
|
||||
{Name: "ping", Children: []*parser.Node{
|
||||
{Name: "entryPoint", Value: "foobar"},
|
||||
{Name: "middlewares", Value: "foobar,foobar"}}},
|
||||
{Name: "providers", Children: []*parser.Node{
|
||||
{Name: "docker", Children: []*parser.Node{
|
||||
{Name: "constraints", Value: "foobar"},
|
||||
{Name: "defaultRule", Value: "foobar"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "exposedByDefault", Value: "true"},
|
||||
{Name: "network", Value: "foobar"},
|
||||
{Name: "swarmMode", Value: "true"},
|
||||
{Name: "swarmModeRefreshSeconds", Value: "42"},
|
||||
{Name: "tls", Children: []*parser.Node{
|
||||
{Name: "ca", Value: "foobar"},
|
||||
{Name: "caOptional", Value: "true"},
|
||||
{Name: "cert", Value: "foobar"},
|
||||
{Name: "insecureSkipVerify", Value: "true"},
|
||||
{Name: "key", Value: "foobar"}}},
|
||||
{Name: "useBindPortIP", Value: "true"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "file", Children: []*parser.Node{
|
||||
{Name: "debugLogGeneratedTemplate", Value: "true"},
|
||||
{Name: "directory", Value: "foobar"},
|
||||
{Name: "filename", Value: "foobar"},
|
||||
{Name: "traefikFile", Value: "foobar"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "kubernetes", Children: []*parser.Node{
|
||||
{Name: "certAuthFilePath", Value: "foobar"},
|
||||
{Name: "disablePassHostHeaders", Value: "true"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "ingressClass", Value: "foobar"},
|
||||
{Name: "ingressEndpoint", Children: []*parser.Node{
|
||||
{Name: "hostname", Value: "foobar"},
|
||||
{Name: "ip", Value: "foobar"},
|
||||
{Name: "publishedService", Value: "foobar"}}},
|
||||
{Name: "labelSelector", Value: "foobar"},
|
||||
{Name: "namespaces", Value: "foobar,foobar"},
|
||||
{Name: "token", Value: "foobar"}}},
|
||||
{Name: "kubernetesCRD",
|
||||
Children: []*parser.Node{
|
||||
{Name: "CertAuthFilePath", Value: "foobar"},
|
||||
{Name: "DisablePassHostHeaders", Value: "true"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "IngressClass", Value: "foobar"},
|
||||
{Name: "LabelSelector", Value: "foobar"},
|
||||
{Name: "Namespaces", Value: "foobar,foobar"},
|
||||
{Name: "Token", Value: "foobar"}}},
|
||||
{Name: "Marathon", Children: []*parser.Node{
|
||||
{Name: "Basic", Children: []*parser.Node{
|
||||
{Name: "HTTPBasicAuthUser", Value: "foobar"},
|
||||
{Name: "HTTPBasicPassword", Value: "foobar"}}},
|
||||
{Name: "Constraints", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "DCOSToken", Value: "foobar"},
|
||||
{Name: "DefaultRule", Value: "foobar"},
|
||||
{Name: "DialerTimeout", Value: "42"},
|
||||
{Name: "Endpoint", Value: "foobar"},
|
||||
{Name: "ExposedByDefault", Value: "true"},
|
||||
{Name: "ForceTaskHostname", Value: "true"},
|
||||
{Name: "KeepAlive", Value: "42"},
|
||||
{Name: "RespectReadinessChecks", Value: "true"},
|
||||
{Name: "ResponseHeaderTimeout", Value: "42"},
|
||||
{Name: "TLS", Children: []*parser.Node{
|
||||
{Name: "CA", Value: "foobar"},
|
||||
{Name: "CAOptional", Value: "true"},
|
||||
{Name: "Cert", Value: "foobar"},
|
||||
{Name: "InsecureSkipVerify", Value: "true"},
|
||||
{Name: "Key", Value: "foobar"}}},
|
||||
{Name: "TLSHandshakeTimeout", Value: "42"},
|
||||
{Name: "Trace", Value: "true"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "ProvidersThrottleDuration", Value: "42"},
|
||||
{Name: "Rancher", Children: []*parser.Node{
|
||||
{Name: "Constraints", Children: []*parser.Node{
|
||||
{Name: "[0]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
{Name: "[1]", Children: []*parser.Node{
|
||||
{Name: "Key", Value: "foobar"},
|
||||
{Name: "MustMatch", Value: "true"},
|
||||
{Name: "Value", Value: "foobar"},
|
||||
}},
|
||||
}},
|
||||
{Name: "DefaultRule", Value: "foobar"},
|
||||
{Name: "EnableServiceHealthFilter", Value: "true"},
|
||||
{Name: "ExposedByDefault", Value: "true"},
|
||||
{Name: "IntervalPoll", Value: "true"},
|
||||
{Name: "Prefix", Value: "foobar"},
|
||||
{Name: "RefreshSeconds", Value: "42"},
|
||||
{Name: "Watch", Value: "true"}}},
|
||||
{Name: "Rest", Children: []*parser.Node{
|
||||
{Name: "EntryPoint", Value: "foobar"}}}}},
|
||||
{Name: "ServersTransport", Children: []*parser.Node{
|
||||
{Name: "ForwardingTimeouts", Children: []*parser.Node{
|
||||
{Name: "DialTimeout", Value: "42"},
|
||||
{Name: "ResponseHeaderTimeout", Value: "42"}}},
|
||||
{Name: "InsecureSkipVerify", Value: "true"},
|
||||
{Name: "MaxIdleConnsPerHost", Value: "42"},
|
||||
{Name: "RootCAs", Value: "foobar,foobar"}}},
|
||||
{Name: "Tracing", Children: []*parser.Node{
|
||||
{Name: "DataDog", Children: []*parser.Node{
|
||||
{Name: "BagagePrefixHeaderName", Value: "foobar"},
|
||||
{Name: "Debug", Value: "true"},
|
||||
{Name: "GlobalTag", Value: "foobar"},
|
||||
{Name: "LocalAgentHostPort", Value: "foobar"},
|
||||
{Name: "ParentIDHeaderName", Value: "foobar"},
|
||||
{Name: "PrioritySampling", Value: "true"},
|
||||
{Name: "SamplingPriorityHeaderName", Value: "foobar"},
|
||||
{Name: "TraceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "Haystack", Children: []*parser.Node{
|
||||
{Name: "GlobalTag", Value: "foobar"},
|
||||
{Name: "LocalAgentHost", Value: "foobar"},
|
||||
{Name: "LocalAgentPort", Value: "42"},
|
||||
{Name: "ParentIDHeaderName", Value: "foobar"},
|
||||
{Name: "SpanIDHeaderName", Value: "foobar"},
|
||||
{Name: "TraceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "Instana", Children: []*parser.Node{
|
||||
{Name: "LocalAgentHost", Value: "foobar"},
|
||||
{Name: "LocalAgentPort", Value: "42"},
|
||||
{Name: "LogLevel", Value: "foobar"}}},
|
||||
{Name: "Jaeger", Children: []*parser.Node{
|
||||
{Name: "Gen128Bit", Value: "true"},
|
||||
{Name: "LocalAgentHostPort", Value: "foobar"},
|
||||
{Name: "Propagation", Value: "foobar"},
|
||||
{Name: "SamplingParam", Value: "42"},
|
||||
{Name: "SamplingServerURL", Value: "foobar"},
|
||||
{Name: "SamplingType", Value: "foobar"},
|
||||
{Name: "TraceContextHeaderName", Value: "foobar"}}},
|
||||
{Name: "ServiceName", Value: "foobar"},
|
||||
{Name: "SpanNameLimit", Value: "42"},
|
||||
{Name: "Zipkin", Children: []*parser.Node{
|
||||
{Name: "Debug", Value: "true"},
|
||||
{Name: "HTTPEndpoint", Value: "foobar"},
|
||||
{Name: "ID128Bit", Value: "true"},
|
||||
{Name: "SameSpan", Value: "true"},
|
||||
{Name: "SampleRate", Value: "42"}}}}}},
|
||||
{Name: "certAuthFilePath", Value: "foobar"},
|
||||
{Name: "disablePassHostHeaders", Value: "true"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "ingressClass", Value: "foobar"},
|
||||
{Name: "labelSelector", Value: "foobar"},
|
||||
{Name: "namespaces", Value: "foobar,foobar"},
|
||||
{Name: "token", Value: "foobar"}}},
|
||||
{Name: "marathon", Children: []*parser.Node{
|
||||
{Name: "basic", Children: []*parser.Node{
|
||||
{Name: "httpBasicAuthUser", Value: "foobar"},
|
||||
{Name: "httpBasicPassword", Value: "foobar"}}},
|
||||
{Name: "constraints", Value: "foobar"},
|
||||
{Name: "dcosToken", Value: "foobar"},
|
||||
{Name: "defaultRule", Value: "foobar"},
|
||||
{Name: "dialerTimeout", Value: "42"},
|
||||
{Name: "endpoint", Value: "foobar"},
|
||||
{Name: "exposedByDefault", Value: "true"},
|
||||
{Name: "forceTaskHostname", Value: "true"},
|
||||
{Name: "keepAlive", Value: "42"},
|
||||
{Name: "respectReadinessChecks", Value: "true"},
|
||||
{Name: "responseHeaderTimeout", Value: "42"},
|
||||
{Name: "tls", Children: []*parser.Node{
|
||||
{Name: "ca", Value: "foobar"},
|
||||
{Name: "caOptional", Value: "true"},
|
||||
{Name: "cert", Value: "foobar"},
|
||||
{Name: "insecureSkipVerify", Value: "true"},
|
||||
{Name: "key", Value: "foobar"}}},
|
||||
{Name: "tlsHandshakeTimeout", Value: "42"},
|
||||
{Name: "trace", Value: "true"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "providersThrottleDuration", Value: "42"},
|
||||
{Name: "rancher", Children: []*parser.Node{
|
||||
{Name: "constraints", Value: "foobar"},
|
||||
{Name: "defaultRule", Value: "foobar"},
|
||||
{Name: "enableServiceHealthFilter", Value: "true"},
|
||||
{Name: "exposedByDefault", Value: "true"},
|
||||
{Name: "intervalPoll", Value: "true"},
|
||||
{Name: "prefix", Value: "foobar"},
|
||||
{Name: "refreshSeconds", Value: "42"},
|
||||
{Name: "watch", Value: "true"}}},
|
||||
{Name: "rest", Children: []*parser.Node{
|
||||
{Name: "entryPoint", Value: "foobar"}}}}},
|
||||
{Name: "serversTransport", Children: []*parser.Node{
|
||||
{Name: "forwardingTimeouts", Children: []*parser.Node{
|
||||
{Name: "dialTimeout", Value: "42"},
|
||||
{Name: "idleConnTimeout", Value: "42"},
|
||||
{Name: "responseHeaderTimeout", Value: "42"}}},
|
||||
{Name: "insecureSkipVerify", Value: "true"},
|
||||
{Name: "maxIdleConnsPerHost", Value: "42"},
|
||||
{Name: "rootCAs", Value: "foobar,foobar"}}},
|
||||
{Name: "tracing", Children: []*parser.Node{
|
||||
{Name: "dataDog", Children: []*parser.Node{
|
||||
{Name: "bagagePrefixHeaderName", Value: "foobar"},
|
||||
{Name: "debug", Value: "true"},
|
||||
{Name: "globalTag", Value: "foobar"},
|
||||
{Name: "localAgentHostPort", Value: "foobar"},
|
||||
{Name: "parentIDHeaderName", Value: "foobar"},
|
||||
{Name: "prioritySampling", Value: "true"},
|
||||
{Name: "samplingPriorityHeaderName", Value: "foobar"},
|
||||
{Name: "traceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "haystack", Children: []*parser.Node{
|
||||
{Name: "globalTag", Value: "foobar"},
|
||||
{Name: "localAgentHost", Value: "foobar"},
|
||||
{Name: "localAgentPort", Value: "42"},
|
||||
{Name: "parentIDHeaderName", Value: "foobar"},
|
||||
{Name: "spanIDHeaderName", Value: "foobar"},
|
||||
{Name: "traceIDHeaderName", Value: "foobar"}}},
|
||||
{Name: "instana", Children: []*parser.Node{
|
||||
{Name: "localAgentHost", Value: "foobar"},
|
||||
{Name: "localAgentPort", Value: "42"},
|
||||
{Name: "logLevel", Value: "foobar"}}},
|
||||
{Name: "jaeger", Children: []*parser.Node{
|
||||
{Name: "gen128Bit", Value: "true"},
|
||||
{Name: "localAgentHostPort", Value: "foobar"},
|
||||
{Name: "propagation", Value: "foobar"},
|
||||
{Name: "samplingParam", Value: "42"},
|
||||
{Name: "samplingServerURL", Value: "foobar"},
|
||||
{Name: "samplingType", Value: "foobar"},
|
||||
{Name: "traceContextHeaderName", Value: "foobar"}}},
|
||||
{Name: "serviceName", Value: "foobar"},
|
||||
{Name: "spanNameLimit", Value: "42"},
|
||||
{Name: "zipkin", Children: []*parser.Node{
|
||||
{Name: "debug", Value: "true"},
|
||||
{Name: "httpEndpoint", Value: "foobar"},
|
||||
{Name: "id128Bit", Value: "true"},
|
||||
{Name: "sameSpan", Value: "true"},
|
||||
{Name: "sampleRate", Value: "42"}}}}},
|
||||
},
|
||||
}
|
||||
|
||||
assert.Equal(t, expected, node)
|
||||
|
|
|
@ -1,543 +1,481 @@
|
|||
[Global]
|
||||
Debug = true
|
||||
CheckNewVersion = true
|
||||
SendAnonymousUsage = true
|
||||
[global]
|
||||
checkNewVersion = true
|
||||
sendAnonymousUsage = true
|
||||
|
||||
[ServersTransport]
|
||||
InsecureSkipVerify = true
|
||||
RootCAs = ["foobar", "foobar"]
|
||||
MaxIdleConnsPerHost = 42
|
||||
[ServersTransport.ForwardingTimeouts]
|
||||
DialTimeout = 42
|
||||
ResponseHeaderTimeout = 42
|
||||
[serversTransport]
|
||||
insecureSkipVerify = true
|
||||
rootCAs = ["foobar", "foobar"]
|
||||
maxIdleConnsPerHost = 42
|
||||
[serversTransport.forwardingTimeouts]
|
||||
dialTimeout = 42
|
||||
responseHeaderTimeout = 42
|
||||
idleConnTimeout = 42
|
||||
|
||||
[EntryPoints]
|
||||
[entryPoints]
|
||||
[entryPoints.EntryPoint0]
|
||||
address = "foobar"
|
||||
[entryPoints.EntryPoint0.transport]
|
||||
[entryPoints.EntryPoint0.transport.lifeCycle]
|
||||
requestAcceptGraceTimeout = 42
|
||||
graceTimeOut = 42
|
||||
[entryPoints.EntryPoint0.transport.respondingTimeouts]
|
||||
readTimeout = 42
|
||||
writeTimeout = 42
|
||||
idleTimeout = 42
|
||||
[entryPoints.EntryPoint0.proxyProtocol]
|
||||
insecure = true
|
||||
trustedIPs = ["foobar", "foobar"]
|
||||
[entryPoints.EntryPoint0.forwardedHeaders]
|
||||
insecure = true
|
||||
trustedIPs = ["foobar", "foobar"]
|
||||
|
||||
[EntryPoints.EntryPoint0]
|
||||
Address = "foobar"
|
||||
[EntryPoints.EntryPoint0.Transport]
|
||||
[EntryPoints.EntryPoint0.Transport.LifeCycle]
|
||||
RequestAcceptGraceTimeout = 42
|
||||
GraceTimeOut = 42
|
||||
[EntryPoints.EntryPoint0.Transport.RespondingTimeouts]
|
||||
ReadTimeout = 42
|
||||
WriteTimeout = 42
|
||||
IdleTimeout = 42
|
||||
[EntryPoints.EntryPoint0.ProxyProtocol]
|
||||
Insecure = true
|
||||
TrustedIPs = ["foobar", "foobar"]
|
||||
[EntryPoints.EntryPoint0.ForwardedHeaders]
|
||||
Insecure = true
|
||||
TrustedIPs = ["foobar", "foobar"]
|
||||
[providers]
|
||||
providersThrottleDuration = 42
|
||||
[providers.docker]
|
||||
constraints = "foobar"
|
||||
watch = true
|
||||
endpoint = "foobar"
|
||||
defaultRule = "foobar"
|
||||
exposedByDefault = true
|
||||
useBindPortIP = true
|
||||
swarmMode = true
|
||||
network = "foobar"
|
||||
swarmModeRefreshSeconds = 42
|
||||
[providers.docker.tls]
|
||||
ca = "foobar"
|
||||
caOptional = true
|
||||
cert = "foobar"
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[providers.file]
|
||||
directory = "foobar"
|
||||
watch = true
|
||||
filename = "foobar"
|
||||
debugLogGeneratedTemplate = true
|
||||
traefikFile = "foobar"
|
||||
[providers.marathon]
|
||||
constraints = "foobar"
|
||||
trace = true
|
||||
watch = true
|
||||
endpoint = "foobar"
|
||||
defaultRule = "foobar"
|
||||
exposedByDefault = true
|
||||
dcosToken = "foobar"
|
||||
dialerTimeout = 42
|
||||
responseHeaderTimeout = 42
|
||||
tlsHandshakeTimeout = 42
|
||||
keepAlive = 42
|
||||
forceTaskHostname = true
|
||||
respectReadinessChecks = true
|
||||
[providers.marathon.tls]
|
||||
ca = "foobar"
|
||||
caOptional = true
|
||||
cert = "foobar"
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[providers.marathon.basic]
|
||||
httpBasicAuthUser = "foobar"
|
||||
httpBasicPassword = "foobar"
|
||||
[providers.kubernetes]
|
||||
endpoint = "foobar"
|
||||
token = "foobar"
|
||||
certAuthFilePath = "foobar"
|
||||
disablePassHostHeaders = true
|
||||
namespaces = ["foobar", "foobar"]
|
||||
labelSelector = "foobar"
|
||||
ingressClass = "foobar"
|
||||
[providers.kubernetes.ingressEndpoint]
|
||||
ip = "foobar"
|
||||
hostname = "foobar"
|
||||
publishedService = "foobar"
|
||||
[providers.kubernetesCRD]
|
||||
endpoint = "foobar"
|
||||
token = "foobar"
|
||||
certAuthFilePath = "foobar"
|
||||
disablePassHostHeaders = true
|
||||
namespaces = ["foobar", "foobar"]
|
||||
labelSelector = "foobar"
|
||||
ingressClass = "foobar"
|
||||
[providers.rest]
|
||||
entryPoint = "foobar"
|
||||
[providers.rancher]
|
||||
constraints = "foobar"
|
||||
watch = true
|
||||
defaultRule = "foobar"
|
||||
exposedByDefault = true
|
||||
enableServiceHealthFilter = true
|
||||
refreshSeconds = 42
|
||||
intervalPoll = true
|
||||
prefix = "foobar"
|
||||
|
||||
[Providers]
|
||||
ProvidersThrottleDuration = 42
|
||||
[api]
|
||||
entryPoint = "foobar"
|
||||
dashboard = true
|
||||
middlewares = ["foobar", "foobar"]
|
||||
[api.statistics]
|
||||
recentErrors = 42
|
||||
|
||||
[Providers.Docker]
|
||||
Watch = true
|
||||
Endpoint = "foobar"
|
||||
DefaultRule = "foobar"
|
||||
ExposedByDefault = true
|
||||
UseBindPortIP = true
|
||||
SwarmMode = true
|
||||
Network = "foobar"
|
||||
SwarmModeRefreshSeconds = 42
|
||||
[metrics]
|
||||
[metrics.prometheus]
|
||||
buckets = [42.0, 42.0]
|
||||
entryPoint = "foobar"
|
||||
middlewares = ["foobar", "foobar"]
|
||||
[metrics.dataDog]
|
||||
address = "foobar"
|
||||
pushInterval = "10s"
|
||||
[metrics.statsD]
|
||||
address = "foobar"
|
||||
pushInterval = "10s"
|
||||
[metrics.influxDB]
|
||||
address = "foobar"
|
||||
protocol = "foobar"
|
||||
pushInterval = "10s"
|
||||
database = "foobar"
|
||||
retentionPolicy = "foobar"
|
||||
username = "foobar"
|
||||
password = "foobar"
|
||||
|
||||
[[Providers.Docker.Constraints]]
|
||||
Key = "foobar"
|
||||
MustMatch = true
|
||||
Value = "foobar"
|
||||
[ping]
|
||||
entryPoint = "foobar"
|
||||
middlewares = ["foobar", "foobar"]
|
||||
|
||||
[[Providers.Docker.Constraints]]
|
||||
Key = "foobar"
|
||||
MustMatch = true
|
||||
Value = "foobar"
|
||||
[log]
|
||||
level = "foobar"
|
||||
filePath = "foobar"
|
||||
format = "foobar"
|
||||
|
||||
[Providers.Docker.TLS]
|
||||
CA = "foobar"
|
||||
CAOptional = true
|
||||
Cert = "foobar"
|
||||
Key = "foobar"
|
||||
InsecureSkipVerify = true
|
||||
|
||||
[Providers.File]
|
||||
Directory = "foobar"
|
||||
Watch = true
|
||||
Filename = "foobar"
|
||||
DebugLogGeneratedTemplate = true
|
||||
TraefikFile = "foobar"
|
||||
|
||||
[Providers.Marathon]
|
||||
Trace = true
|
||||
Watch = true
|
||||
Endpoint = "foobar"
|
||||
DefaultRule = "foobar"
|
||||
ExposedByDefault = true
|
||||
DCOSToken = "foobar"
|
||||
DialerTimeout = 42
|
||||
ResponseHeaderTimeout = 42
|
||||
TLSHandshakeTimeout = 42
|
||||
KeepAlive = 42
|
||||
ForceTaskHostname = true
|
||||
RespectReadinessChecks = true
|
||||
|
||||
[[Providers.Marathon.Constraints]]
|
||||
Key = "foobar"
|
||||
MustMatch = true
|
||||
Value = "foobar"
|
||||
|
||||
[[Providers.Marathon.Constraints]]
|
||||
Key = "foobar"
|
||||
MustMatch = true
|
||||
Value = "foobar"
|
||||
|
||||
[Providers.Marathon.TLS]
|
||||
CA = "foobar"
|
||||
CAOptional = true
|
||||
Cert = "foobar"
|
||||
Key = "foobar"
|
||||
InsecureSkipVerify = true
|
||||
[Providers.Marathon.Basic]
|
||||
HTTPBasicAuthUser = "foobar"
|
||||
HTTPBasicPassword = "foobar"
|
||||
|
||||
[Providers.Kubernetes]
|
||||
Endpoint = "foobar"
|
||||
Token = "foobar"
|
||||
CertAuthFilePath = "foobar"
|
||||
DisablePassHostHeaders = true
|
||||
Namespaces = ["foobar", "foobar"]
|
||||
LabelSelector = "foobar"
|
||||
IngressClass = "foobar"
|
||||
[Providers.Kubernetes.IngressEndpoint]
|
||||
IP = "foobar"
|
||||
Hostname = "foobar"
|
||||
PublishedService = "foobar"
|
||||
|
||||
[Providers.KubernetesCRD]
|
||||
Endpoint = "foobar"
|
||||
Token = "foobar"
|
||||
CertAuthFilePath = "foobar"
|
||||
DisablePassHostHeaders = true
|
||||
Namespaces = ["foobar", "foobar"]
|
||||
LabelSelector = "foobar"
|
||||
IngressClass = "foobar"
|
||||
|
||||
[Providers.Rest]
|
||||
EntryPoint = "foobar"
|
||||
|
||||
[Providers.Rancher]
|
||||
Watch = true
|
||||
DefaultRule = "foobar"
|
||||
ExposedByDefault = true
|
||||
EnableServiceHealthFilter = true
|
||||
RefreshSeconds = 42
|
||||
IntervalPoll = true
|
||||
Prefix = "foobar"
|
||||
|
||||
[[Providers.Rancher.Constraints]]
|
||||
Key = "foobar"
|
||||
MustMatch = true
|
||||
Value = "foobar"
|
||||
|
||||
[[Providers.Rancher.Constraints]]
|
||||
Key = "foobar"
|
||||
MustMatch = true
|
||||
Value = "foobar"
|
||||
|
||||
[API]
|
||||
EntryPoint = "foobar"
|
||||
Dashboard = true
|
||||
Middlewares = ["foobar", "foobar"]
|
||||
[API.Statistics]
|
||||
RecentErrors = 42
|
||||
|
||||
[Metrics]
|
||||
|
||||
[Metrics.Prometheus]
|
||||
Buckets = [42.0, 42.0]
|
||||
EntryPoint = "foobar"
|
||||
Middlewares = ["foobar", "foobar"]
|
||||
|
||||
[Metrics.Datadog]
|
||||
Address = "foobar"
|
||||
PushInterval = "10s"
|
||||
|
||||
[Metrics.StatsD]
|
||||
Address = "foobar"
|
||||
PushInterval = "10s"
|
||||
|
||||
[Metrics.InfluxDB]
|
||||
Address = "foobar"
|
||||
Protocol = "foobar"
|
||||
PushInterval = "10s"
|
||||
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"
|
||||
BufferingSize = 42
|
||||
[AccessLog.Filters]
|
||||
StatusCodes = ["foobar", "foobar"]
|
||||
RetryAttempts = true
|
||||
MinDuration = 42
|
||||
[AccessLog.Fields]
|
||||
DefaultMode = "foobar"
|
||||
[AccessLog.Fields.Names]
|
||||
[accessLog]
|
||||
filePath = "foobar"
|
||||
format = "foobar"
|
||||
bufferingSize = 42
|
||||
[accessLog.filters]
|
||||
statusCodes = ["foobar", "foobar"]
|
||||
retryAttempts = true
|
||||
minDuration = 42
|
||||
[accessLog.fields]
|
||||
defaultMode = "foobar"
|
||||
[accessLog.fields.names]
|
||||
name0 = "foobar"
|
||||
name1 = "foobar"
|
||||
[AccessLog.Fields.Headers]
|
||||
DefaultMode = "foobar"
|
||||
[AccessLog.Fields.Headers.Names]
|
||||
[accessLog.fields.headers]
|
||||
defaultMode = "foobar"
|
||||
[accessLog.fields.headers.names]
|
||||
name0 = "foobar"
|
||||
name1 = "foobar"
|
||||
|
||||
[Tracing]
|
||||
ServiceName = "foobar"
|
||||
SpanNameLimit = 42
|
||||
[tracing]
|
||||
serviceName = "foobar"
|
||||
spanNameLimit = 42
|
||||
[tracing.jaeger]
|
||||
samplingServerURL = "foobar"
|
||||
samplingType = "foobar"
|
||||
samplingParam = 42.0
|
||||
localAgentHostPort = "foobar"
|
||||
gen128Bit = true
|
||||
propagation = "foobar"
|
||||
traceContextHeaderName = "foobar"
|
||||
[tracing.zipkin]
|
||||
httpEndpoint = "foobar"
|
||||
sameSpan = true
|
||||
id128Bit = true
|
||||
debug = true
|
||||
sampleRate = 42.0
|
||||
[tracing.dataDog]
|
||||
localAgentHostPort = "foobar"
|
||||
globalTag = "foobar"
|
||||
debug = true
|
||||
prioritySampling = true
|
||||
traceIDHeaderName = "foobar"
|
||||
parentIDHeaderName = "foobar"
|
||||
samplingPriorityHeaderName = "foobar"
|
||||
bagagePrefixHeaderName = "foobar"
|
||||
[tracing.instana]
|
||||
localAgentHost = "foobar"
|
||||
localAgentPort = 42
|
||||
logLevel = "foobar"
|
||||
[tracing.haystack]
|
||||
localAgentHost = "foobar"
|
||||
localAgentPort = 42
|
||||
globalTag = "foobar"
|
||||
traceIDHeaderName = "foobar"
|
||||
parentIDHeaderName = "foobar"
|
||||
spanIDHeaderName = "foobar"
|
||||
|
||||
[Tracing.Jaeger]
|
||||
SamplingServerURL = "foobar"
|
||||
SamplingType = "foobar"
|
||||
SamplingParam = 42.0
|
||||
LocalAgentHostPort = "foobar"
|
||||
Gen128Bit = true
|
||||
Propagation = "foobar"
|
||||
TraceContextHeaderName = "foobar"
|
||||
[hostResolver]
|
||||
cnameFlattening = true
|
||||
resolvConfig = "foobar"
|
||||
resolvDepth = 42
|
||||
|
||||
[Tracing.Zipkin]
|
||||
HTTPEndpoint = "foobar"
|
||||
SameSpan = true
|
||||
ID128Bit = true
|
||||
Debug = true
|
||||
SampleRate = 42.0
|
||||
[acme]
|
||||
email = "foobar"
|
||||
acmeLogging = true
|
||||
caServer = "foobar"
|
||||
storage = "foobar"
|
||||
entryPoint = "foobar"
|
||||
keyType = "foobar"
|
||||
onHostRule = true
|
||||
[acme.dnsChallenge]
|
||||
provider = "foobar"
|
||||
delayBeforeCheck = 42
|
||||
resolvers = ["foobar", "foobar"]
|
||||
disablePropagationCheck = true
|
||||
[acme.httpChallenge]
|
||||
entryPoint = "foobar"
|
||||
[acme.tlsChallenge]
|
||||
|
||||
[Tracing.DataDog]
|
||||
LocalAgentHostPort = "foobar"
|
||||
GlobalTag = "foobar"
|
||||
Debug = true
|
||||
PrioritySampling = true
|
||||
TraceIDHeaderName = "foobar"
|
||||
ParentIDHeaderName = "foobar"
|
||||
SamplingPriorityHeaderName = "foobar"
|
||||
BagagePrefixHeaderName = "foobar"
|
||||
[[acme.domains]]
|
||||
main = "foobar"
|
||||
sans = ["foobar", "foobar"]
|
||||
|
||||
[Tracing.Instana]
|
||||
LocalAgentHost = "foobar"
|
||||
LocalAgentPort = 42
|
||||
LogLevel = "foobar"
|
||||
[[acme.domains]]
|
||||
main = "foobar"
|
||||
sans = ["foobar", "foobar"]
|
||||
|
||||
[Tracing.Haystack]
|
||||
GlobalTag = "foobar"
|
||||
LocalAgentHost = "foobar"
|
||||
LocalAgentPort = 42
|
||||
ParentIDHeaderName = "foobar"
|
||||
SpanIDHeaderName = "foobar"
|
||||
TraceIDHeaderName = "foobar"
|
||||
## Dynamic configuration
|
||||
|
||||
[HostResolver]
|
||||
CnameFlattening = true
|
||||
ResolvConfig = "foobar"
|
||||
ResolvDepth = 42
|
||||
|
||||
[ACME]
|
||||
Email = "foobar"
|
||||
ACMELogging = true
|
||||
CAServer = "foobar"
|
||||
Storage = "foobar"
|
||||
EntryPoint = "foobar"
|
||||
KeyType = "foobar"
|
||||
OnHostRule = true
|
||||
|
||||
[ACME.DNSChallenge]
|
||||
Provider = "foobar"
|
||||
DelayBeforeCheck = 42
|
||||
Resolvers = ["foobar", "foobar"]
|
||||
DisablePropagationCheck = true
|
||||
|
||||
[ACME.HTTPChallenge]
|
||||
EntryPoint = "foobar"
|
||||
|
||||
[ACME.TLSChallenge]
|
||||
|
||||
[[ACME.Domains]]
|
||||
Main = "foobar"
|
||||
SANs = ["foobar", "foobar"]
|
||||
|
||||
[[ACME.Domains]]
|
||||
Main = "foobar"
|
||||
SANs = ["foobar", "foobar"]
|
||||
|
||||
#### Dynamic configuration
|
||||
|
||||
[HTTP]
|
||||
|
||||
[HTTP.Routers]
|
||||
|
||||
[HTTP.Routers.Router0]
|
||||
EntryPoints = ["foobar", "foobar"]
|
||||
Middlewares = ["foobar", "foobar"]
|
||||
Service = "foobar"
|
||||
Rule = "foobar"
|
||||
[http]
|
||||
[http.routers]
|
||||
[http.routers.Router0]
|
||||
entryPoints = ["foobar", "foobar"]
|
||||
middlewares = ["foobar", "foobar"]
|
||||
service = "foobar"
|
||||
rule = "foobar"
|
||||
priority = 42
|
||||
[HTTP.Routers.Router0.tls]
|
||||
|
||||
[HTTP.Middlewares]
|
||||
|
||||
[HTTP.Middlewares.Middleware0.AddPrefix]
|
||||
Prefix = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware1.StripPrefix]
|
||||
Prefixes = ["foobar", "foobar"]
|
||||
|
||||
[HTTP.Middlewares.Middleware2.StripPrefixRegex]
|
||||
Regex = ["foobar", "foobar"]
|
||||
|
||||
[HTTP.Middlewares.Middleware3.ReplacePath]
|
||||
Path = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware4.ReplacePathRegex]
|
||||
Regex = "foobar"
|
||||
Replacement = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware5.Chain]
|
||||
Middlewares = ["foobar", "foobar"]
|
||||
|
||||
[HTTP.Middlewares.Middleware6.IPWhiteList]
|
||||
SourceRange = ["foobar", "foobar"]
|
||||
|
||||
[HTTP.Middlewares.Middleware7.IPWhiteList.IPStrategy]
|
||||
Depth = 42
|
||||
ExcludedIPs = ["foobar", "foobar"]
|
||||
|
||||
[HTTP.Middlewares.Middleware8.Headers]
|
||||
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"
|
||||
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
|
||||
[HTTP.Middlewares.Middleware8.Headers.CustomRequestHeaders]
|
||||
[http.routers.Router0.tls]
|
||||
[http.middlewares]
|
||||
[http.middlewares.Middleware0]
|
||||
[http.middlewares.Middleware0.addPrefix]
|
||||
prefix = "foobar"
|
||||
[http.middlewares.Middleware1]
|
||||
[http.middlewares.Middleware1.stripPrefix]
|
||||
prefixes = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware10]
|
||||
[http.middlewares.Middleware10.rateLimit]
|
||||
extractorFunc = "foobar"
|
||||
[http.middlewares.Middleware10.rateLimit.rateSet]
|
||||
[http.middlewares.Middleware10.rateLimit.rateSet.Rate0]
|
||||
period = 42000000000
|
||||
average = 42
|
||||
burst = 42
|
||||
[http.middlewares.Middleware10.rateLimit.rateSet.Rate1]
|
||||
period = 42000000000
|
||||
average = 42
|
||||
burst = 42
|
||||
[http.middlewares.Middleware11]
|
||||
[http.middlewares.Middleware11.redirectRegex]
|
||||
regex = "foobar"
|
||||
replacement = "foobar"
|
||||
permanent = true
|
||||
[http.middlewares.Middleware12]
|
||||
[http.middlewares.Middleware12.redirectScheme]
|
||||
scheme = "foobar"
|
||||
port = "foobar"
|
||||
permanent = true
|
||||
[http.middlewares.Middleware13]
|
||||
[http.middlewares.Middleware13.basicAuth]
|
||||
users = ["foobar", "foobar"]
|
||||
usersFile = "foobar"
|
||||
realm = "foobar"
|
||||
removeHeader = true
|
||||
headerField = "foobar"
|
||||
[http.middlewares.Middleware14]
|
||||
[http.middlewares.Middleware14.digestAuth]
|
||||
users = ["foobar", "foobar"]
|
||||
usersFile = "foobar"
|
||||
removeHeader = true
|
||||
realm = "foobar"
|
||||
headerField = "foobar"
|
||||
[http.middlewares.Middleware15]
|
||||
[http.middlewares.Middleware15.forwardAuth]
|
||||
address = "foobar"
|
||||
trustForwardHeader = true
|
||||
authResponseHeaders = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware15.forwardAuth.tls]
|
||||
ca = "foobar"
|
||||
caOptional = true
|
||||
cert = "foobar"
|
||||
key = "foobar"
|
||||
insecureSkipVerify = true
|
||||
[http.middlewares.Middleware16]
|
||||
[http.middlewares.Middleware16.maxConn]
|
||||
amount = 42
|
||||
extractorFunc = "foobar"
|
||||
[http.middlewares.Middleware17]
|
||||
[http.middlewares.Middleware17.buffering]
|
||||
maxRequestBodyBytes = 42
|
||||
memRequestBodyBytes = 42
|
||||
maxResponseBodyBytes = 42
|
||||
memResponseBodyBytes = 42
|
||||
retryExpression = "foobar"
|
||||
[http.middlewares.Middleware18]
|
||||
[http.middlewares.Middleware18.circuitBreaker]
|
||||
expression = "foobar"
|
||||
[http.middlewares.Middleware19]
|
||||
[http.middlewares.Middleware19.compress]
|
||||
[http.middlewares.Middleware2]
|
||||
[http.middlewares.Middleware2.stripPrefixRegex]
|
||||
regex = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware20]
|
||||
[http.middlewares.Middleware20.passTLSClientCert]
|
||||
pem = true
|
||||
[http.middlewares.Middleware20.passTLSClientCert.info]
|
||||
notAfter = true
|
||||
notBefore = true
|
||||
sans = true
|
||||
[http.middlewares.Middleware20.passTLSClientCert.info.subject]
|
||||
country = true
|
||||
province = true
|
||||
locality = true
|
||||
organization = true
|
||||
commonName = true
|
||||
serialNumber = true
|
||||
domainComponent = true
|
||||
[http.middlewares.Middleware20.passTLSClientCert.info.issuer]
|
||||
country = true
|
||||
province = true
|
||||
locality = true
|
||||
organization = true
|
||||
commonName = true
|
||||
serialNumber = true
|
||||
domainComponent = true
|
||||
[http.middlewares.Middleware21]
|
||||
[http.middlewares.Middleware21.retry]
|
||||
regex = 0
|
||||
[http.middlewares.Middleware3]
|
||||
[http.middlewares.Middleware3.replacePath]
|
||||
path = "foobar"
|
||||
[http.middlewares.Middleware4]
|
||||
[http.middlewares.Middleware4.replacePathRegex]
|
||||
regex = "foobar"
|
||||
replacement = "foobar"
|
||||
[http.middlewares.Middleware5]
|
||||
[http.middlewares.Middleware5.chain]
|
||||
middlewares = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware6]
|
||||
[http.middlewares.Middleware6.ipWhiteList]
|
||||
sourceRange = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware7]
|
||||
[http.middlewares.Middleware7.ipWhiteList]
|
||||
[http.middlewares.Middleware7.ipWhiteList.ipStrategy]
|
||||
depth = 42
|
||||
excludedIPs = ["foobar", "foobar"]
|
||||
[http.middlewares.Middleware8]
|
||||
[http.middlewares.Middleware8.headers]
|
||||
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"
|
||||
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
|
||||
[http.middlewares.Middleware8.headers.customRequestHeaders]
|
||||
name0 = "foobar"
|
||||
name1 = "foobar"
|
||||
[HTTP.Middlewares.Middleware8.Headers.CustomResponseHeaders]
|
||||
[http.middlewares.Middleware8.headers.customResponseHeaders]
|
||||
name0 = "foobar"
|
||||
name1 = "foobar"
|
||||
[HTTP.Middlewares.Middleware8.Headers.SSLProxyHeaders]
|
||||
[http.middlewares.Middleware8.headers.sslProxyHeaders]
|
||||
name0 = "foobar"
|
||||
name1 = "foobar"
|
||||
[http.middlewares.Middleware9]
|
||||
[http.middlewares.Middleware9.errors]
|
||||
status = ["foobar", "foobar"]
|
||||
service = "foobar"
|
||||
query = "foobar"
|
||||
[http.services]
|
||||
[http.services.Service0]
|
||||
[http.services.Service0.loadBalancer]
|
||||
passHostHeader = true
|
||||
[http.services.Service0.loadBalancer.stickiness]
|
||||
cookieName = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware9.Errors]
|
||||
Status = ["foobar", "foobar"]
|
||||
Service = "foobar"
|
||||
Query = "foobar"
|
||||
[[http.services.Service0.loadBalancer.servers]]
|
||||
url = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware10.RateLimit]
|
||||
ExtractorFunc = "foobar"
|
||||
[HTTP.Middlewares.Middleware10.RateLimit.RateSet]
|
||||
[HTTP.Middlewares.Middleware10.RateLimit.RateSet.Rate0]
|
||||
Period = 42
|
||||
Average = 42
|
||||
Burst = 42
|
||||
[HTTP.Middlewares.Middleware10.RateLimit.RateSet.Rate1]
|
||||
Period = 42
|
||||
Average = 42
|
||||
Burst = 42
|
||||
|
||||
[HTTP.Middlewares.Middleware11.RedirectRegex]
|
||||
Regex = "foobar"
|
||||
Replacement = "foobar"
|
||||
Permanent = true
|
||||
|
||||
[HTTP.Middlewares.Middleware12.RedirectScheme]
|
||||
Scheme = "foobar"
|
||||
Port = "foobar"
|
||||
Permanent = true
|
||||
|
||||
[HTTP.Middlewares.Middleware13.BasicAuth]
|
||||
Users = ["foobar", "foobar"]
|
||||
UsersFile = "foobar"
|
||||
Realm = "foobar"
|
||||
RemoveHeader = true
|
||||
HeaderField = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware14.DigestAuth]
|
||||
Users = ["foobar", "foobar"]
|
||||
UsersFile = "foobar"
|
||||
RemoveHeader = true
|
||||
Realm = "foobar"
|
||||
HeaderField = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware15.ForwardAuth]
|
||||
Address = "foobar"
|
||||
TrustForwardHeader = true
|
||||
AuthResponseHeaders = ["foobar", "foobar"]
|
||||
[HTTP.Middlewares.Middleware15.ForwardAuth.TLS]
|
||||
CA = "foobar"
|
||||
CAOptional = true
|
||||
Cert = "foobar"
|
||||
Key = "foobar"
|
||||
InsecureSkipVerify = true
|
||||
|
||||
[HTTP.Middlewares.Middleware16.MaxConn]
|
||||
Amount = 42
|
||||
ExtractorFunc = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware17.Buffering]
|
||||
MaxRequestBodyBytes = 42
|
||||
MemRequestBodyBytes = 42
|
||||
MaxResponseBodyBytes = 42
|
||||
MemResponseBodyBytes = 42
|
||||
RetryExpression = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware18.CircuitBreaker]
|
||||
Expression = "foobar"
|
||||
|
||||
[HTTP.Middlewares.Middleware19.Compress]
|
||||
|
||||
[HTTP.Middlewares.Middleware20.PassTLSClientCert]
|
||||
PEM = true
|
||||
[HTTP.Middlewares.Middleware20.PassTLSClientCert.Info]
|
||||
NotAfter = true
|
||||
NotBefore = true
|
||||
Sans = true
|
||||
[HTTP.Middlewares.Middleware20.PassTLSClientCert.Info.Subject]
|
||||
Country = true
|
||||
Province = true
|
||||
Locality = true
|
||||
Organization = true
|
||||
CommonName = true
|
||||
SerialNumber = true
|
||||
DomainComponent = true
|
||||
[HTTP.Middlewares.Middleware20.PassTLSClientCert.Info.Issuer]
|
||||
Country = true
|
||||
Province = true
|
||||
Locality = true
|
||||
Organization = true
|
||||
CommonName = true
|
||||
SerialNumber = true
|
||||
DomainComponent = true
|
||||
|
||||
[HTTP.Middlewares.Middleware21.Retry]
|
||||
Attempts = 42
|
||||
|
||||
[HTTP.Services]
|
||||
[HTTP.Services.Service0]
|
||||
[HTTP.Services.Service0.LoadBalancer]
|
||||
Method = "foobar"
|
||||
PassHostHeader = true
|
||||
|
||||
[[HTTP.Services.Service0.LoadBalancer.Servers]]
|
||||
URL = "foobar"
|
||||
|
||||
[HTTP.Services.Service0.LoadBalancer.Stickiness]
|
||||
CookieName = "foobar"
|
||||
|
||||
[[HTTP.Services.Service0.LoadBalancer.Servers]]
|
||||
URL = "foobar"
|
||||
|
||||
[HTTP.Services.Service0.LoadBalancer.HealthCheck]
|
||||
Scheme = "foobar"
|
||||
Path = "foobar"
|
||||
Port = 42
|
||||
Interval = "foobar"
|
||||
Timeout = "foobar"
|
||||
Hostname = "foobar"
|
||||
[HTTP.Services.Service0.LoadBalancer.HealthCheck.Headers]
|
||||
[[http.services.Service0.loadBalancer.servers]]
|
||||
url = "foobar"
|
||||
[http.services.Service0.loadBalancer.healthCheck]
|
||||
scheme = "foobar"
|
||||
path = "foobar"
|
||||
port = 42
|
||||
interval = "foobar"
|
||||
timeout = "foobar"
|
||||
hostname = "foobar"
|
||||
[http.services.Service0.loadBalancer.healthCheck.headers]
|
||||
name0 = "foobar"
|
||||
name1 = "foobar"
|
||||
[HTTP.Services.Service0.LoadBalancer.ResponseForwarding]
|
||||
FlushInterval = "foobar"
|
||||
[http.services.Service0.loadBalancer.responseForwarding]
|
||||
flushInterval = "foobar"
|
||||
|
||||
[TCP]
|
||||
|
||||
[TCP.Routers]
|
||||
|
||||
[TCP.Routers.TCPRouter0]
|
||||
EntryPoints = ["foobar", "foobar"]
|
||||
Service = "foobar"
|
||||
Rule = "foobar"
|
||||
[TCP.Routers.TCPRouter0.tls]
|
||||
[tcp]
|
||||
[tcp.routers]
|
||||
[tcp.routers.TCPRouter0]
|
||||
entryPoints = ["foobar", "foobar"]
|
||||
service = "foobar"
|
||||
rule = "foobar"
|
||||
[tcp.routers.TCPRouter0.tls]
|
||||
passthrough = true
|
||||
[tcp.services]
|
||||
[tcp.services.TCPService0]
|
||||
[tcp.services.TCPService0.loadBalancer]
|
||||
|
||||
[TCP.Services]
|
||||
[[tcp.services.TCPService0.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
|
||||
[TCP.Services.TCPService0]
|
||||
[TCP.Services.TCPService0.LoadBalancer]
|
||||
Method = "foobar"
|
||||
[[tcp.services.TCPService0.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
|
||||
[[TCP.Services.TCPService0.LoadBalancer.Servers]]
|
||||
Address = "foobar"
|
||||
[tls]
|
||||
|
||||
[[TCP.Services.TCPService0.LoadBalancer.Servers]]
|
||||
Address = "foobar"
|
||||
[[tls.Certificates]]
|
||||
certFile = "foobar"
|
||||
keyFile = "foobar"
|
||||
stores = ["foobar", "foobar"]
|
||||
|
||||
[[TLS.Certificates]]
|
||||
Stores = ["foobar", "foobar"]
|
||||
CertFile = "foobar"
|
||||
KeyFile = "foobar"
|
||||
|
||||
[[TLS.Certificates]]
|
||||
Stores = ["foobar", "foobar"]
|
||||
CertFile = "foobar"
|
||||
KeyFile = "foobar"
|
||||
|
||||
[TLS.Options]
|
||||
|
||||
[TLS.Options.TLS0]
|
||||
MinVersion = "foobar"
|
||||
CipherSuites = ["foobar", "foobar"]
|
||||
SniStrict = true
|
||||
[TLS.Options.TLS0.ClientCA]
|
||||
Files = ["foobar", "foobar"]
|
||||
Optional = true
|
||||
[TLS.Options.TLS1]
|
||||
MinVersion = "foobar"
|
||||
CipherSuites = ["foobar", "foobar"]
|
||||
SniStrict = true
|
||||
[TLS.Options.TLS1.ClientCA]
|
||||
Files = ["foobar", "foobar"]
|
||||
Optional = true
|
||||
|
||||
[TLS.Stores]
|
||||
|
||||
[TLS.Stores.Store0]
|
||||
[TLS.Stores.Store0.DefaultCertificate]
|
||||
CertFile = "foobar"
|
||||
KeyFile = "foobar"
|
||||
[TLS.Stores.Store1]
|
||||
[TLS.Stores.Store1.DefaultCertificate]
|
||||
CertFile = "foobar"
|
||||
KeyFile = "foobar"
|
||||
[[tls.Certificates]]
|
||||
certFile = "foobar"
|
||||
keyFile = "foobar"
|
||||
stores = ["foobar", "foobar"]
|
||||
[tls.options]
|
||||
[tls.options.TLS0]
|
||||
minVersion = "foobar"
|
||||
cipherSuites = ["foobar", "foobar"]
|
||||
sniStrict = true
|
||||
[tls.options.TLS0.clientCA]
|
||||
files = ["foobar", "foobar"]
|
||||
optional = true
|
||||
[tls.options.TLS1]
|
||||
minVersion = "foobar"
|
||||
cipherSuites = ["foobar", "foobar"]
|
||||
sniStrict = true
|
||||
[tls.options.TLS1.clientCA]
|
||||
files = ["foobar", "foobar"]
|
||||
optional = true
|
||||
[tls.stores]
|
||||
[tls.stores.Store0]
|
||||
[tls.stores.Store0.defaultCertificate]
|
||||
certFile = "foobar"
|
||||
keyFile = "foobar"
|
||||
[tls.stores.Store1]
|
||||
[tls.stores.Store1.defaultCertificate]
|
||||
certFile = "foobar"
|
||||
keyFile = "foobar"
|
|
@ -1,262 +1,244 @@
|
|||
Global:
|
||||
Debug: true
|
||||
CheckNewVersion: true
|
||||
SendAnonymousUsage: true
|
||||
ServersTransport:
|
||||
InsecureSkipVerify: true
|
||||
RootCAs:
|
||||
global:
|
||||
checkNewVersion: true
|
||||
sendAnonymousUsage: true
|
||||
serversTransport:
|
||||
insecureSkipVerify: true
|
||||
rootCAs:
|
||||
- foobar
|
||||
- foobar
|
||||
MaxIdleConnsPerHost: 42
|
||||
ForwardingTimeouts:
|
||||
DialTimeout: 42
|
||||
ResponseHeaderTimeout: 42
|
||||
EntryPoints:
|
||||
maxIdleConnsPerHost: 42
|
||||
forwardingTimeouts:
|
||||
dialTimeout: 42
|
||||
responseHeaderTimeout: 42
|
||||
idleConnTimeout: 42
|
||||
entryPoints:
|
||||
EntryPoint0:
|
||||
Address: foobar
|
||||
Transport:
|
||||
LifeCycle:
|
||||
RequestAcceptGraceTimeout: 42
|
||||
GraceTimeOut: 42
|
||||
RespondingTimeouts:
|
||||
ReadTimeout: 42
|
||||
WriteTimeout: 42
|
||||
IdleTimeout: 42
|
||||
ProxyProtocol:
|
||||
Insecure: true
|
||||
TrustedIPs:
|
||||
address: foobar
|
||||
transport:
|
||||
lifeCycle:
|
||||
requestAcceptGraceTimeout: 42
|
||||
graceTimeOut: 42
|
||||
respondingTimeouts:
|
||||
readTimeout: 42
|
||||
writeTimeout: 42
|
||||
idleTimeout: 42
|
||||
proxyProtocol:
|
||||
insecure: true
|
||||
trustedIPs:
|
||||
- foobar
|
||||
- foobar
|
||||
ForwardedHeaders:
|
||||
Insecure: true
|
||||
TrustedIPs:
|
||||
forwardedHeaders:
|
||||
insecure: true
|
||||
trustedIPs:
|
||||
- foobar
|
||||
- foobar
|
||||
Providers:
|
||||
ProvidersThrottleDuration: 42
|
||||
Docker:
|
||||
Watch: true
|
||||
Endpoint: foobar
|
||||
DefaultRule: foobar
|
||||
ExposedByDefault: true
|
||||
UseBindPortIP: true
|
||||
SwarmMode: true
|
||||
Network: foobar
|
||||
SwarmModeRefreshSeconds: 42
|
||||
Constraints:
|
||||
- Key: foobar
|
||||
MustMatch: true
|
||||
Value: foobar
|
||||
- Key: foobar
|
||||
MustMatch: true
|
||||
Value: foobar
|
||||
TLS:
|
||||
CA: foobar
|
||||
CAOptional: true
|
||||
Cert: foobar
|
||||
Key: foobar
|
||||
InsecureSkipVerify: true
|
||||
File:
|
||||
Directory: foobar
|
||||
Watch: true
|
||||
Filename: foobar
|
||||
DebugLogGeneratedTemplate: true
|
||||
TraefikFile: foobar
|
||||
Marathon:
|
||||
Trace: true
|
||||
Watch: true
|
||||
Endpoint: foobar
|
||||
DefaultRule: foobar
|
||||
ExposedByDefault: true
|
||||
DCOSToken: foobar
|
||||
DialerTimeout: 42
|
||||
ResponseHeaderTimeout: 42
|
||||
TLSHandshakeTimeout: 42
|
||||
KeepAlive: 42
|
||||
ForceTaskHostname: true
|
||||
RespectReadinessChecks: true
|
||||
Constraints:
|
||||
- Key: foobar
|
||||
MustMatch: true
|
||||
Value: foobar
|
||||
- Key: foobar
|
||||
MustMatch: true
|
||||
Value: foobar
|
||||
TLS:
|
||||
CA: foobar
|
||||
CAOptional: true
|
||||
Cert: foobar
|
||||
Key: foobar
|
||||
InsecureSkipVerify: true
|
||||
Basic:
|
||||
HTTPBasicAuthUser: foobar
|
||||
HTTPBasicPassword: foobar
|
||||
Kubernetes:
|
||||
Endpoint: foobar
|
||||
Token: foobar
|
||||
CertAuthFilePath: foobar
|
||||
DisablePassHostHeaders: true
|
||||
Namespaces:
|
||||
providers:
|
||||
providersThrottleDuration: 42
|
||||
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: 42
|
||||
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: 42
|
||||
responseHeaderTimeout: 42
|
||||
tlsHandshakeTimeout: 42
|
||||
keepAlive: 42
|
||||
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:
|
||||
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:
|
||||
Watch: true
|
||||
DefaultRule: foobar
|
||||
ExposedByDefault: true
|
||||
EnableServiceHealthFilter: true
|
||||
RefreshSeconds: 42
|
||||
IntervalPoll: true
|
||||
Prefix: foobar
|
||||
Constraints:
|
||||
- Key: foobar
|
||||
MustMatch: true
|
||||
Value: foobar
|
||||
- Key: foobar
|
||||
MustMatch: true
|
||||
Value: foobar
|
||||
API:
|
||||
EntryPoint: foobar
|
||||
Dashboard: true
|
||||
Middlewares:
|
||||
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
|
||||
statistics:
|
||||
recentErrors: 42
|
||||
middlewares:
|
||||
- foobar
|
||||
- foobar
|
||||
Statistics:
|
||||
RecentErrors: 42
|
||||
Metrics:
|
||||
Prometheus:
|
||||
Buckets:
|
||||
metrics:
|
||||
prometheus:
|
||||
buckets:
|
||||
- 42
|
||||
- 42
|
||||
EntryPoint: foobar
|
||||
Middlewares:
|
||||
entryPoint: foobar
|
||||
middlewares:
|
||||
- foobar
|
||||
- foobar
|
||||
Datadog:
|
||||
Address: foobar
|
||||
PushInterval: 10s
|
||||
StatsD:
|
||||
Address: foobar
|
||||
PushInterval: 10s
|
||||
InfluxDB:
|
||||
Address: foobar
|
||||
Protocol: foobar
|
||||
PushInterval: 10s
|
||||
Database: foobar
|
||||
RetentionPolicy: foobar
|
||||
Username: foobar
|
||||
Password: foobar
|
||||
Ping:
|
||||
EntryPoint: foobar
|
||||
Middlewares:
|
||||
dataDog:
|
||||
address: foobar
|
||||
pushInterval: 10s
|
||||
statsD:
|
||||
address: foobar
|
||||
pushInterval: 10s
|
||||
influxDB:
|
||||
address: foobar
|
||||
protocol: foobar
|
||||
pushInterval: 10s
|
||||
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
|
||||
BufferingSize: 42
|
||||
Filters:
|
||||
StatusCodes:
|
||||
log:
|
||||
level: foobar
|
||||
filePath: foobar
|
||||
format: foobar
|
||||
accessLog:
|
||||
filePath: foobar
|
||||
format: foobar
|
||||
filters:
|
||||
statusCodes:
|
||||
- foobar
|
||||
- foobar
|
||||
RetryAttempts: true
|
||||
MinDuration: 42
|
||||
Fields:
|
||||
DefaultMode: foobar
|
||||
Names:
|
||||
retryAttempts: true
|
||||
minDuration: 42
|
||||
fields:
|
||||
defaultMode: foobar
|
||||
names:
|
||||
name0: foobar
|
||||
name1: foobar
|
||||
Headers:
|
||||
DefaultMode: foobar
|
||||
Names:
|
||||
headers:
|
||||
defaultMode: foobar
|
||||
names:
|
||||
name0: foobar
|
||||
name1: foobar
|
||||
Tracing:
|
||||
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:
|
||||
GlobalTag: foobar
|
||||
LocalAgentHost: foobar
|
||||
LocalAgentPort: 42
|
||||
ParentIDHeaderName: foobar
|
||||
TraceIDHeaderName: foobar
|
||||
SpanIDHeaderName: foobar
|
||||
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: 42
|
||||
Resolvers:
|
||||
bufferingSize: 42
|
||||
tracing:
|
||||
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:
|
||||
localAgentHost: foobar
|
||||
localAgentPort: 42
|
||||
globalTag: foobar
|
||||
traceIDHeaderName: foobar
|
||||
parentIDHeaderName: foobar
|
||||
spanIDHeaderName: foobar
|
||||
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: 42
|
||||
resolvers:
|
||||
- foobar
|
||||
- foobar
|
||||
DisablePropagationCheck: true
|
||||
HTTPChallenge:
|
||||
EntryPoint: foobar
|
||||
TLSChallenge: {}
|
||||
Domains:
|
||||
- Main: foobar
|
||||
SANs:
|
||||
disablePropagationCheck: true
|
||||
httpChallenge:
|
||||
entryPoint: foobar
|
||||
tlsChallenge: {}
|
||||
domains:
|
||||
- main: foobar
|
||||
sans:
|
||||
- foobar
|
||||
- foobar
|
||||
- Main: foobar
|
||||
SANs:
|
||||
- main: foobar
|
||||
sans:
|
||||
- foobar
|
||||
- foobar
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/containous/traefik/pkg/ip"
|
||||
"github.com/containous/traefik/pkg/types"
|
||||
)
|
||||
|
@ -9,79 +15,79 @@ import (
|
|||
|
||||
// Middleware holds the Middleware configuration.
|
||||
type Middleware struct {
|
||||
AddPrefix *AddPrefix `json:"addPrefix,omitempty" yaml:"addPrefix,omitempty"`
|
||||
StripPrefix *StripPrefix `json:"stripPrefix,omitempty" yaml:"stripPrefix,omitempty"`
|
||||
StripPrefixRegex *StripPrefixRegex `json:"stripPrefixRegex,omitempty" yaml:"stripPrefixRegex,omitempty"`
|
||||
ReplacePath *ReplacePath `json:"replacePath,omitempty" yaml:"replacePath,omitempty"`
|
||||
ReplacePathRegex *ReplacePathRegex `json:"replacePathRegex,omitempty" yaml:"replacePathRegex,omitempty"`
|
||||
Chain *Chain `json:"chain,omitempty" yaml:"chain,omitempty"`
|
||||
IPWhiteList *IPWhiteList `json:"ipWhiteList,omitempty" yaml:"ipWhiteList,omitempty"`
|
||||
Headers *Headers `json:"headers,omitempty" yaml:"headers,omitempty"`
|
||||
Errors *ErrorPage `json:"errors,omitempty" yaml:"errors,omitempty"`
|
||||
RateLimit *RateLimit `json:"rateLimit,omitempty" yaml:"rateLimit,omitempty"`
|
||||
RedirectRegex *RedirectRegex `json:"redirectRegex,omitempty" yaml:"redirectRegex,omitempty"`
|
||||
RedirectScheme *RedirectScheme `json:"redirectScheme,omitempty" yaml:"redirectScheme,omitempty"`
|
||||
BasicAuth *BasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
|
||||
DigestAuth *DigestAuth `json:"digestAuth,omitempty" yaml:"digestAuth,omitempty"`
|
||||
ForwardAuth *ForwardAuth `json:"forwardAuth,omitempty" yaml:"forwardAuth,omitempty"`
|
||||
MaxConn *MaxConn `json:"maxConn,omitempty" yaml:"maxConn,omitempty"`
|
||||
Buffering *Buffering `json:"buffering,omitempty" yaml:"buffering,omitempty"`
|
||||
CircuitBreaker *CircuitBreaker `json:"circuitBreaker,omitempty" yaml:"circuitBreaker,omitempty"`
|
||||
Compress *Compress `json:"compress,omitempty" label:"allowEmpty" yaml:"compress,omitempty" label:"allowEmpty"`
|
||||
PassTLSClientCert *PassTLSClientCert `json:"passTLSClientCert,omitempty" yaml:"passTLSClientCert,omitempty"`
|
||||
Retry *Retry `json:"retry,omitempty" yaml:"retry,omitempty"`
|
||||
AddPrefix *AddPrefix `json:"addPrefix,omitempty" toml:"addPrefix,omitempty" yaml:"addPrefix,omitempty"`
|
||||
StripPrefix *StripPrefix `json:"stripPrefix,omitempty" toml:"stripPrefix,omitempty" yaml:"stripPrefix,omitempty"`
|
||||
StripPrefixRegex *StripPrefixRegex `json:"stripPrefixRegex,omitempty" toml:"stripPrefixRegex,omitempty" yaml:"stripPrefixRegex,omitempty"`
|
||||
ReplacePath *ReplacePath `json:"replacePath,omitempty" toml:"replacePath,omitempty" yaml:"replacePath,omitempty"`
|
||||
ReplacePathRegex *ReplacePathRegex `json:"replacePathRegex,omitempty" toml:"replacePathRegex,omitempty" yaml:"replacePathRegex,omitempty"`
|
||||
Chain *Chain `json:"chain,omitempty" toml:"chain,omitempty" yaml:"chain,omitempty"`
|
||||
IPWhiteList *IPWhiteList `json:"ipWhiteList,omitempty" toml:"ipWhiteList,omitempty" yaml:"ipWhiteList,omitempty"`
|
||||
Headers *Headers `json:"headers,omitempty" toml:"headers,omitempty" yaml:"headers,omitempty"`
|
||||
Errors *ErrorPage `json:"errors,omitempty" toml:"errors,omitempty" yaml:"errors,omitempty"`
|
||||
RateLimit *RateLimit `json:"rateLimit,omitempty" toml:"rateLimit,omitempty" yaml:"rateLimit,omitempty"`
|
||||
RedirectRegex *RedirectRegex `json:"redirectRegex,omitempty" toml:"redirectRegex,omitempty" yaml:"redirectRegex,omitempty"`
|
||||
RedirectScheme *RedirectScheme `json:"redirectScheme,omitempty" toml:"redirectScheme,omitempty" yaml:"redirectScheme,omitempty"`
|
||||
BasicAuth *BasicAuth `json:"basicAuth,omitempty" toml:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
|
||||
DigestAuth *DigestAuth `json:"digestAuth,omitempty" toml:"digestAuth,omitempty" yaml:"digestAuth,omitempty"`
|
||||
ForwardAuth *ForwardAuth `json:"forwardAuth,omitempty" toml:"forwardAuth,omitempty" yaml:"forwardAuth,omitempty"`
|
||||
MaxConn *MaxConn `json:"maxConn,omitempty" toml:"maxConn,omitempty" yaml:"maxConn,omitempty"`
|
||||
Buffering *Buffering `json:"buffering,omitempty" toml:"buffering,omitempty" yaml:"buffering,omitempty"`
|
||||
CircuitBreaker *CircuitBreaker `json:"circuitBreaker,omitempty" toml:"circuitBreaker,omitempty" yaml:"circuitBreaker,omitempty"`
|
||||
Compress *Compress `json:"compress,omitempty" toml:"compress,omitempty" yaml:"compress,omitempty" label:"allowEmpty"`
|
||||
PassTLSClientCert *PassTLSClientCert `json:"passTLSClientCert,omitempty" toml:"passTLSClientCert,omitempty" yaml:"passTLSClientCert,omitempty"`
|
||||
Retry *Retry `json:"retry,omitempty" toml:"retry,omitempty" yaml:"retry,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// AddPrefix holds the AddPrefix configuration.
|
||||
type AddPrefix struct {
|
||||
Prefix string `json:"prefix,omitempty"`
|
||||
Prefix string `json:"prefix,omitempty" toml:"prefix,omitempty" yaml:"prefix,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// Auth holds the authentication configuration (BASIC, DIGEST, users).
|
||||
type Auth struct {
|
||||
Basic *BasicAuth `json:"basic,omitempty" export:"true"`
|
||||
Digest *DigestAuth `json:"digest,omitempty" export:"true"`
|
||||
Forward *ForwardAuth `json:"forward,omitempty" export:"true"`
|
||||
Basic *BasicAuth `json:"basic,omitempty" toml:"basic,omitempty" yaml:"basic,omitempty" export:"true"`
|
||||
Digest *DigestAuth `json:"digest,omitempty" toml:"digest,omitempty" yaml:"digest,omitempty" export:"true"`
|
||||
Forward *ForwardAuth `json:"forward,omitempty" toml:"forward,omitempty" yaml:"forward,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// BasicAuth holds the HTTP basic authentication configuration.
|
||||
type BasicAuth struct {
|
||||
Users Users `json:"users,omitempty"`
|
||||
UsersFile string `json:"usersFile,omitempty"`
|
||||
Realm string `json:"realm,omitempty"`
|
||||
RemoveHeader bool `json:"removeHeader,omitempty"`
|
||||
HeaderField string `json:"headerField,omitempty" export:"true"`
|
||||
Users Users `json:"users,omitempty" toml:"users,omitempty" yaml:"users,omitempty"`
|
||||
UsersFile string `json:"usersFile,omitempty" toml:"usersFile,omitempty" yaml:"usersFile,omitempty"`
|
||||
Realm string `json:"realm,omitempty" toml:"realm,omitempty" yaml:"realm,omitempty"`
|
||||
RemoveHeader bool `json:"removeHeader,omitempty" toml:"removeHeader,omitempty" yaml:"removeHeader,omitempty"`
|
||||
HeaderField string `json:"headerField,omitempty" toml:"headerField,omitempty" yaml:"headerField,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// Buffering holds the request/response buffering configuration.
|
||||
type Buffering struct {
|
||||
MaxRequestBodyBytes int64 `json:"maxRequestBodyBytes,omitempty"`
|
||||
MemRequestBodyBytes int64 `json:"memRequestBodyBytes,omitempty"`
|
||||
MaxResponseBodyBytes int64 `json:"maxResponseBodyBytes,omitempty"`
|
||||
MemResponseBodyBytes int64 `json:"memResponseBodyBytes,omitempty"`
|
||||
RetryExpression string `json:"retryExpression,omitempty"`
|
||||
MaxRequestBodyBytes int64 `json:"maxRequestBodyBytes,omitempty" toml:"maxRequestBodyBytes,omitempty" yaml:"maxRequestBodyBytes,omitempty"`
|
||||
MemRequestBodyBytes int64 `json:"memRequestBodyBytes,omitempty" toml:"memRequestBodyBytes,omitempty" yaml:"memRequestBodyBytes,omitempty"`
|
||||
MaxResponseBodyBytes int64 `json:"maxResponseBodyBytes,omitempty" toml:"maxResponseBodyBytes,omitempty" yaml:"maxResponseBodyBytes,omitempty"`
|
||||
MemResponseBodyBytes int64 `json:"memResponseBodyBytes,omitempty" toml:"memResponseBodyBytes,omitempty" yaml:"memResponseBodyBytes,omitempty"`
|
||||
RetryExpression string `json:"retryExpression,omitempty" toml:"retryExpression,omitempty" yaml:"retryExpression,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// Chain holds a chain of middlewares
|
||||
type Chain struct {
|
||||
Middlewares []string `json:"middlewares"`
|
||||
Middlewares []string `json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// CircuitBreaker holds the circuit breaker configuration.
|
||||
type CircuitBreaker struct {
|
||||
Expression string `json:"expression,omitempty"`
|
||||
Expression string `json:"expression,omitempty" toml:"expression,omitempty" yaml:"expression,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
@ -93,74 +99,74 @@ type Compress struct{}
|
|||
|
||||
// DigestAuth holds the Digest HTTP authentication configuration.
|
||||
type DigestAuth struct {
|
||||
Users Users `json:"users,omitempty"`
|
||||
UsersFile string `json:"usersFile,omitempty"`
|
||||
RemoveHeader bool `json:"removeHeader,omitempty"`
|
||||
Realm string `json:"realm,omitempty" mapstructure:","`
|
||||
HeaderField string `json:"headerField,omitempty" export:"true"`
|
||||
Users Users `json:"users,omitempty" toml:"users,omitempty" yaml:"users,omitempty"`
|
||||
UsersFile string `json:"usersFile,omitempty" toml:"usersFile,omitempty" yaml:"usersFile,omitempty"`
|
||||
RemoveHeader bool `json:"removeHeader,omitempty" toml:"removeHeader,omitempty" yaml:"removeHeader,omitempty"`
|
||||
Realm string `json:"realm,omitempty" toml:"realm,omitempty" yaml:"realm,omitempty"`
|
||||
HeaderField string `json:"headerField,omitempty" toml:"headerField,omitempty" yaml:"headerField,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// ErrorPage holds the custom error page configuration.
|
||||
type ErrorPage struct {
|
||||
Status []string `json:"status,omitempty"`
|
||||
Service string `json:"service,omitempty"`
|
||||
Query string `json:"query,omitempty"`
|
||||
Status []string `json:"status,omitempty" toml:"status,omitempty" yaml:"status,omitempty"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty"`
|
||||
Query string `json:"query,omitempty" toml:"query,omitempty" yaml:"query,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// ForwardAuth holds the http forward authentication configuration.
|
||||
type ForwardAuth struct {
|
||||
Address string `description:"Authentication server address" json:"address,omitempty"`
|
||||
TLS *ClientTLS `description:"Enable TLS support" json:"tls,omitempty" export:"true"`
|
||||
TrustForwardHeader bool `description:"Trust X-Forwarded-* headers" json:"trustForwardHeader,omitempty" export:"true"`
|
||||
AuthResponseHeaders []string `description:"Headers to be forwarded from auth response" json:"authResponseHeaders,omitempty"`
|
||||
Address string `json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
|
||||
TLS *ClientTLS `json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
TrustForwardHeader bool `json:"trustForwardHeader,omitempty" toml:"trustForwardHeader,omitempty" yaml:"trustForwardHeader,omitempty" export:"true"`
|
||||
AuthResponseHeaders []string `json:"authResponseHeaders,omitempty" toml:"authResponseHeaders,omitempty" yaml:"authResponseHeaders,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// Headers holds the custom header configuration.
|
||||
type Headers struct {
|
||||
CustomRequestHeaders map[string]string `json:"customRequestHeaders,omitempty"`
|
||||
CustomResponseHeaders map[string]string `json:"customResponseHeaders,omitempty"`
|
||||
CustomRequestHeaders map[string]string `json:"customRequestHeaders,omitempty" toml:"customRequestHeaders,omitempty" yaml:"customRequestHeaders,omitempty"`
|
||||
CustomResponseHeaders map[string]string `json:"customResponseHeaders,omitempty" toml:"customResponseHeaders,omitempty" yaml:"customResponseHeaders,omitempty"`
|
||||
|
||||
// AccessControlAllowCredentials is only valid if true. false is ignored.
|
||||
AccessControlAllowCredentials bool `json:"AccessControlAllowCredentials,omitempty"`
|
||||
AccessControlAllowCredentials bool `json:"accessControlAllowCredentials,omitempty" toml:"accessControlAllowCredentials,omitempty" yaml:"accessControlAllowCredentials,omitempty"`
|
||||
// AccessControlAllowHeaders must be used in response to a preflight request with Access-Control-Request-Headers set.
|
||||
AccessControlAllowHeaders []string `json:"AccessControlAllowHeaders,omitempty"`
|
||||
AccessControlAllowHeaders []string `json:"accessControlAllowHeaders,omitempty" toml:"accessControlAllowHeaders,omitempty" yaml:"accessControlAllowHeaders,omitempty"`
|
||||
// AccessControlAllowMethods must be used in response to a preflight request with Access-Control-Request-Method set.
|
||||
AccessControlAllowMethods []string `json:"AccessControlAllowMethods,omitempty"`
|
||||
AccessControlAllowMethods []string `json:"accessControlAllowMethods,omitempty" toml:"accessControlAllowMethods,omitempty" yaml:"accessControlAllowMethods,omitempty"`
|
||||
// AccessControlAllowOrigin Can be "origin-list-or-null" or "*". From (https://www.w3.org/TR/cors/#access-control-allow-origin-response-header)
|
||||
AccessControlAllowOrigin string `json:"AccessControlAllowOrigin,omitempty"`
|
||||
AccessControlAllowOrigin string `json:"accessControlAllowOrigin,omitempty" toml:"accessControlAllowOrigin,omitempty" yaml:"accessControlAllowOrigin,omitempty"`
|
||||
// AccessControlExposeHeaders sets valid headers for the response.
|
||||
AccessControlExposeHeaders []string `json:"AccessControlExposeHeaders,omitempty"`
|
||||
AccessControlExposeHeaders []string `json:"accessControlExposeHeaders,omitempty" toml:"accessControlExposeHeaders,omitempty" yaml:"accessControlExposeHeaders,omitempty"`
|
||||
// AccessControlMaxAge sets the time that a preflight request may be cached.
|
||||
AccessControlMaxAge int64 `json:"AccessControlMaxAge,omitempty"`
|
||||
AccessControlMaxAge int64 `json:"accessControlMaxAge,omitempty" toml:"accessControlMaxAge,omitempty" yaml:"accessControlMaxAge,omitempty"`
|
||||
// AddVaryHeader controls if the Vary header is automatically added/updated when the AccessControlAllowOrigin is set.
|
||||
AddVaryHeader bool `json:"AddVaryHeader,omitempty"`
|
||||
AddVaryHeader bool `json:"addVaryHeader,omitempty" toml:"addVaryHeader,omitempty" yaml:"addVaryHeader,omitempty"`
|
||||
|
||||
AllowedHosts []string `json:"allowedHosts,omitempty"`
|
||||
HostsProxyHeaders []string `json:"hostsProxyHeaders,omitempty"`
|
||||
SSLRedirect bool `json:"sslRedirect,omitempty"`
|
||||
SSLTemporaryRedirect bool `json:"sslTemporaryRedirect,omitempty"`
|
||||
SSLHost string `json:"sslHost,omitempty"`
|
||||
SSLProxyHeaders map[string]string `json:"sslProxyHeaders,omitempty"`
|
||||
SSLForceHost bool `json:"sslForceHost,omitempty"`
|
||||
STSSeconds int64 `json:"stsSeconds,omitempty"`
|
||||
STSIncludeSubdomains bool `json:"stsIncludeSubdomains,omitempty"`
|
||||
STSPreload bool `json:"stsPreload,omitempty"`
|
||||
ForceSTSHeader bool `json:"forceSTSHeader,omitempty"`
|
||||
FrameDeny bool `json:"frameDeny,omitempty"`
|
||||
CustomFrameOptionsValue string `json:"customFrameOptionsValue,omitempty"`
|
||||
ContentTypeNosniff bool `json:"contentTypeNosniff,omitempty"`
|
||||
BrowserXSSFilter bool `json:"browserXssFilter,omitempty"`
|
||||
CustomBrowserXSSValue string `json:"customBrowserXSSValue,omitempty"`
|
||||
ContentSecurityPolicy string `json:"contentSecurityPolicy,omitempty"`
|
||||
PublicKey string `json:"publicKey,omitempty"`
|
||||
ReferrerPolicy string `json:"referrerPolicy,omitempty"`
|
||||
IsDevelopment bool `json:"isDevelopment,omitempty"`
|
||||
AllowedHosts []string `json:"allowedHosts,omitempty" toml:"allowedHosts,omitempty" yaml:"allowedHosts,omitempty"`
|
||||
HostsProxyHeaders []string `json:"hostsProxyHeaders,omitempty" toml:"hostsProxyHeaders,omitempty" yaml:"hostsProxyHeaders,omitempty"`
|
||||
SSLRedirect bool `json:"sslRedirect,omitempty" toml:"sslRedirect,omitempty" yaml:"sslRedirect,omitempty"`
|
||||
SSLTemporaryRedirect bool `json:"sslTemporaryRedirect,omitempty" toml:"sslTemporaryRedirect,omitempty" yaml:"sslTemporaryRedirect,omitempty"`
|
||||
SSLHost string `json:"sslHost,omitempty" toml:"sslHost,omitempty" yaml:"sslHost,omitempty"`
|
||||
SSLProxyHeaders map[string]string `json:"sslProxyHeaders,omitempty" toml:"sslProxyHeaders,omitempty" yaml:"sslProxyHeaders,omitempty"`
|
||||
SSLForceHost bool `json:"sslForceHost,omitempty" toml:"sslForceHost,omitempty" yaml:"sslForceHost,omitempty"`
|
||||
STSSeconds int64 `json:"stsSeconds,omitempty" toml:"stsSeconds,omitempty" yaml:"stsSeconds,omitempty"`
|
||||
STSIncludeSubdomains bool `json:"stsIncludeSubdomains,omitempty" toml:"stsIncludeSubdomains,omitempty" yaml:"stsIncludeSubdomains,omitempty"`
|
||||
STSPreload bool `json:"stsPreload,omitempty" toml:"stsPreload,omitempty" yaml:"stsPreload,omitempty"`
|
||||
ForceSTSHeader bool `json:"forceSTSHeader,omitempty" toml:"forceSTSHeader,omitempty" yaml:"forceSTSHeader,omitempty"`
|
||||
FrameDeny bool `json:"frameDeny,omitempty" toml:"frameDeny,omitempty" yaml:"frameDeny,omitempty"`
|
||||
CustomFrameOptionsValue string `json:"customFrameOptionsValue,omitempty" toml:"customFrameOptionsValue,omitempty" yaml:"customFrameOptionsValue,omitempty"`
|
||||
ContentTypeNosniff bool `json:"contentTypeNosniff,omitempty" toml:"contentTypeNosniff,omitempty" yaml:"contentTypeNosniff,omitempty"`
|
||||
BrowserXSSFilter bool `json:"browserXssFilter,omitempty" toml:"browserXssFilter,omitempty" yaml:"browserXssFilter,omitempty"`
|
||||
CustomBrowserXSSValue string `json:"customBrowserXSSValue,omitempty" toml:"customBrowserXSSValue,omitempty" yaml:"customBrowserXSSValue,omitempty"`
|
||||
ContentSecurityPolicy string `json:"contentSecurityPolicy,omitempty" toml:"contentSecurityPolicy,omitempty" yaml:"contentSecurityPolicy,omitempty"`
|
||||
PublicKey string `json:"publicKey,omitempty" toml:"publicKey,omitempty" yaml:"publicKey,omitempty"`
|
||||
ReferrerPolicy string `json:"referrerPolicy,omitempty" toml:"referrerPolicy,omitempty" yaml:"referrerPolicy,omitempty"`
|
||||
IsDevelopment bool `json:"isDevelopment,omitempty" toml:"isDevelopment,omitempty" yaml:"isDevelopment,omitempty"`
|
||||
}
|
||||
|
||||
// HasCustomHeadersDefined checks to see if any of the custom header elements have been set
|
||||
|
@ -208,8 +214,8 @@ func (h *Headers) HasSecureHeadersDefined() bool {
|
|||
|
||||
// IPStrategy holds the ip strategy configuration.
|
||||
type IPStrategy struct {
|
||||
Depth int `json:"depth,omitempty" export:"true"`
|
||||
ExcludedIPs []string `json:"excludedIPs,omitempty"`
|
||||
Depth int `json:"depth,omitempty" toml:"depth,omitempty" yaml:"depth,omitempty" export:"true"`
|
||||
ExcludedIPs []string `json:"excludedIPs,omitempty" toml:"excludedIPs,omitempty" yaml:"excludedIPs,omitempty"`
|
||||
}
|
||||
|
||||
// Get an IP selection strategy
|
||||
|
@ -244,16 +250,16 @@ func (s *IPStrategy) Get() (ip.Strategy, error) {
|
|||
|
||||
// IPWhiteList holds the ip white list configuration.
|
||||
type IPWhiteList struct {
|
||||
SourceRange []string `json:"sourceRange,omitempty"`
|
||||
IPStrategy *IPStrategy `json:"ipStrategy,omitempty" label:"allowEmpty"`
|
||||
SourceRange []string `json:"sourceRange,omitempty" toml:"sourceRange,omitempty" yaml:"sourceRange,omitempty"`
|
||||
IPStrategy *IPStrategy `json:"ipStrategy,omitempty" toml:"ipStrategy,omitempty" yaml:"ipStrategy,omitempty" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// MaxConn holds maximum connection configuration.
|
||||
type MaxConn struct {
|
||||
Amount int64 `json:"amount,omitempty"`
|
||||
ExtractorFunc string `json:"extractorFunc,omitempty"`
|
||||
Amount int64 `json:"amount,omitempty" toml:"amount,omitempty" yaml:"amount,omitempty"`
|
||||
ExtractorFunc string `json:"extractorFunc,omitempty" toml:"extractorFunc,omitempty" yaml:"extractorFunc,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults Default values for a MaxConn.
|
||||
|
@ -265,26 +271,26 @@ func (m *MaxConn) SetDefaults() {
|
|||
|
||||
// PassTLSClientCert holds the TLS client cert headers configuration.
|
||||
type PassTLSClientCert struct {
|
||||
PEM bool `description:"Enable header with escaped client pem" json:"pem"`
|
||||
Info *TLSClientCertificateInfo `description:"Enable header with configured client cert info" json:"info,omitempty"`
|
||||
PEM bool `json:"pem,omitempty" toml:"pem,omitempty" yaml:"pem,omitempty"`
|
||||
Info *TLSClientCertificateInfo `json:"info,omitempty" toml:"info,omitempty" yaml:"info,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// Rate holds the rate limiting configuration for a specific time period.
|
||||
type Rate struct {
|
||||
Period types.Duration `json:"period,omitempty"`
|
||||
Average int64 `json:"average,omitempty"`
|
||||
Burst int64 `json:"burst,omitempty"`
|
||||
Period types.Duration `json:"period,omitempty" toml:"period,omitempty" yaml:"period,omitempty"`
|
||||
Average int64 `json:"average,omitempty" toml:"average,omitempty" yaml:"average,omitempty"`
|
||||
Burst int64 `json:"burst,omitempty" toml:"burst,omitempty" yaml:"burst,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// RateLimit holds the rate limiting configuration for a given frontend.
|
||||
type RateLimit struct {
|
||||
RateSet map[string]*Rate `json:"rateset,omitempty"`
|
||||
RateSet map[string]*Rate `json:"rateSet,omitempty" toml:"rateSet,omitempty" yaml:"rateSet,omitempty"`
|
||||
// FIXME replace by ipStrategy see oxy and replace
|
||||
ExtractorFunc string `json:"extractorFunc,omitempty"`
|
||||
ExtractorFunc string `json:"extractorFunc,omitempty" toml:"extractorFunc,omitempty" yaml:"extractorFunc,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults Default values for a MaxConn.
|
||||
|
@ -296,65 +302,65 @@ func (r *RateLimit) SetDefaults() {
|
|||
|
||||
// RedirectRegex holds the redirection configuration.
|
||||
type RedirectRegex struct {
|
||||
Regex string `json:"regex,omitempty"`
|
||||
Replacement string `json:"replacement,omitempty"`
|
||||
Permanent bool `json:"permanent,omitempty"`
|
||||
Regex string `json:"regex,omitempty" toml:"regex,omitempty" yaml:"regex,omitempty"`
|
||||
Replacement string `json:"replacement,omitempty" toml:"replacement,omitempty" yaml:"replacement,omitempty"`
|
||||
Permanent bool `json:"permanent,omitempty" toml:"permanent,omitempty" yaml:"permanent,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// RedirectScheme holds the scheme redirection configuration.
|
||||
type RedirectScheme struct {
|
||||
Scheme string `json:"scheme,omitempty"`
|
||||
Port string `json:"port,omitempty"`
|
||||
Permanent bool `json:"permanent,omitempty"`
|
||||
Scheme string `json:"scheme,omitempty" toml:"scheme,omitempty" yaml:"scheme,omitempty"`
|
||||
Port string `json:"port,omitempty" toml:"port,omitempty" yaml:"port,omitempty"`
|
||||
Permanent bool `json:"permanent,omitempty" toml:"permanent,omitempty" yaml:"permanent,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// ReplacePath holds the ReplacePath configuration.
|
||||
type ReplacePath struct {
|
||||
Path string `json:"path,omitempty"`
|
||||
Path string `json:"path,omitempty" toml:"path,omitempty" yaml:"path,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// ReplacePathRegex holds the ReplacePathRegex configuration.
|
||||
type ReplacePathRegex struct {
|
||||
Regex string `json:"regex,omitempty"`
|
||||
Replacement string `json:"replacement,omitempty"`
|
||||
Regex string `json:"regex,omitempty" toml:"regex,omitempty" yaml:"regex,omitempty"`
|
||||
Replacement string `json:"replacement,omitempty" toml:"replacement,omitempty" yaml:"replacement,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// Retry holds the retry configuration.
|
||||
type Retry struct {
|
||||
Attempts int `description:"Number of attempts" export:"true"`
|
||||
Attempts int `json:"attempts,omitempty" toml:"attempts,omitempty" yaml:"attempts,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// StripPrefix holds the StripPrefix configuration.
|
||||
type StripPrefix struct {
|
||||
Prefixes []string `json:"prefixes,omitempty"`
|
||||
Prefixes []string `json:"prefixes,omitempty" toml:"prefixes,omitempty" yaml:"prefixes,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// StripPrefixRegex holds the StripPrefixRegex configuration.
|
||||
type StripPrefixRegex struct {
|
||||
Regex []string `json:"regex,omitempty"`
|
||||
Regex []string `json:"regex,omitempty" toml:"regex,omitempty" yaml:"regex,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
||||
// TLSClientCertificateInfo holds the client TLS certificate info configuration.
|
||||
type TLSClientCertificateInfo struct {
|
||||
NotAfter bool `description:"Add NotAfter info in header" json:"notAfter"`
|
||||
NotBefore bool `description:"Add NotBefore info in header" json:"notBefore"`
|
||||
Sans bool `description:"Add Sans info in header" json:"sans"`
|
||||
Subject *TLSCLientCertificateDNInfo `description:"Add Subject info in header" json:"subject,omitempty"`
|
||||
Issuer *TLSCLientCertificateDNInfo `description:"Add Issuer info in header" json:"issuer,omitempty"`
|
||||
NotAfter bool `json:"notAfter,omitempty" toml:"notAfter,omitempty" yaml:"notAfter,omitempty"`
|
||||
NotBefore bool `json:"notBefore,omitempty" toml:"notBefore,omitempty" yaml:"notBefore,omitempty"`
|
||||
Sans bool `json:"sans,omitempty" toml:"sans,omitempty" yaml:"sans,omitempty"`
|
||||
Subject *TLSCLientCertificateDNInfo `json:"subject,omitempty" toml:"subject,omitempty" yaml:"subject,omitempty"`
|
||||
Issuer *TLSCLientCertificateDNInfo `json:"issuer,omitempty" toml:"issuer,omitempty" yaml:"issuer,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
@ -362,13 +368,13 @@ type TLSClientCertificateInfo struct {
|
|||
// TLSCLientCertificateDNInfo holds the client TLS certificate distinguished name info configuration
|
||||
// cf https://tools.ietf.org/html/rfc3739
|
||||
type TLSCLientCertificateDNInfo struct {
|
||||
Country bool `description:"Add Country info in header" json:"country"`
|
||||
Province bool `description:"Add Province info in header" json:"province"`
|
||||
Locality bool `description:"Add Locality info in header" json:"locality"`
|
||||
Organization bool `description:"Add Organization info in header" json:"organization"`
|
||||
CommonName bool `description:"Add CommonName info in header" json:"commonName"`
|
||||
SerialNumber bool `description:"Add SerialNumber info in header" json:"serialNumber"`
|
||||
DomainComponent bool `description:"Add Domain Component info in header" json:"domainComponent"`
|
||||
Country bool `json:"country,omitempty" toml:"country,omitempty" yaml:"country,omitempty"`
|
||||
Province bool `json:"province,omitempty" toml:"province,omitempty" yaml:"province,omitempty"`
|
||||
Locality bool `json:"locality,omitempty" toml:"locality,omitempty" yaml:"locality,omitempty"`
|
||||
Organization bool `json:"organization,omitempty" toml:"organization,omitempty" yaml:"organization,omitempty"`
|
||||
CommonName bool `json:"commonName,omitempty" toml:"commonName,omitempty" yaml:"commonName,omitempty"`
|
||||
SerialNumber bool `json:"serialNumber,omitempty" toml:"serialNumber,omitempty" yaml:"serialNumber,omitempty"`
|
||||
DomainComponent bool `json:"domainComponent,omitempty" toml:"domainComponent,omitempty" yaml:"domainComponent,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
@ -381,9 +387,78 @@ type Users []string
|
|||
// ClientTLS holds the TLS specific configurations as client
|
||||
// CA, Cert and Key can be either path or file contents.
|
||||
type ClientTLS struct {
|
||||
CA string `description:"TLS CA" json:"ca,omitempty"`
|
||||
CAOptional bool `description:"TLS CA.Optional" json:"caOptional,omitempty"`
|
||||
Cert string `description:"TLS cert" json:"cert,omitempty"`
|
||||
Key string `description:"TLS key" json:"key,omitempty"`
|
||||
InsecureSkipVerify bool `description:"TLS insecure skip verify" json:"insecureSkipVerify,omitempty"`
|
||||
CA string `json:"ca,omitempty" toml:"ca,omitempty" yaml:"ca,omitempty"`
|
||||
CAOptional bool `json:"caOptional,omitempty" toml:"caOptional,omitempty" yaml:"caOptional,omitempty"`
|
||||
Cert string `json:"cert,omitempty" toml:"cert,omitempty" yaml:"cert,omitempty"`
|
||||
Key string `json:"key,omitempty" toml:"key,omitempty" yaml:"key,omitempty"`
|
||||
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty" toml:"insecureSkipVerify,omitempty" yaml:"insecureSkipVerify,omitempty"`
|
||||
}
|
||||
|
||||
// CreateTLSConfig creates a TLS config from ClientTLS structures.
|
||||
func (clientTLS *ClientTLS) CreateTLSConfig() (*tls.Config, error) {
|
||||
if clientTLS == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var err error
|
||||
caPool := x509.NewCertPool()
|
||||
clientAuth := tls.NoClientCert
|
||||
if clientTLS.CA != "" {
|
||||
var ca []byte
|
||||
if _, errCA := os.Stat(clientTLS.CA); errCA == nil {
|
||||
ca, err = ioutil.ReadFile(clientTLS.CA)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read CA. %s", err)
|
||||
}
|
||||
} else {
|
||||
ca = []byte(clientTLS.CA)
|
||||
}
|
||||
|
||||
if !caPool.AppendCertsFromPEM(ca) {
|
||||
return nil, fmt.Errorf("failed to parse CA")
|
||||
}
|
||||
|
||||
if clientTLS.CAOptional {
|
||||
clientAuth = tls.VerifyClientCertIfGiven
|
||||
} else {
|
||||
clientAuth = tls.RequireAndVerifyClientCert
|
||||
}
|
||||
}
|
||||
|
||||
cert := tls.Certificate{}
|
||||
_, errKeyIsFile := os.Stat(clientTLS.Key)
|
||||
|
||||
if !clientTLS.InsecureSkipVerify && (len(clientTLS.Cert) == 0 || len(clientTLS.Key) == 0) {
|
||||
return nil, fmt.Errorf("TLS Certificate or Key file must be set when TLS configuration is created")
|
||||
}
|
||||
|
||||
if len(clientTLS.Cert) > 0 && len(clientTLS.Key) > 0 {
|
||||
if _, errCertIsFile := os.Stat(clientTLS.Cert); errCertIsFile == nil {
|
||||
if errKeyIsFile == nil {
|
||||
cert, err = tls.LoadX509KeyPair(clientTLS.Cert, clientTLS.Key)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to load TLS keypair: %v", err)
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("tls cert is a file, but tls key is not")
|
||||
}
|
||||
} else {
|
||||
if errKeyIsFile != nil {
|
||||
cert, err = tls.X509KeyPair([]byte(clientTLS.Cert), []byte(clientTLS.Key))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to load TLS keypair: %v", err)
|
||||
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("TLS key is a file, but tls cert is not")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &tls.Config{
|
||||
Certificates: []tls.Certificate{cert},
|
||||
RootCAs: caPool,
|
||||
InsecureSkipVerify: clientTLS.InsecureSkipVerify,
|
||||
ClientAuth: clientAuth,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ package static
|
|||
|
||||
// EntryPoint holds the entry point configuration.
|
||||
type EntryPoint struct {
|
||||
Address string `description:"Entry point address."`
|
||||
Transport *EntryPointsTransport `description:"Configures communication between clients and Traefik."`
|
||||
ProxyProtocol *ProxyProtocol `description:"Proxy-Protocol configuration." label:"allowEmpty"`
|
||||
ForwardedHeaders *ForwardedHeaders `description:"Trust client forwarding headers."`
|
||||
Address string `description:"Entry point address." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
|
||||
Transport *EntryPointsTransport `description:"Configures communication between clients and Traefik." json:"transport,omitempty" toml:"transport,omitempty" yaml:"transport,omitempty"`
|
||||
ProxyProtocol *ProxyProtocol `description:"Proxy-Protocol configuration." json:"proxyProtocol,omitempty" toml:"proxyProtocol,omitempty" yaml:"proxyProtocol,omitempty" label:"allowEmpty"`
|
||||
ForwardedHeaders *ForwardedHeaders `description:"Trust client forwarding headers." json:"forwardedHeaders,omitempty" toml:"forwardedHeaders,omitempty" yaml:"forwardedHeaders,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -17,14 +17,14 @@ func (e *EntryPoint) SetDefaults() {
|
|||
|
||||
// ForwardedHeaders Trust client forwarding headers.
|
||||
type ForwardedHeaders struct {
|
||||
Insecure bool `description:"Trust all forwarded headers." export:"true"`
|
||||
TrustedIPs []string `description:"Trust only forwarded headers from selected IPs."`
|
||||
Insecure bool `description:"Trust all forwarded headers." json:"insecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"true"`
|
||||
TrustedIPs []string `description:"Trust only forwarded headers from selected IPs." json:"trustedIPs,omitempty" toml:"trustedIPs,omitempty" yaml:"trustedIPs,omitempty"`
|
||||
}
|
||||
|
||||
// ProxyProtocol contains Proxy-Protocol configuration.
|
||||
type ProxyProtocol struct {
|
||||
Insecure bool `description:"Trust all." export:"true"`
|
||||
TrustedIPs []string `description:"Trust only selected IPs."`
|
||||
Insecure bool `description:"Trust all." json:"insecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"true"`
|
||||
TrustedIPs []string `description:"Trust only selected IPs." json:"trustedIPs,omitempty" toml:"trustedIPs,omitempty" yaml:"trustedIPs,omitempty"`
|
||||
}
|
||||
|
||||
// EntryPoints holds the HTTP entry point list.
|
||||
|
@ -32,8 +32,8 @@ type EntryPoints map[string]*EntryPoint
|
|||
|
||||
// EntryPointsTransport configures communication between clients and Traefik.
|
||||
type EntryPointsTransport struct {
|
||||
LifeCycle *LifeCycle `description:"Timeouts influencing the server life cycle." export:"true"`
|
||||
RespondingTimeouts *RespondingTimeouts `description:"Timeouts for incoming requests to the Traefik instance." export:"true"`
|
||||
LifeCycle *LifeCycle `description:"Timeouts influencing the server life cycle." json:"lifeCycle,omitempty" toml:"lifeCycle,omitempty" yaml:"lifeCycle,omitempty" export:"true" export:"true"`
|
||||
RespondingTimeouts *RespondingTimeouts `description:"Timeouts for incoming requests to the Traefik instance." json:"respondingTimeouts,omitempty" toml:"respondingTimeouts,omitempty" yaml:"respondingTimeouts,omitempty" export:"true" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -43,48 +43,47 @@ const (
|
|||
|
||||
// Configuration is the static configuration
|
||||
type Configuration struct {
|
||||
Global *Global `description:"Global configuration options" export:"true"`
|
||||
Global *Global `description:"Global configuration options" json:"global,omitempty" toml:"global,omitempty" yaml:"global,omitempty" export:"true"`
|
||||
|
||||
ServersTransport *ServersTransport `description:"Servers default transport." export:"true"`
|
||||
EntryPoints EntryPoints `description:"Entry points definition." export:"true"`
|
||||
Providers *Providers `description:"Providers configuration." export:"true"`
|
||||
ServersTransport *ServersTransport `description:"Servers default transport." json:"serversTransport,omitempty" toml:"serversTransport,omitempty" yaml:"serversTransport,omitempty" export:"true"`
|
||||
EntryPoints EntryPoints `description:"Entry points definition." json:"entryPoints,omitempty" toml:"entryPoints,omitempty" yaml:"entryPoints,omitempty" export:"true"`
|
||||
Providers *Providers `description:"Providers configuration." json:"providers,omitempty" toml:"providers,omitempty" yaml:"providers,omitempty" export:"true"`
|
||||
|
||||
API *API `description:"Enable api/dashboard." export:"true" label:"allowEmpty"`
|
||||
Metrics *types.Metrics `description:"Enable a metrics exporter." export:"true"`
|
||||
Ping *ping.Handler `description:"Enable ping." export:"true" label:"allowEmpty"`
|
||||
// Rest *rest.Provider `description:"Enable Rest backend with default settings" export:"true"`
|
||||
API *API `description:"Enable api/dashboard." json:"api,omitempty" toml:"api,omitempty" yaml:"api,omitempty" label:"allowEmpty" export:"true"`
|
||||
Metrics *types.Metrics `description:"Enable a metrics exporter." json:"metrics,omitempty" toml:"metrics,omitempty" yaml:"metrics,omitempty" export:"true"`
|
||||
Ping *ping.Handler `description:"Enable ping." json:"ping,omitempty" toml:"ping,omitempty" yaml:"ping,omitempty" label:"allowEmpty" export:"true"`
|
||||
|
||||
Log *types.TraefikLog `description:"Traefik log settings." export:"true" label:"allowEmpty"`
|
||||
AccessLog *types.AccessLog `description:"Access log settings." export:"true" label:"allowEmpty"`
|
||||
Tracing *Tracing `description:"OpenTracing configuration." export:"true" label:"allowEmpty"`
|
||||
Log *types.TraefikLog `description:"Traefik log settings." json:"log,omitempty" toml:"log,omitempty" yaml:"log,omitempty" label:"allowEmpty" export:"true"`
|
||||
AccessLog *types.AccessLog `description:"Access log settings." json:"accessLog,omitempty" toml:"accessLog,omitempty" yaml:"accessLog,omitempty" label:"allowEmpty" export:"true"`
|
||||
Tracing *Tracing `description:"OpenTracing configuration." json:"tracing,omitempty" toml:"tracing,omitempty" yaml:"tracing,omitempty" label:"allowEmpty" export:"true"`
|
||||
|
||||
HostResolver *types.HostResolverConfig `description:"Enable CNAME Flattening." export:"true" label:"allowEmpty"`
|
||||
HostResolver *types.HostResolverConfig `description:"Enable CNAME Flattening." json:"hostResolver,omitempty" toml:"hostResolver,omitempty" yaml:"hostResolver,omitempty" label:"allowEmpty" export:"true"`
|
||||
|
||||
ACME *acmeprovider.Configuration `description:"Enable ACME (Let's Encrypt): automatic SSL." export:"true"`
|
||||
ACME *acmeprovider.Configuration `description:"Enable ACME (Let's Encrypt): automatic SSL." json:"acme,omitempty" toml:"acme,omitempty" yaml:"acme,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// Global holds the global configuration.
|
||||
type Global struct {
|
||||
CheckNewVersion bool `description:"Periodically check if a new version has been released." export:"true"`
|
||||
SendAnonymousUsage *bool `description:"Periodically send anonymous usage statistics. If the option is not specified, it will be enabled by default." export:"true"`
|
||||
CheckNewVersion bool `description:"Periodically check if a new version has been released." json:"checkNewVersion,omitempty" toml:"checkNewVersion,omitempty" yaml:"checkNewVersion,omitempty" label:"allowEmpty" export:"true"`
|
||||
SendAnonymousUsage *bool `description:"Periodically send anonymous usage statistics. If the option is not specified, it will be enabled by default." json:"sendAnonymousUsage,omitempty" toml:"sendAnonymousUsage,omitempty" yaml:"sendAnonymousUsage,omitempty" label:"allowEmpty" export:"true"`
|
||||
}
|
||||
|
||||
// ServersTransport options to configure communication between Traefik and the servers
|
||||
type ServersTransport struct {
|
||||
InsecureSkipVerify bool `description:"Disable SSL certificate verification." export:"true"`
|
||||
RootCAs []tls.FileOrContent `description:"Add cert file for self-signed certificate."`
|
||||
MaxIdleConnsPerHost int `description:"If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used" export:"true"`
|
||||
ForwardingTimeouts *ForwardingTimeouts `description:"Timeouts for requests forwarded to the backend servers." export:"true"`
|
||||
InsecureSkipVerify bool `description:"Disable SSL certificate verification." json:"insecureSkipVerify,omitempty" toml:"insecureSkipVerify,omitempty" yaml:"insecureSkipVerify,omitempty" export:"true"`
|
||||
RootCAs []tls.FileOrContent `description:"Add cert file for self-signed certificate." json:"rootCAs,omitempty" toml:"rootCAs,omitempty" yaml:"rootCAs,omitempty"`
|
||||
MaxIdleConnsPerHost int `description:"If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used" json:"maxIdleConnsPerHost,omitempty" toml:"maxIdleConnsPerHost,omitempty" yaml:"maxIdleConnsPerHost,omitempty" export:"true"`
|
||||
ForwardingTimeouts *ForwardingTimeouts `description:"Timeouts for requests forwarded to the backend servers." json:"forwardingTimeouts,omitempty" toml:"forwardingTimeouts,omitempty" yaml:"forwardingTimeouts,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// API holds the API configuration
|
||||
type API struct {
|
||||
EntryPoint string `description:"The entry point that the API handler will be bound to." export:"true"`
|
||||
Dashboard bool `description:"Activate dashboard." export:"true"`
|
||||
Debug bool `description:"Enable additional endpoints for debugging and profiling." export:"true"`
|
||||
Statistics *types.Statistics `description:"Enable more detailed statistics." export:"true" label:"allowEmpty"`
|
||||
Middlewares []string `description:"Middleware list." export:"true"`
|
||||
DashboardAssets *assetfs.AssetFS `json:"-" label:"-"`
|
||||
EntryPoint string `description:"The entry point that the API handler will be bound to." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"`
|
||||
Dashboard bool `description:"Activate dashboard." json:"dashboard,omitempty" toml:"dashboard,omitempty" yaml:"dashboard,omitempty" export:"true"`
|
||||
Debug bool `description:"Enable additional endpoints for debugging and profiling." json:"debug,omitempty" toml:"debug,omitempty" yaml:"debug,omitempty" export:"true"`
|
||||
Statistics *types.Statistics `description:"Enable more detailed statistics." json:"statistics,omitempty" toml:"statistics,omitempty" yaml:"statistics,omitempty" export:"true" label:"allowEmpty"`
|
||||
Middlewares []string `description:"Middleware list." json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
DashboardAssets *assetfs.AssetFS `json:"-" toml:"-" yaml:"-" label:"-"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -95,9 +94,9 @@ func (a *API) SetDefaults() {
|
|||
|
||||
// RespondingTimeouts contains timeout configurations for incoming requests to the Traefik instance.
|
||||
type RespondingTimeouts struct {
|
||||
ReadTimeout types.Duration `description:"ReadTimeout is the maximum duration for reading the entire request, including the body. If zero, no timeout is set." export:"true"`
|
||||
WriteTimeout types.Duration `description:"WriteTimeout is the maximum duration before timing out writes of the response. If zero, no timeout is set." export:"true"`
|
||||
IdleTimeout types.Duration `description:"IdleTimeout is the maximum amount duration an idle (keep-alive) connection will remain idle before closing itself. If zero, no timeout is set." export:"true"`
|
||||
ReadTimeout types.Duration `description:"ReadTimeout is the maximum duration for reading the entire request, including the body. If zero, no timeout is set." json:"readTimeout,omitempty" toml:"readTimeout,omitempty" yaml:"readTimeout,omitempty" export:"true"`
|
||||
WriteTimeout types.Duration `description:"WriteTimeout is the maximum duration before timing out writes of the response. If zero, no timeout is set." json:"writeTimeout,omitempty" toml:"writeTimeout,omitempty" yaml:"writeTimeout,omitempty" export:"true"`
|
||||
IdleTimeout types.Duration `description:"IdleTimeout is the maximum amount duration an idle (keep-alive) connection will remain idle before closing itself. If zero, no timeout is set." json:"idleTimeout,omitempty" toml:"idleTimeout,omitempty" yaml:"idleTimeout,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -107,9 +106,9 @@ func (a *RespondingTimeouts) SetDefaults() {
|
|||
|
||||
// ForwardingTimeouts contains timeout configurations for forwarding requests to the backend servers.
|
||||
type ForwardingTimeouts struct {
|
||||
DialTimeout types.Duration `description:"The amount of time to wait until a connection to a backend server can be established. If zero, no timeout exists." export:"true"`
|
||||
ResponseHeaderTimeout types.Duration `description:"The amount of time to wait for a server's response headers after fully writing the request (including its body, if any). If zero, no timeout exists." export:"true"`
|
||||
IdleConnTimeout types.Duration `description:"The maximum period for which an idle HTTP keep-alive connection will remain open before closing itself" export:"true"`
|
||||
DialTimeout types.Duration `description:"The amount of time to wait until a connection to a backend server can be established. If zero, no timeout exists." json:"dialTimeout,omitempty" toml:"dialTimeout,omitempty" yaml:"dialTimeout,omitempty" export:"true"`
|
||||
ResponseHeaderTimeout types.Duration `description:"The amount of time to wait for a server's response headers after fully writing the request (including its body, if any). If zero, no timeout exists." json:"responseHeaderTimeout,omitempty" toml:"responseHeaderTimeout,omitempty" yaml:"responseHeaderTimeout,omitempty" export:"true"`
|
||||
IdleConnTimeout types.Duration `description:"The maximum period for which an idle HTTP keep-alive connection will remain open before closing itself" json:"idleConnTimeout,omitempty" toml:"idleConnTimeout,omitempty" yaml:"idleConnTimeout,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -120,8 +119,8 @@ func (f *ForwardingTimeouts) SetDefaults() {
|
|||
|
||||
// LifeCycle contains configurations relevant to the lifecycle (such as the shutdown phase) of Traefik.
|
||||
type LifeCycle struct {
|
||||
RequestAcceptGraceTimeout types.Duration `description:"Duration to keep accepting requests before Traefik initiates the graceful shutdown procedure."`
|
||||
GraceTimeOut types.Duration `description:"Duration to give active requests a chance to finish before Traefik stops."`
|
||||
RequestAcceptGraceTimeout types.Duration `description:"Duration to keep accepting requests before Traefik initiates the graceful shutdown procedure." json:"requestAcceptGraceTimeout,omitempty" toml:"requestAcceptGraceTimeout,omitempty" yaml:"requestAcceptGraceTimeout,omitempty" export:"true"`
|
||||
GraceTimeOut types.Duration `description:"Duration to give active requests a chance to finish before Traefik stops." json:"graceTimeOut,omitempty" toml:"graceTimeOut,omitempty" yaml:"graceTimeOut,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -131,13 +130,13 @@ func (a *LifeCycle) SetDefaults() {
|
|||
|
||||
// Tracing holds the tracing configuration.
|
||||
type Tracing struct {
|
||||
ServiceName string `description:"Set the name for this service." export:"true"`
|
||||
SpanNameLimit int `description:"Set the maximum character limit for Span names (default 0 = no limit)." export:"true"`
|
||||
Jaeger *jaeger.Config `description:"Settings for jaeger." label:"allowEmpty"`
|
||||
Zipkin *zipkin.Config `description:"Settings for zipkin." label:"allowEmpty"`
|
||||
DataDog *datadog.Config `description:"Settings for DataDog." label:"allowEmpty"`
|
||||
Instana *instana.Config `description:"Settings for Instana." label:"allowEmpty"`
|
||||
Haystack *haystack.Config `description:"Settings for Haystack." label:"allowEmpty"`
|
||||
ServiceName string `description:"Set the name for this service." json:"serviceName,omitempty" toml:"serviceName,omitempty" yaml:"serviceName,omitempty" export:"true"`
|
||||
SpanNameLimit int `description:"Set the maximum character limit for Span names (default 0 = no limit)." json:"spanNameLimit,omitempty" toml:"spanNameLimit,omitempty" yaml:"spanNameLimit,omitempty" export:"true"`
|
||||
Jaeger *jaeger.Config `description:"Settings for Jaeger." json:"jaeger,omitempty" toml:"jaeger,omitempty" yaml:"jaeger,omitempty" export:"true" label:"allowEmpty"`
|
||||
Zipkin *zipkin.Config `description:"Settings for Zipkin." json:"zipkin,omitempty" toml:"zipkin,omitempty" yaml:"zipkin,omitempty" export:"true" label:"allowEmpty"`
|
||||
DataDog *datadog.Config `description:"Settings for DataDog." json:"dataDog,omitempty" toml:"dataDog,omitempty" yaml:"dataDog,omitempty" export:"true" label:"allowEmpty"`
|
||||
Instana *instana.Config `description:"Settings for Instana." json:"instana,omitempty" toml:"instana,omitempty" yaml:"instana,omitempty" export:"true" label:"allowEmpty"`
|
||||
Haystack *haystack.Config `description:"Settings for Haystack." json:"haystack,omitempty" toml:"haystack,omitempty" yaml:"haystack,omitempty" export:"true" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -148,14 +147,14 @@ func (t *Tracing) SetDefaults() {
|
|||
|
||||
// Providers contains providers configuration
|
||||
type Providers struct {
|
||||
ProvidersThrottleDuration types.Duration `description:"Backends throttle duration: minimum duration between 2 events from providers before applying a new configuration. It avoids unnecessary reloads if multiples events are sent in a short amount of time." export:"true"`
|
||||
Docker *docker.Provider `description:"Enable Docker backend with default settings." export:"true" label:"allowEmpty"`
|
||||
File *file.Provider `description:"Enable File backend with default settings." export:"true" label:"allowEmpty"`
|
||||
Marathon *marathon.Provider `description:"Enable Marathon backend with default settings." export:"true" label:"allowEmpty"`
|
||||
Kubernetes *ingress.Provider `description:"Enable Kubernetes backend with default settings." export:"true" label:"allowEmpty"`
|
||||
KubernetesCRD *crd.Provider `description:"Enable Kubernetes backend with default settings." export:"true" label:"allowEmpty"`
|
||||
Rest *rest.Provider `description:"Enable Rest backend with default settings." export:"true" label:"allowEmpty"`
|
||||
Rancher *rancher.Provider `description:"Enable Rancher backend with default settings." export:"true" label:"allowEmpty"`
|
||||
ProvidersThrottleDuration types.Duration `description:"Backends throttle duration: minimum duration between 2 events from providers before applying a new configuration. It avoids unnecessary reloads if multiples events are sent in a short amount of time." json:"providersThrottleDuration,omitempty" toml:"providersThrottleDuration,omitempty" yaml:"providersThrottleDuration,omitempty" export:"true"`
|
||||
Docker *docker.Provider `description:"Enable Docker backend with default settings." json:"docker,omitempty" toml:"docker,omitempty" yaml:"docker,omitempty" export:"true" label:"allowEmpty"`
|
||||
File *file.Provider `description:"Enable File backend with default settings." json:"file,omitempty" toml:"file,omitempty" yaml:"file,omitempty" export:"true" label:"allowEmpty"`
|
||||
Marathon *marathon.Provider `description:"Enable Marathon backend with default settings." json:"marathon,omitempty" toml:"marathon,omitempty" yaml:"marathon,omitempty" export:"true" label:"allowEmpty"`
|
||||
Kubernetes *ingress.Provider `description:"Enable Kubernetes backend with default settings." json:"kubernetes,omitempty" toml:"kubernetes,omitempty" yaml:"kubernetes,omitempty" export:"true" label:"allowEmpty"`
|
||||
KubernetesCRD *crd.Provider `description:"Enable Kubernetes backend with default settings." json:"kubernetesCRD,omitempty" toml:"kubernetesCRD,omitempty" yaml:"kubernetesCRD,omitempty" export:"true" label:"allowEmpty"`
|
||||
Rest *rest.Provider `description:"Enable Rest backend with default settings." json:"rest,omitempty" toml:"rest,omitempty" yaml:"rest,omitempty" export:"true" label:"allowEmpty"`
|
||||
Rancher *rancher.Provider `description:"Enable Rancher backend with default settings." json:"rancher,omitempty" toml:"rancher,omitempty" yaml:"rancher,omitempty" export:"true" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
// SetEffectiveConfiguration adds missing configuration parameters derived from existing ones.
|
||||
|
|
|
@ -35,7 +35,7 @@ const (
|
|||
)
|
||||
|
||||
// RegisterDatadog registers the metrics pusher if this didn't happen yet and creates a datadog Registry instance.
|
||||
func RegisterDatadog(ctx context.Context, config *types.Datadog) Registry {
|
||||
func RegisterDatadog(ctx context.Context, config *types.DataDog) Registry {
|
||||
if datadogTicker == nil {
|
||||
datadogTicker = initDatadogClient(ctx, config)
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ func RegisterDatadog(ctx context.Context, config *types.Datadog) Registry {
|
|||
return registry
|
||||
}
|
||||
|
||||
func initDatadogClient(ctx context.Context, config *types.Datadog) *time.Ticker {
|
||||
func initDatadogClient(ctx context.Context, config *types.DataDog) *time.Ticker {
|
||||
address := config.Address
|
||||
if len(address) == 0 {
|
||||
address = "localhost:8125"
|
||||
|
|
|
@ -16,7 +16,7 @@ func TestDatadog(t *testing.T) {
|
|||
// This is needed to make sure that UDP Listener listens for data a bit longer, otherwise it will quit after a millisecond
|
||||
udp.Timeout = 5 * time.Second
|
||||
|
||||
datadogRegistry := RegisterDatadog(context.Background(), &types.Datadog{Address: ":18125", PushInterval: types.Duration(time.Second)})
|
||||
datadogRegistry := RegisterDatadog(context.Background(), &types.DataDog{Address: ":18125", PushInterval: types.Duration(time.Second)})
|
||||
defer StopDatadog()
|
||||
|
||||
if !datadogRegistry.IsEnabled() {
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
// Handler expose ping routes.
|
||||
type Handler struct {
|
||||
EntryPoint string `description:"Ping entryPoint." export:"true"`
|
||||
Middlewares []string `description:"Middleware list." export:"true"`
|
||||
EntryPoint string `description:"Ping entryPoint." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"`
|
||||
Middlewares []string `description:"Middleware list." json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
terminating bool
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -306,11 +306,11 @@ func registerMetricClients(metricsConfig *types.Metrics) metrics.Registry {
|
|||
}
|
||||
}
|
||||
|
||||
if metricsConfig.Datadog != nil {
|
||||
if metricsConfig.DataDog != nil {
|
||||
ctx := log.With(context.Background(), log.Str(log.MetricsProviderName, "datadog"))
|
||||
registries = append(registries, metrics.RegisterDatadog(ctx, metricsConfig.Datadog))
|
||||
registries = append(registries, metrics.RegisterDatadog(ctx, metricsConfig.DataDog))
|
||||
log.FromContext(ctx).Debugf("Configured DataDog metrics: pushing to %s once every %s",
|
||||
metricsConfig.Datadog.Address, metricsConfig.Datadog.PushInterval)
|
||||
metricsConfig.DataDog.Address, metricsConfig.DataDog.PushInterval)
|
||||
}
|
||||
|
||||
if metricsConfig.StatsD != nil {
|
||||
|
|
|
@ -57,8 +57,8 @@ var (
|
|||
// Certificate holds a SSL cert/key pair
|
||||
// Certs and Key could be either a file path, or the file content itself
|
||||
type Certificate struct {
|
||||
CertFile FileOrContent
|
||||
KeyFile FileOrContent
|
||||
CertFile FileOrContent `json:"certFile,omitempty" toml:"certFile,omitempty" yaml:"certFile,omitempty"`
|
||||
KeyFile FileOrContent `json:"keyFile,omitempty" toml:"keyFile,omitempty" yaml:"keyFile,omitempty"`
|
||||
}
|
||||
|
||||
// Certificates defines traefik certificates type
|
||||
|
|
|
@ -5,25 +5,25 @@ const certificateHeader = "-----BEGIN CERTIFICATE-----\n"
|
|||
// ClientCA defines traefik CA files for a entryPoint
|
||||
// and it indicates if they are mandatory or have just to be analyzed if provided.
|
||||
type ClientCA struct {
|
||||
Files []FileOrContent
|
||||
Optional bool
|
||||
Files []FileOrContent `json:"files,omitempty" toml:"files,omitempty" yaml:"files,omitempty"`
|
||||
Optional bool `json:"optional,omitempty" toml:"optional,omitempty" yaml:"optional,omitempty"`
|
||||
}
|
||||
|
||||
// Options configures TLS for an entry point
|
||||
type Options struct {
|
||||
MinVersion string `export:"true"`
|
||||
CipherSuites []string
|
||||
ClientCA ClientCA
|
||||
SniStrict bool `export:"true"`
|
||||
MinVersion string `json:"minVersion,omitempty" toml:"minVersion,omitempty" yaml:"minVersion,omitempty" export:"true"`
|
||||
CipherSuites []string `json:"cipherSuites,omitempty" toml:"cipherSuites,omitempty" yaml:"cipherSuites,omitempty"`
|
||||
ClientCA ClientCA `json:"clientCA,omitempty" toml:"clientCA,omitempty" yaml:"clientCA,omitempty"`
|
||||
SniStrict bool `json:"sniStrict,omitempty" toml:"sniStrict,omitempty" yaml:"sniStrict,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// Store holds the options for a given Store
|
||||
type Store struct {
|
||||
DefaultCertificate *Certificate
|
||||
DefaultCertificate *Certificate `json:"defaultCertificate,omitempty" toml:"defaultCertificate,omitempty" yaml:"defaultCertificate,omitempty"`
|
||||
}
|
||||
|
||||
// CertAndStores allows mapping a TLS certificate to a list of entry points.
|
||||
type CertAndStores struct {
|
||||
Certificate `yaml:",inline"`
|
||||
Stores []string
|
||||
Stores []string `json:"stores,omitempty" toml:"stores,omitempty" yaml:"stores,omitempty"`
|
||||
}
|
||||
|
|
|
@ -15,14 +15,14 @@ const Name = "datadog"
|
|||
|
||||
// Config provides configuration settings for a datadog tracer
|
||||
type Config struct {
|
||||
LocalAgentHostPort string `description:"Set datadog-agent's host:port that the reporter will used." export:"false"`
|
||||
GlobalTag string `description:"Key:Value tag to be set on all the spans." export:"true"`
|
||||
Debug bool `description:"Enable DataDog debug." export:"true"`
|
||||
PrioritySampling bool `description:"Enable priority sampling. When using distributed tracing, this option must be enabled in order to get all the parts of a distributed trace sampled."`
|
||||
TraceIDHeaderName string `description:"Specifies the header name that will be used to store the trace ID." export:"true"`
|
||||
ParentIDHeaderName string `description:"Specifies the header name that will be used to store the parent ID." export:"true"`
|
||||
SamplingPriorityHeaderName string `description:"Specifies the header name that will be used to store the sampling priority." export:"true"`
|
||||
BagagePrefixHeaderName string `description:"Specifies the header name prefix that will be used to store baggage items in a map." export:"true"`
|
||||
LocalAgentHostPort string `description:"Set datadog-agent's host:port that the reporter will used." json:"localAgentHostPort,omitempty" toml:"localAgentHostPort,omitempty" yaml:"localAgentHostPort,omitempty"`
|
||||
GlobalTag string `description:"Key:Value tag to be set on all the spans." json:"globalTag,omitempty" toml:"globalTag,omitempty" yaml:"globalTag,omitempty" export:"true"`
|
||||
Debug bool `description:"Enable DataDog debug." json:"debug,omitempty" toml:"debug,omitempty" yaml:"debug,omitempty" export:"true"`
|
||||
PrioritySampling bool `description:"Enable priority sampling. When using distributed tracing, this option must be enabled in order to get all the parts of a distributed trace sampled." json:"prioritySampling,omitempty" toml:"prioritySampling,omitempty" yaml:"prioritySampling,omitempty"`
|
||||
TraceIDHeaderName string `description:"Specifies the header name that will be used to store the trace ID." json:"traceIDHeaderName,omitempty" toml:"traceIDHeaderName,omitempty" yaml:"traceIDHeaderName,omitempty" export:"true"`
|
||||
ParentIDHeaderName string `description:"Specifies the header name that will be used to store the parent ID." json:"parentIDHeaderName,omitempty" toml:"parentIDHeaderName,omitempty" yaml:"parentIDHeaderName,omitempty" export:"true"`
|
||||
SamplingPriorityHeaderName string `description:"Specifies the header name that will be used to store the sampling priority." json:"samplingPriorityHeaderName,omitempty" toml:"samplingPriorityHeaderName,omitempty" yaml:"samplingPriorityHeaderName,omitempty" export:"true"`
|
||||
BagagePrefixHeaderName string `description:"Specifies the header name prefix that will be used to store baggage items in a map." json:"bagagePrefixHeaderName,omitempty" toml:"bagagePrefixHeaderName,omitempty" yaml:"bagagePrefixHeaderName,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -15,13 +15,13 @@ const Name = "haystack"
|
|||
|
||||
// Config provides configuration settings for a haystack tracer
|
||||
type Config struct {
|
||||
LocalAgentHost string `description:"Set haystack-agent's host that the reporter will used." export:"false"`
|
||||
LocalAgentPort int `description:"Set haystack-agent's port that the reporter will used." export:"false"`
|
||||
GlobalTag string `description:"Key:Value tag to be set on all the spans." export:"true"`
|
||||
TraceIDHeaderName string `description:"Specifies the header name that will be used to store the trace ID." export:"true"`
|
||||
ParentIDHeaderName string `description:"Specifies the header name that will be used to store the parent ID." export:"true"`
|
||||
SpanIDHeaderName string `description:"Specifies the header name that will be used to store the span ID." export:"true"`
|
||||
BaggagePrefixHeaderName string `description:"Specifies the header name prefix that will be used to store baggage items in a map." export:"true"`
|
||||
LocalAgentHost string `description:"Set haystack-agent's host that the reporter will used." json:"localAgentHost,omitempty" toml:"localAgentHost,omitempty" yaml:"localAgentHost,omitempty"`
|
||||
LocalAgentPort int `description:"Set haystack-agent's port that the reporter will used." json:"localAgentPort,omitempty" toml:"localAgentPort,omitempty" yaml:"localAgentPort,omitempty"`
|
||||
GlobalTag string `description:"Key:Value tag to be set on all the spans." json:"globalTag,omitempty" toml:"globalTag,omitempty" yaml:"globalTag,omitempty" export:"true"`
|
||||
TraceIDHeaderName string `description:"Specifies the header name that will be used to store the trace ID." json:"traceIDHeaderName,omitempty" toml:"traceIDHeaderName,omitempty" yaml:"traceIDHeaderName,omitempty" export:"true"`
|
||||
ParentIDHeaderName string `description:"Specifies the header name that will be used to store the parent ID." json:"parentIDHeaderName,omitempty" toml:"parentIDHeaderName,omitempty" yaml:"parentIDHeaderName,omitempty" export:"true"`
|
||||
SpanIDHeaderName string `description:"Specifies the header name that will be used to store the span ID." json:"spanIDHeaderName,omitempty" toml:"spanIDHeaderName,omitempty" yaml:"spanIDHeaderName,omitempty" export:"true"`
|
||||
BaggagePrefixHeaderName string `description:"Specifies the header name prefix that will be used to store baggage items in a map." json:"baggagePrefixHeaderName,omitempty" toml:"baggagePrefixHeaderName,omitempty" yaml:"baggagePrefixHeaderName,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -13,9 +13,9 @@ const Name = "instana"
|
|||
|
||||
// Config provides configuration settings for a instana tracer
|
||||
type Config struct {
|
||||
LocalAgentHost string `description:"Set instana-agent's host that the reporter will used." export:"false"`
|
||||
LocalAgentPort int `description:"Set instana-agent's port that the reporter will used." export:"false"`
|
||||
LogLevel string `description:"Set instana-agent's log level. ('error','warn','info','debug')" export:"false"`
|
||||
LocalAgentHost string `description:"Set instana-agent's host that the reporter will used." json:"localAgentHost,omitempty" toml:"localAgentHost,omitempty" yaml:"localAgentHost,omitempty"`
|
||||
LocalAgentPort int `description:"Set instana-agent's port that the reporter will used." json:"localAgentPort,omitempty" toml:"localAgentPort,omitempty" yaml:"localAgentPort,omitempty"`
|
||||
LogLevel string `description:"Set instana-agent's log level. ('error','warn','info','debug')" json:"logLevel,omitempty" toml:"logLevel,omitempty" yaml:"logLevel,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -18,13 +18,13 @@ const Name = "jaeger"
|
|||
|
||||
// Config provides configuration settings for a jaeger tracer
|
||||
type Config struct {
|
||||
SamplingServerURL string `description:"Set the sampling server url." export:"false"`
|
||||
SamplingType string `description:"Set the sampling type." export:"true"`
|
||||
SamplingParam float64 `description:"Set the sampling parameter." export:"true"`
|
||||
LocalAgentHostPort string `description:"Set jaeger-agent's host:port that the reporter will used." export:"false"`
|
||||
Gen128Bit bool `description:"Generate 128 bit span IDs." export:"true"`
|
||||
Propagation string `description:"Which propgation format to use (jaeger/b3)." export:"true"`
|
||||
TraceContextHeaderName string `description:"Set the header to use for the trace-id." export:"true"`
|
||||
SamplingServerURL string `description:"Set the sampling server url." json:"samplingServerURL,omitempty" toml:"samplingServerURL,omitempty" yaml:"samplingServerURL,omitempty"`
|
||||
SamplingType string `description:"Set the sampling type." json:"samplingType,omitempty" toml:"samplingType,omitempty" yaml:"samplingType,omitempty" export:"true"`
|
||||
SamplingParam float64 `description:"Set the sampling parameter." json:"samplingParam,omitempty" toml:"samplingParam,omitempty" yaml:"samplingParam,omitempty" export:"true"`
|
||||
LocalAgentHostPort string `description:"Set jaeger-agent's host:port that the reporter will used." json:"localAgentHostPort,omitempty" toml:"localAgentHostPort,omitempty" yaml:"localAgentHostPort,omitempty"`
|
||||
Gen128Bit bool `description:"Generate 128 bit span IDs." json:"gen128Bit,omitempty" toml:"gen128Bit,omitempty" yaml:"gen128Bit,omitempty" export:"true"`
|
||||
Propagation string `description:"Which propgation format to use (jaeger/b3)." json:"propagation,omitempty" toml:"propagation,omitempty" yaml:"propagation,omitempty" export:"true"`
|
||||
TraceContextHeaderName string `description:"Set the header to use for the trace-id." json:"traceContextHeaderName,omitempty" toml:"traceContextHeaderName,omitempty" yaml:"traceContextHeaderName,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -14,11 +14,11 @@ const Name = "zipkin"
|
|||
|
||||
// Config provides configuration settings for a zipkin tracer.
|
||||
type Config struct {
|
||||
HTTPEndpoint string `description:"HTTP Endpoint to report traces to." export:"false"`
|
||||
SameSpan bool `description:"Use Zipkin SameSpan RPC style traces." export:"true"`
|
||||
ID128Bit bool `description:"Use Zipkin 128 bit root span IDs." export:"true"`
|
||||
Debug bool `description:"Enable Zipkin debug." export:"true"`
|
||||
SampleRate float64 `description:"The rate between 0.0 and 1.0 of requests to trace." export:"true"`
|
||||
HTTPEndpoint string `description:"HTTP Endpoint to report traces to." json:"httpEndpoint,omitempty" toml:"httpEndpoint,omitempty" yaml:"httpEndpoint,omitempty"`
|
||||
SameSpan bool `description:"Use Zipkin SameSpan RPC style traces." json:"sameSpan,omitempty" toml:"sameSpan,omitempty" yaml:"sameSpan,omitempty" export:"true"`
|
||||
ID128Bit bool `description:"Use Zipkin 128 bit root span IDs." json:"id128Bit,omitempty" toml:"id128Bit,omitempty" yaml:"id128Bit,omitempty" export:"true"`
|
||||
Debug bool `description:"Enable Zipkin debug." json:"debug,omitempty" toml:"debug,omitempty" yaml:"debug,omitempty" export:"true"`
|
||||
SampleRate float64 `description:"The rate between 0.0 and 1.0 of requests to trace." json:"sampleRate,omitempty" toml:"sampleRate,omitempty" yaml:"sampleRate,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
// Domain holds a domain name with SANs.
|
||||
type Domain struct {
|
||||
Main string `description:"Default subject name."`
|
||||
SANs []string `description:"Subject alternative names."`
|
||||
Main string `description:"Default subject name." json:"main,omitempty" toml:"main,omitempty" yaml:"main,omitempty"`
|
||||
SANs []string `description:"Subject alternative names." json:"sans,omitempty" toml:"sans,omitempty" yaml:"sans,omitempty"`
|
||||
}
|
||||
|
||||
// ToStrArray convert a domain into an array of strings.
|
||||
|
|
|
@ -2,9 +2,9 @@ package types
|
|||
|
||||
// HostResolverConfig contain configuration for CNAME Flattening.
|
||||
type HostResolverConfig struct {
|
||||
CnameFlattening bool `description:"A flag to enable/disable CNAME flattening" export:"true"`
|
||||
ResolvConfig string `description:"resolv.conf used for DNS resolving" export:"true"`
|
||||
ResolvDepth int `description:"The maximal depth of DNS recursive resolving" export:"true"`
|
||||
CnameFlattening bool `description:"A flag to enable/disable CNAME flattening" json:"cnameFlattening,omitempty" toml:"cnameFlattening,omitempty" yaml:"cnameFlattening,omitempty" export:"true"`
|
||||
ResolvConfig string `description:"resolv.conf used for DNS resolving" json:"resolvConfig,omitempty" toml:"resolvConfig,omitempty" yaml:"resolvConfig,omitempty" export:"true"`
|
||||
ResolvDepth int `description:"The maximal depth of DNS recursive resolving" json:"resolvDepth,omitempty" toml:"resolvDepth,omitempty" yaml:"resolvDepth,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -19,9 +19,9 @@ const (
|
|||
|
||||
// TraefikLog holds the configuration settings for the traefik logger.
|
||||
type TraefikLog struct {
|
||||
Level string `description:"Log level set to traefik logs." export:"true"`
|
||||
FilePath string `json:"file,omitempty" description:"Traefik log file path. Stdout is used when omitted or empty."`
|
||||
Format string `json:"format,omitempty" description:"Traefik log format: json | common"`
|
||||
Level string `description:"Log level set to traefik logs." json:"level,omitempty" toml:"level,omitempty" yaml:"level,omitempty" export:"true"`
|
||||
FilePath string `description:"Traefik log file path. Stdout is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omitempty" yaml:"filePath,omitempty"`
|
||||
Format string `description:"Traefik log format: json | common" json:"format,omitempty" toml:"format,omitempty" yaml:"format,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -32,11 +32,11 @@ func (l *TraefikLog) SetDefaults() {
|
|||
|
||||
// AccessLog holds the configuration settings for the access logger (middlewares/accesslog).
|
||||
type AccessLog struct {
|
||||
FilePath string `json:"file,omitempty" description:"Access log file path. Stdout is used when omitted or empty." export:"true"`
|
||||
Format string `json:"format,omitempty" description:"Access log format: json | common" export:"true"`
|
||||
Filters *AccessLogFilters `json:"filters,omitempty" description:"Access log filters, used to keep only specific access logs." export:"true"`
|
||||
Fields *AccessLogFields `json:"fields,omitempty" description:"AccessLogFields." export:"true"`
|
||||
BufferingSize int64 `json:"bufferingSize,omitempty" description:"Number of access log lines to process in a buffered way." export:"true"`
|
||||
FilePath string `description:"Access log file path. Stdout is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omitempty" yaml:"filePath,omitempty" export:"true"`
|
||||
Format string `description:"Access log format: json | common" json:"format,omitempty" toml:"format,omitempty" yaml:"format,omitempty" export:"true"`
|
||||
Filters *AccessLogFilters `description:"Access log filters, used to keep only specific access logs." json:"filters,omitempty" toml:"filters,omitempty" yaml:"filters,omitempty" export:"true"`
|
||||
Fields *AccessLogFields `description:"AccessLogFields." json:"fields,omitempty" toml:"fields,omitempty" yaml:"fields,omitempty" export:"true"`
|
||||
BufferingSize int64 `description:"Number of access log lines to process in a buffered way." json:"bufferingSize,omitempty" toml:"bufferingSize,omitempty" yaml:"bufferingSize,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -50,22 +50,22 @@ func (l *AccessLog) SetDefaults() {
|
|||
|
||||
// AccessLogFilters holds filters configuration
|
||||
type AccessLogFilters struct {
|
||||
StatusCodes []string `json:"statusCodes,omitempty" description:"Keep access logs with status codes in the specified range." export:"true"`
|
||||
RetryAttempts bool `json:"retryAttempts,omitempty" description:"Keep access logs when at least one retry happened." export:"true"`
|
||||
MinDuration Duration `json:"duration,omitempty" description:"Keep access logs when request took longer than the specified duration." export:"true"`
|
||||
StatusCodes []string `description:"Keep access logs with status codes in the specified range." json:"statusCodes,omitempty" toml:"statusCodes,omitempty" yaml:"statusCodes,omitempty" export:"true"`
|
||||
RetryAttempts bool `description:"Keep access logs when at least one retry happened." json:"retryAttempts,omitempty" toml:"retryAttempts,omitempty" yaml:"retryAttempts,omitempty" export:"true"`
|
||||
MinDuration Duration `description:"Keep access logs when request took longer than the specified duration." json:"minDuration,omitempty" toml:"minDuration,omitempty" yaml:"minDuration,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// FieldHeaders holds configuration for access log headers
|
||||
type FieldHeaders struct {
|
||||
DefaultMode string `json:"defaultMode,omitempty" description:"Default mode for fields: keep | drop | redact" export:"true"`
|
||||
Names map[string]string `json:"names,omitempty" description:"Override mode for headers" export:"true"`
|
||||
DefaultMode string `description:"Default mode for fields: keep | drop | redact" json:"defaultMode,omitempty" toml:"defaultMode,omitempty" yaml:"defaultMode,omitempty" export:"true"`
|
||||
Names map[string]string `description:"Override mode for headers" json:"names,omitempty" toml:"names,omitempty" yaml:"names,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// AccessLogFields holds configuration for access log fields
|
||||
type AccessLogFields struct {
|
||||
DefaultMode string `json:"defaultMode,omitempty" description:"Default mode for fields: keep | drop" export:"true"`
|
||||
Names map[string]string `json:"names,omitempty" description:"Override mode for fields" export:"true"`
|
||||
Headers *FieldHeaders `json:"headers,omitempty" description:"Headers to keep, drop or redact" export:"true"`
|
||||
DefaultMode string `description:"Default mode for fields: keep | drop" json:"defaultMode,omitempty" toml:"defaultMode,omitempty" yaml:"defaultMode,omitempty" export:"true"`
|
||||
Names map[string]string `json:"names,omitempty" description:"Override mode for fields" json:"names,omitempty" toml:"names,omitempty" yaml:"names,omitempty" export:"true"`
|
||||
Headers *FieldHeaders `description:"Headers to keep, drop or redact" json:"headers,omitempty" toml:"headers,omitempty" yaml:"headers,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -6,17 +6,17 @@ import (
|
|||
|
||||
// Metrics provides options to expose and send Traefik metrics to different third party monitoring systems
|
||||
type Metrics struct {
|
||||
Prometheus *Prometheus `description:"Prometheus metrics exporter type." export:"true" label:"allowEmpty"`
|
||||
Datadog *Datadog `description:"DataDog metrics exporter type." export:"true" label:"allowEmpty"`
|
||||
StatsD *Statsd `description:"StatsD metrics exporter type." export:"true" label:"allowEmpty"`
|
||||
InfluxDB *InfluxDB `description:"InfluxDB metrics exporter type." label:"allowEmpty"`
|
||||
Prometheus *Prometheus `description:"Prometheus metrics exporter type." json:"prometheus,omitempty" toml:"prometheus,omitempty" yaml:"prometheus,omitempty" export:"true" label:"allowEmpty"`
|
||||
DataDog *DataDog `description:"DataDog metrics exporter type." json:"dataDog,omitempty" toml:"dataDog,omitempty" yaml:"dataDog,omitempty" export:"true" label:"allowEmpty"`
|
||||
StatsD *Statsd `description:"StatsD metrics exporter type." json:"statsD,omitempty" toml:"statsD,omitempty" yaml:"statsD,omitempty" export:"true" label:"allowEmpty"`
|
||||
InfluxDB *InfluxDB `description:"InfluxDB metrics exporter type." json:"influxDB,omitempty" toml:"influxDB,omitempty" yaml:"influxDB,omitempty" label:"allowEmpty"`
|
||||
}
|
||||
|
||||
// Prometheus can contain specific configuration used by the Prometheus Metrics exporter
|
||||
type Prometheus struct {
|
||||
Buckets []float64 `description:"Buckets for latency metrics." export:"true"`
|
||||
EntryPoint string `description:"EntryPoint." export:"true"`
|
||||
Middlewares []string `description:"Middlewares." export:"true"`
|
||||
Buckets []float64 `description:"Buckets for latency metrics." json:"buckets,omitempty" toml:"buckets,omitempty" yaml:"buckets,omitempty" export:"true"`
|
||||
EntryPoint string `description:"EntryPoint." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryPoint,omitempty" export:"true"`
|
||||
Middlewares []string `description:"Middlewares." json:"middlewares,omitempty" toml:"middlewares,omitempty" yaml:"middlewares,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -25,22 +25,22 @@ func (p *Prometheus) SetDefaults() {
|
|||
p.EntryPoint = "traefik"
|
||||
}
|
||||
|
||||
// Datadog contains address and metrics pushing interval configuration
|
||||
type Datadog struct {
|
||||
Address string `description:"DataDog's address."`
|
||||
PushInterval Duration `description:"DataDog push interval." export:"true"`
|
||||
// DataDog contains address and metrics pushing interval configuration
|
||||
type DataDog struct {
|
||||
Address string `description:"DataDog's address." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
|
||||
PushInterval Duration `description:"DataDog push interval." json:"pushInterval,omitempty" toml:"pushInterval,omitempty" yaml:"pushInterval,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
func (d *Datadog) SetDefaults() {
|
||||
func (d *DataDog) SetDefaults() {
|
||||
d.Address = "localhost:8125"
|
||||
d.PushInterval = Duration(10 * time.Second)
|
||||
}
|
||||
|
||||
// Statsd contains address and metrics pushing interval configuration
|
||||
type Statsd struct {
|
||||
Address string `description:"StatsD address."`
|
||||
PushInterval Duration `description:"StatsD push interval." export:"true"`
|
||||
Address string `description:"StatsD address." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
|
||||
PushInterval Duration `description:"StatsD push interval." json:"pushInterval,omitempty" toml:"pushInterval,omitempty" yaml:"pushInterval,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -51,13 +51,13 @@ func (s *Statsd) SetDefaults() {
|
|||
|
||||
// InfluxDB contains address, login and metrics pushing interval configuration
|
||||
type InfluxDB struct {
|
||||
Address string `description:"InfluxDB address."`
|
||||
Protocol string `description:"InfluxDB address protocol (udp or http)."`
|
||||
PushInterval Duration `description:"InfluxDB push interval." export:"true"`
|
||||
Database string `description:"InfluxDB database used when protocol is http." export:"true"`
|
||||
RetentionPolicy string `description:"InfluxDB retention policy used when protocol is http." export:"true"`
|
||||
Username string `description:"InfluxDB username (only with http)." export:"true"`
|
||||
Password string `description:"InfluxDB password (only with http)." export:"true"`
|
||||
Address string `description:"InfluxDB address." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
|
||||
Protocol string `description:"InfluxDB address protocol (udp or http)." json:"protocol,omitempty" toml:"protocol,omitempty" yaml:"protocol,omitempty"`
|
||||
PushInterval Duration `description:"InfluxDB push interval." json:"pushInterval,omitempty" toml:"pushInterval,omitempty" yaml:"pushInterval,omitempty" export:"true"`
|
||||
Database string `description:"InfluxDB database used when protocol is http." json:"database,omitempty" toml:"database,omitempty" yaml:"database,omitempty" export:"true"`
|
||||
RetentionPolicy string `description:"InfluxDB retention policy used when protocol is http." json:"retentionPolicy,omitempty" toml:"retentionPolicy,omitempty" yaml:"retentionPolicy,omitempty" export:"true"`
|
||||
Username string `description:"InfluxDB username (only with http)." json:"username,omitempty" toml:"username,omitempty" yaml:"username,omitempty" export:"true"`
|
||||
Password string `description:"InfluxDB password (only with http)." json:"password,omitempty" toml:"password,omitempty" yaml:"password,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
@ -69,7 +69,7 @@ func (i *InfluxDB) SetDefaults() {
|
|||
|
||||
// Statistics provides options for monitoring request and response stats
|
||||
type Statistics struct {
|
||||
RecentErrors int `description:"Number of recent errors logged." export:"true"`
|
||||
RecentErrors int `description:"Number of recent errors logged." json:"recentErrors,omitempty" toml:"recentErrors,omitempty" yaml:"recentErrors,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// SetDefaults sets the default values.
|
||||
|
|
|
@ -14,11 +14,11 @@ import (
|
|||
// ClientTLS holds TLS specific configurations as client
|
||||
// CA, Cert and Key can be either path or file contents
|
||||
type ClientTLS struct {
|
||||
CA string `description:"TLS CA" json:"ca,omitempty"`
|
||||
CAOptional bool `description:"TLS CA.Optional" json:"caOptional,omitempty"`
|
||||
Cert string `description:"TLS cert" json:"cert,omitempty"`
|
||||
Key string `description:"TLS key" json:"key,omitempty"`
|
||||
InsecureSkipVerify bool `description:"TLS insecure skip verify" json:"insecureSkipVerify,omitempty"`
|
||||
CA string `description:"TLS CA" json:"ca,omitempty" toml:"ca,omitempty" yaml:"ca,omitempty"`
|
||||
CAOptional bool `description:"TLS CA.Optional" json:"caOptional,omitempty" toml:"caOptional,omitempty" yaml:"caOptional,omitempty"`
|
||||
Cert string `description:"TLS cert" json:"cert,omitempty" toml:"cert,omitempty" yaml:"cert,omitempty"`
|
||||
Key string `description:"TLS key" json:"key,omitempty" toml:"key,omitempty" yaml:"key,omitempty"`
|
||||
InsecureSkipVerify bool `description:"TLS insecure skip verify" json:"insecureSkipVerify,omitempty" toml:"insecureSkipVerify,omitempty" yaml:"insecureSkipVerify,omitempty"`
|
||||
}
|
||||
|
||||
// CreateTLSConfig creates a TLS config from ClientTLS structures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue