Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libkv Username and Password #1357

Merged
merged 1 commit into from
Apr 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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