Skip to content

Commit

Permalink
Merge pull request #1357 from tcolgate/libkvuname
Browse files Browse the repository at this point in the history
Add libkv Username and Password
  • Loading branch information
ldez committed Apr 28, 2017
2 parents 2f1a7cb + de6d771 commit 74925ba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,13 @@ prefix = "/traefik"
#
# filename = "etcd.tmpl"
# Use etcd user/pass authentication
#
# Optional
#
# username = foo
# password = bar
# Enable etcd TLS connection
#
# Optional
Expand Down
4 changes: 4 additions & 0 deletions provider/kv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 {
Expand Down
8 changes: 7 additions & 1 deletion traefik.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,13 @@
#
# filename = "etcd.tmpl"

# Use etcd user/pass authentication
#
# Optional
#
# username = foo
# password = bar

# Enable etcd TLS connection
#
# Optional
Expand All @@ -865,7 +872,6 @@
# key = "/etc/ssl/etcd.key"
# insecureskipverify = true


################################################################
# Zookeeper configuration backend
################################################################
Expand Down

0 comments on commit 74925ba

Please sign in to comment.