Merge branch v2.3 into master.
This commit is contained in:
commit
520fcf82ae
53 changed files with 1203 additions and 412 deletions
455
pkg/anonymize/testdata/anonymized-static-config.json
vendored
Normal file
455
pkg/anonymize/testdata/anonymized-static-config.json
vendored
Normal file
|
@ -0,0 +1,455 @@
|
|||
{
|
||||
"global": {
|
||||
"checkNewVersion": true,
|
||||
"sendAnonymousUsage": true
|
||||
},
|
||||
"serversTransport": {
|
||||
"insecureSkipVerify": true,
|
||||
"rootCAs": [
|
||||
"xxxx",
|
||||
"xxxx",
|
||||
"xxxx"
|
||||
],
|
||||
"maxIdleConnsPerHost": 111,
|
||||
"forwardingTimeouts": {
|
||||
"dialTimeout": 111000000000,
|
||||
"responseHeaderTimeout": 111000000000,
|
||||
"idleConnTimeout": 111000000000
|
||||
}
|
||||
},
|
||||
"entryPoints": {
|
||||
"foobar": {
|
||||
"address": "xxxx",
|
||||
"transport": {
|
||||
"lifeCycle": {
|
||||
"requestAcceptGraceTimeout": 111000000000,
|
||||
"graceTimeOut": 111000000000
|
||||
},
|
||||
"respondingTimeouts": {
|
||||
"readTimeout": 111000000000,
|
||||
"writeTimeout": 111000000000,
|
||||
"idleTimeout": 111000000000
|
||||
}
|
||||
},
|
||||
"proxyProtocol": {
|
||||
"insecure": true,
|
||||
"trustedIPs": [
|
||||
"xxxx",
|
||||
"xxxx"
|
||||
]
|
||||
},
|
||||
"forwardedHeaders": {
|
||||
"insecure": true,
|
||||
"trustedIPs": [
|
||||
"xxxx",
|
||||
"xxxx"
|
||||
]
|
||||
},
|
||||
"http": {
|
||||
"redirections": {
|
||||
"entryPoint": {
|
||||
"to": "foobar",
|
||||
"scheme": "foobar",
|
||||
"permanent": true,
|
||||
"priority": 42
|
||||
}
|
||||
},
|
||||
"middlewares": [
|
||||
"foobar",
|
||||
"foobar"
|
||||
],
|
||||
"tls": {
|
||||
"options": "foobar",
|
||||
"certResolver": "foobar",
|
||||
"domains": [
|
||||
{
|
||||
"main": "xxxx",
|
||||
"sans": [
|
||||
"xxxx",
|
||||
"xxxx"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providersThrottleDuration": 111000000000,
|
||||
"docker": {
|
||||
"constraints": "Label(\"foo\", \"bar\")",
|
||||
"watch": true,
|
||||
"endpoint": "xxxx",
|
||||
"defaultRule": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
},
|
||||
"exposedByDefault": true,
|
||||
"useBindPortIP": true,
|
||||
"swarmMode": true,
|
||||
"network": "MyNetwork",
|
||||
"swarmModeRefreshSeconds": 42,
|
||||
"httpClientTimeout": 42
|
||||
},
|
||||
"file": {
|
||||
"directory": "file Directory",
|
||||
"watch": true,
|
||||
"filename": "file Filename",
|
||||
"debugLogGeneratedTemplate": true
|
||||
},
|
||||
"marathon": {
|
||||
"constraints": "Label(\"foo\", \"bar\")",
|
||||
"trace": true,
|
||||
"watch": true,
|
||||
"endpoint": "xxxx",
|
||||
"defaultRule": "xxxx",
|
||||
"exposedByDefault": true,
|
||||
"dcosToken": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
},
|
||||
"dialerTimeout": 42,
|
||||
"responseHeaderTimeout": 42,
|
||||
"tlsHandshakeTimeout": 42,
|
||||
"keepAlive": 42,
|
||||
"forceTaskHostname": true,
|
||||
"basic": {
|
||||
"httpBasicAuthUser": "xxxx",
|
||||
"httpBasicPassword": "xxxx"
|
||||
},
|
||||
"respectReadinessChecks": true
|
||||
},
|
||||
"kubernetesIngress": {
|
||||
"endpoint": "xxxx",
|
||||
"token": "xxxx",
|
||||
"certAuthFilePath": "xxxx",
|
||||
"disablePassHostHeaders": true,
|
||||
"namespaces": [
|
||||
"a",
|
||||
"b"
|
||||
],
|
||||
"labelSelector": "myLabelSelector",
|
||||
"ingressClass": "MyIngressClass",
|
||||
"ingressEndpoint": {
|
||||
"ip": "xxxx",
|
||||
"hostname": "xxxx",
|
||||
"publishedService": "xxxx"
|
||||
},
|
||||
"throttleDuration": 111000000000
|
||||
},
|
||||
"kubernetesCRD": {
|
||||
"endpoint": "xxxx",
|
||||
"token": "xxxx",
|
||||
"certAuthFilePath": "xxxx",
|
||||
"disablePassHostHeaders": true,
|
||||
"namespaces": [
|
||||
"a",
|
||||
"b"
|
||||
],
|
||||
"labelSelector": "myLabelSelector",
|
||||
"ingressClass": "MyIngressClass",
|
||||
"throttleDuration": 111000000000
|
||||
},
|
||||
"rest": {
|
||||
"insecure": true
|
||||
},
|
||||
"rancher": {
|
||||
"constraints": "Label(\"foo\", \"bar\")",
|
||||
"watch": true,
|
||||
"defaultRule": "xxxx",
|
||||
"exposedByDefault": true,
|
||||
"enableServiceHealthFilter": true,
|
||||
"refreshSeconds": 42,
|
||||
"intervalPoll": true,
|
||||
"prefix": "xxxx"
|
||||
},
|
||||
"consulCatalog": {
|
||||
"constraints": "Label(\"foo\", \"bar\")",
|
||||
"endpoint": {
|
||||
"address": "xxxx",
|
||||
"scheme": "xxxx",
|
||||
"datacenter": "xxxx",
|
||||
"token": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
},
|
||||
"httpAuth": {
|
||||
"username": "xxxx",
|
||||
"password": "xxxx"
|
||||
},
|
||||
"endpointWaitTime": 42
|
||||
},
|
||||
"prefix": "MyPrefix",
|
||||
"refreshInterval": 42,
|
||||
"requireConsistent": true,
|
||||
"stale": true,
|
||||
"cache": true,
|
||||
"exposedByDefault": true,
|
||||
"defaultRule": "xxxx"
|
||||
},
|
||||
"ecs": {
|
||||
"constraints": "Label(\"foo\", \"bar\")",
|
||||
"exposedByDefault": true,
|
||||
"refreshSeconds": 42,
|
||||
"defaultRule": "xxxx",
|
||||
"clusters": [
|
||||
"Cluster1",
|
||||
"Cluster2"
|
||||
],
|
||||
"autoDiscoverClusters": true,
|
||||
"region": "Awsregion",
|
||||
"accessKeyID": "xxxx",
|
||||
"secretAccessKey": "xxxx"
|
||||
},
|
||||
"consul": {
|
||||
"rootKey": "RootKey",
|
||||
"username": "xxxx",
|
||||
"password": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
}
|
||||
},
|
||||
"etcd": {
|
||||
"rootKey": "RootKey",
|
||||
"username": "xxxx",
|
||||
"password": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
}
|
||||
},
|
||||
"zooKeeper": {
|
||||
"rootKey": "RootKey",
|
||||
"username": "xxxx",
|
||||
"password": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
}
|
||||
},
|
||||
"redis": {
|
||||
"rootKey": "RootKey",
|
||||
"username": "xxxx",
|
||||
"password": "xxxx",
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"endpoint": "xxxx",
|
||||
"pollInterval": 42,
|
||||
"pollTimeout": 42,
|
||||
"tls": {
|
||||
"ca": "xxxx",
|
||||
"caOptional": true,
|
||||
"cert": "xxxx",
|
||||
"key": "xxxx",
|
||||
"insecureSkipVerify": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"insecure": true,
|
||||
"dashboard": true,
|
||||
"debug": true
|
||||
},
|
||||
"metrics": {
|
||||
"prometheus": {
|
||||
"buckets": [
|
||||
0.1,
|
||||
0.3,
|
||||
1.2,
|
||||
5
|
||||
],
|
||||
"addEntryPointsLabels": true,
|
||||
"addServicesLabels": true,
|
||||
"entryPoint": "MyEntryPoint",
|
||||
"manualRouting": true
|
||||
},
|
||||
"datadog": {
|
||||
"address": "xxxx",
|
||||
"pushInterval": 42,
|
||||
"addEntryPointsLabels": true,
|
||||
"addServicesLabels": true
|
||||
},
|
||||
"statsD": {
|
||||
"address": "xxxx",
|
||||
"pushInterval": 42,
|
||||
"addEntryPointsLabels": true,
|
||||
"addServicesLabels": true,
|
||||
"prefix": "MyPrefix"
|
||||
},
|
||||
"influxDB": {
|
||||
"address": "xxxx",
|
||||
"protocol": "xxxx",
|
||||
"pushInterval": 42,
|
||||
"database": "myDB",
|
||||
"retentionPolicy": "12",
|
||||
"username": "xxxx",
|
||||
"password": "xxxx",
|
||||
"addEntryPointsLabels": true,
|
||||
"addServicesLabels": true
|
||||
}
|
||||
},
|
||||
"ping": {
|
||||
"entryPoint": "MyEntryPoint",
|
||||
"manualRouting": true,
|
||||
"terminatingStatusCode": 42
|
||||
},
|
||||
"log": {
|
||||
"level": "Level",
|
||||
"filePath": "xxxx",
|
||||
"format": "json"
|
||||
},
|
||||
"accessLog": {
|
||||
"filePath": "xxxx",
|
||||
"format": "AccessLog Format",
|
||||
"filters": {
|
||||
"statusCodes": [
|
||||
"200",
|
||||
"500"
|
||||
],
|
||||
"retryAttempts": true,
|
||||
"minDuration": 42
|
||||
},
|
||||
"fields": {
|
||||
"defaultMode": "drop",
|
||||
"names": {
|
||||
"RequestHost": "keep"
|
||||
},
|
||||
"headers": {
|
||||
"defaultMode": "drop",
|
||||
"names": {
|
||||
"Referer": "keep"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bufferingSize": 42
|
||||
},
|
||||
"tracing": {
|
||||
"serviceName": "myServiceName",
|
||||
"spanNameLimit": 42,
|
||||
"jaeger": {
|
||||
"samplingServerURL": "xxxx",
|
||||
"samplingType": "foobar",
|
||||
"samplingParam": 42,
|
||||
"localAgentHostPort": "xxxx",
|
||||
"gen128Bit": true,
|
||||
"propagation": "foobar",
|
||||
"traceContextHeaderName": "foobar",
|
||||
"collector": {
|
||||
"endpoint": "xxxx",
|
||||
"user": "xxxx",
|
||||
"password": "xxxx"
|
||||
},
|
||||
"disableAttemptReconnecting": true
|
||||
},
|
||||
"zipkin": {
|
||||
"httpEndpoint": "xxxx",
|
||||
"sameSpan": true,
|
||||
"id128Bit": true,
|
||||
"sampleRate": 42
|
||||
},
|
||||
"datadog": {
|
||||
"localAgentHostPort": "xxxx",
|
||||
"globalTag": "foobar",
|
||||
"debug": true,
|
||||
"prioritySampling": true,
|
||||
"traceIDHeaderName": "foobar",
|
||||
"parentIDHeaderName": "foobar",
|
||||
"samplingPriorityHeaderName": "foobar",
|
||||
"bagagePrefixHeaderName": "foobar"
|
||||
},
|
||||
"instana": {
|
||||
"localAgentHost": "xxxx",
|
||||
"logLevel": "foobar"
|
||||
},
|
||||
"haystack": {
|
||||
"localAgentHost": "xxxx",
|
||||
"globalTag": "foobar",
|
||||
"traceIDHeaderName": "foobar",
|
||||
"parentIDHeaderName": "foobar",
|
||||
"spanIDHeaderName": "foobar",
|
||||
"baggagePrefixHeaderName": "foobar"
|
||||
},
|
||||
"elastic": {
|
||||
"serverURL": "xxxx",
|
||||
"secretToken": "xxxx",
|
||||
"serviceEnvironment": "foobar"
|
||||
}
|
||||
},
|
||||
"hostResolver": {
|
||||
"cnameFlattening": true,
|
||||
"resolvConfig": "foobar",
|
||||
"resolvDepth": 42
|
||||
},
|
||||
"certificatesResolvers": {
|
||||
"CertificateResolver0": {
|
||||
"acme": {
|
||||
"email": "xxxx",
|
||||
"caServer": "xxxx",
|
||||
"preferredChain": "foobar",
|
||||
"storage": "Storage",
|
||||
"keyType": "MyKeyType",
|
||||
"dnsChallenge": {
|
||||
"provider": "DNSProvider",
|
||||
"delayBeforeCheck": 42,
|
||||
"resolvers": [
|
||||
"xxxx",
|
||||
"xxxx"
|
||||
],
|
||||
"disablePropagationCheck": true
|
||||
},
|
||||
"httpChallenge": {
|
||||
"entryPoint": "MyEntryPoint"
|
||||
},
|
||||
"tlsChallenge": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"pilot": {
|
||||
"token": "xxxx"
|
||||
},
|
||||
"experimental": {
|
||||
"plugins": {
|
||||
"Descriptor0": {
|
||||
"moduleName": "foobar",
|
||||
"version": "foobar"
|
||||
},
|
||||
"Descriptor1": {
|
||||
"moduleName": "foobar",
|
||||
"version": "foobar"
|
||||
}
|
||||
},
|
||||
"devPlugin": {
|
||||
"goPath": "foobar",
|
||||
"moduleName": "foobar"
|
||||
}
|
||||
}
|
||||
}
|
82
pkg/anonymize/testdata/example.json
vendored
Normal file
82
pkg/anonymize/testdata/example.json
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"GraceTimeOut": 10000000000,
|
||||
"Debug": false,
|
||||
"CheckNewVersion": true,
|
||||
"AccessLogsFile": "",
|
||||
"TraefikLogsFile": "",
|
||||
"Level": "ERROR",
|
||||
"EntryPoints": {
|
||||
"http": {
|
||||
"Network": "",
|
||||
"Address": ":80",
|
||||
"TLS": null,
|
||||
"Auth": null,
|
||||
"Compress": false
|
||||
},
|
||||
"https": {
|
||||
"Address": ":443",
|
||||
"TLS": {
|
||||
"MinVersion": "",
|
||||
"CipherSuites": null,
|
||||
"Certificates": null,
|
||||
"ClientCAFiles": null
|
||||
},
|
||||
"Auth": null,
|
||||
"Compress": false
|
||||
}
|
||||
},
|
||||
"Cluster": null,
|
||||
"Constraints": [],
|
||||
"ACME": {
|
||||
"Email": "foo@bar.com",
|
||||
"Domains": [
|
||||
{
|
||||
"Main": "foo@bar.com",
|
||||
"SANs": null
|
||||
},
|
||||
{
|
||||
"Main": "foo@bar.com",
|
||||
"SANs": null
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"StorageFile": "/acme/acme.json",
|
||||
"OnDemand": true,
|
||||
"OnHostRule": true,
|
||||
"CAServer": "",
|
||||
"EntryPoint": "https",
|
||||
"DNSProvider": "",
|
||||
"DelayDontCheckDNS": 0,
|
||||
"ACMELogging": false,
|
||||
"Options": null
|
||||
},
|
||||
"DefaultEntryPoints": [
|
||||
"https",
|
||||
"http"
|
||||
],
|
||||
"ProvidersThrottleDuration": 2000000000,
|
||||
"MaxIdleConnsPerHost": 200,
|
||||
"IdleTimeout": 180000000000,
|
||||
"InsecureSkipVerify": false,
|
||||
"Retry": null,
|
||||
"HealthCheck": {
|
||||
"Interval": 30000000000
|
||||
},
|
||||
"Docker": null,
|
||||
"File": null,
|
||||
"Web": null,
|
||||
"Marathon": null,
|
||||
"Consul": null,
|
||||
"ConsulCatalog": null,
|
||||
"Etcd": null,
|
||||
"Zookeeper": null,
|
||||
"Boltdb": null,
|
||||
"KubernetesIngress": null,
|
||||
"KubernetesCRD": null,
|
||||
"Mesos": null,
|
||||
"Eureka": null,
|
||||
"ECS": null,
|
||||
"Rancher": null,
|
||||
"DynamoDB": null,
|
||||
"ConfigFile": "/etc/traefik/traefik.toml"
|
||||
}
|
82
pkg/anonymize/testdata/expected.json
vendored
Normal file
82
pkg/anonymize/testdata/expected.json
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"GraceTimeOut": 10000000000,
|
||||
"Debug": false,
|
||||
"CheckNewVersion": true,
|
||||
"AccessLogsFile": "",
|
||||
"TraefikLogsFile": "",
|
||||
"Level": "ERROR",
|
||||
"EntryPoints": {
|
||||
"http": {
|
||||
"Network": "",
|
||||
"Address": ":80",
|
||||
"TLS": null,
|
||||
"Auth": null,
|
||||
"Compress": false
|
||||
},
|
||||
"https": {
|
||||
"Address": ":443",
|
||||
"TLS": {
|
||||
"MinVersion": "",
|
||||
"CipherSuites": null,
|
||||
"Certificates": null,
|
||||
"ClientCAFiles": null
|
||||
},
|
||||
"Auth": null,
|
||||
"Compress": false
|
||||
}
|
||||
},
|
||||
"Cluster": null,
|
||||
"Constraints": [],
|
||||
"ACME": {
|
||||
"Email": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"Domains": [
|
||||
{
|
||||
"Main": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"SANs": null
|
||||
},
|
||||
{
|
||||
"Main": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"SANs": null
|
||||
}
|
||||
],
|
||||
"Storage": "",
|
||||
"StorageFile": "/acme/acme.json",
|
||||
"OnDemand": true,
|
||||
"OnHostRule": true,
|
||||
"CAServer": "",
|
||||
"EntryPoint": "https",
|
||||
"DNSProvider": "",
|
||||
"DelayDontCheckDNS": 0,
|
||||
"ACMELogging": false,
|
||||
"Options": null
|
||||
},
|
||||
"DefaultEntryPoints": [
|
||||
"https",
|
||||
"http"
|
||||
],
|
||||
"ProvidersThrottleDuration": 2000000000,
|
||||
"MaxIdleConnsPerHost": 200,
|
||||
"IdleTimeout": 180000000000,
|
||||
"InsecureSkipVerify": false,
|
||||
"Retry": null,
|
||||
"HealthCheck": {
|
||||
"Interval": 30000000000
|
||||
},
|
||||
"Docker": null,
|
||||
"File": null,
|
||||
"Web": null,
|
||||
"Marathon": null,
|
||||
"Consul": null,
|
||||
"ConsulCatalog": null,
|
||||
"Etcd": null,
|
||||
"Zookeeper": null,
|
||||
"Boltdb": null,
|
||||
"KubernetesIngress": null,
|
||||
"KubernetesCRD": null,
|
||||
"Mesos": null,
|
||||
"Eureka": null,
|
||||
"ECS": null,
|
||||
"Rancher": null,
|
||||
"DynamoDB": null,
|
||||
"ConfigFile": "/etc/traefik/traefik.toml"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue