-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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 Traefik prefix to the KV key #2400
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
docs/user-guide/kv-config.md
Outdated
!!! note | ||
If a Consul ACL is used to restrict Træfik read/write access, the following configuration is needed : | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong render: indent the code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code indented under this block.
provider/kv/kv.go
Outdated
@@ -34,7 +37,7 @@ type Provider struct { | |||
func (p *Provider) CreateStore() (store.Store, error) { | |||
storeConfig := &store.Config{ | |||
ConnectionTimeout: 30 * time.Second, | |||
Bucket: "traefik", | |||
Bucket: traefikKVPrefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not a prefix but a bucket name.
provider/kv/kv.go
Outdated
@@ -102,7 +105,7 @@ func (p *Provider) watchKv(configurationChan chan<- types.ConfigMessage, prefix | |||
func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *safe.Pool, constraints types.Constraints) error { | |||
p.Constraints = append(p.Constraints, constraints...) | |||
operation := func() error { | |||
if _, err := p.kvclient.Exists("qmslkjdfmqlskdjfmqlksjazçueznbvbwzlkajzebvkwjdcqmlsfj"); err != nil { | |||
if _, err := p.kvclient.Exists(traefikKVPrefix + "/qmslkjdfmqlskdjfmqlksjazçueznbvbwzlkajzebvkwjdcqmlsfj"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p.prefix
or bucket name ?
Prefix string `description:"Prefix used for KV store" export:"true"`
9d71f28
to
8fb1cf2
Compare
c38e41b
to
d6ff06a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…efik instance and a KV store
d6ff06a
to
db39dbd
Compare
What does this PR do?
Add the prefix
Treafik
to the key used to check the connection to the KV stores.Motivation
Fixes #2394
More
Additional Notes