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 Traefik prefix to the KV key #2400

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

nmengin
Copy link
Contributor

@nmengin nmengin commented Nov 13, 2017

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

  • Updated documentation

Additional Notes

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏

!!! note
If a Consul ACL is used to restrict Træfik read/write access, the following configuration is needed :

```
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@@ -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,
Copy link
Contributor

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.

@@ -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 {
Copy link
Contributor

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"`

@nmengin nmengin force-pushed the hotfix/prefix-key-consul-acl branch 4 times, most recently from 9d71f28 to 8fb1cf2 Compare November 14, 2017 08:18
@nmengin nmengin force-pushed the hotfix/prefix-key-consul-acl branch 2 times, most recently from c38e41b to d6ff06a Compare November 14, 2017 09:52
Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker traefiker force-pushed the hotfix/prefix-key-consul-acl branch from d6ff06a to db39dbd Compare November 14, 2017 10:24
@traefiker traefiker merged commit 96a7cc4 into traefik:v1.4 Nov 14, 2017
@nmengin nmengin deleted the hotfix/prefix-key-consul-acl branch August 3, 2018 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants