Merge pull request #1357 from tcolgate/libkvuname

Add libkv Username and Password
This commit is contained in:
Ludovic Fernandez 2017-04-28 16:51:41 +02:00 committed by GitHub
commit 74925ba996
3 changed files with 18 additions and 1 deletions

View file

@ -1305,6 +1305,13 @@ prefix = "/traefik"
#
# filename = "etcd.tmpl"
# Use etcd user/pass authentication
#
# Optional
#
# username = foo
# password = bar
# Enable etcd TLS connection
#
# Optional

View file

@ -24,6 +24,8 @@ type Provider struct {
Endpoint string `description:"Comma separated server endpoints"`
Prefix string `description:"Prefix used for KV store"`
TLS *provider.ClientTLS `description:"Enable TLS support"`
Username string `description:"KV Username"`
Password string `description:"KV Password"`
StoreType store.Backend
Kvclient store.Store
}
@ -33,6 +35,8 @@ func (p *Provider) CreateStore() (store.Store, error) {
storeConfig := &store.Config{
ConnectionTimeout: 30 * time.Second,
Bucket: "traefik",
Username: p.Username,
Password: p.Password,
}
if p.TLS != nil {

View file

@ -855,6 +855,13 @@
#
# filename = "etcd.tmpl"
# Use etcd user/pass authentication
#
# Optional
#
# username = foo
# password = bar
# Enable etcd TLS connection
#
# Optional
@ -865,7 +872,6 @@
# key = "/etc/ssl/etcd.key"
# insecureskipverify = true
################################################################
# Zookeeper configuration backend
################################################################