-
-
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
Support Etcd v3, enhance KV support #2407
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
7f770cd
to
2de94fa
Compare
308f991
to
46be176
Compare
@@ -36,13 +36,19 @@ import: | |||
- tlsconfig | |||
- package: github.com/docker/go-units | |||
version: 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1 | |||
- package: github.com/coreos/etcd | |||
version: v3.2.9 |
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.
Just a question. Why it is not the same version that is present in docker compose file v3.2.9
<> v3.2.7
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.
Modification done in the docker-compose fileS.
integration/etcd_test.go
Outdated
@@ -72,14 +84,12 @@ func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { | |||
|
|||
// TODO validate : run on 80 | |||
// Expected a 404 as we did not configure anything | |||
err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) | |||
err = try.GetRequest(traefikEtcdURL, 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) |
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.
Could you please replace 1000*time.Millisecond
with 1*time.Second
46be176
to
38df4a1
Compare
d0a92cb
to
d2d6830
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 👏
3eb92e5
to
67fbb54
Compare
67fbb54
to
680fa6c
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.
Thanks a lot @nmengin 😍
Few minor comments but overall, looks very good to me :)
docs/configuration/backends/etcd.md
Outdated
|
||
!!! Note | ||
the option `useAPIV3` allows using Etcd API V3 only if it's set to true. | ||
This option will be **deprecated** and API V3 will be the only version compatible with Træfik. |
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.
s/will be/is
esac | ||
} | ||
|
||
main $@ |
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.
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.
@emilevauge For the moment I prefer keep it as long as we do not have end-to-end test about the cluster mode.
It allows generating easily a Dockerized Træfik cluster...
Moreover, shell is life... shell is like an unicorn or a rainbow or both...
provider/etcd/etcd.go
Outdated
etcdv3.Register() | ||
p.SetStoreType(store.ETCDV3) | ||
} else { | ||
log.Warn("The ETCD API V2 is deprecated. Please use API V3 instead") |
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.
Could you add a comment // TODO: Deprecated
before ?
680fa6c
to
8e81b7e
Compare
8e81b7e
to
2c51cbf
Compare
2c51cbf
to
8c4a392
Compare
4e2a0e9
to
f7f86da
Compare
What does this PR do?
In the way to migrate fix some bugs with KV store, essentially ETCDV3, this PR migrates Træfik to the abronan libkv fork we have to migrate first stært in the way to fix dependencies.
Motivation
Fixes #926 #1034 #2069 #1974 #1975
More
Additional information
The new libkv version allows connections to ETCD through both
V2
andV3
API.In the way to avoid breaking change, the parameter
userAPIV3
was added to the backend ETCD.Note : Both the Atcd API V2 and the option
userAPIV3
are deprecated. More information about deprecated option in proposal #2212.