-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Migrate to use etcd client v3 for CoreDNS provider #686
Conversation
99a78cd
to
87ee5cf
Compare
endpoint/labels.go
Outdated
@@ -52,8 +52,8 @@ func NewLabels() Labels { | |||
// NewLabelsFromString constructs endpoints labels from a provided format string | |||
// if heritage set to another value is found then error is returned | |||
// no heritage automatically assumes is not owned by external-dns and returns invalidHeritage error | |||
func NewLabelsFromString(labelText string) (Labels, error) { | |||
endpointLabels := map[string]string{} | |||
func NewLabelsFromString(existingLabels map[string]string, labelText string) (Labels, error) { |
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.
Why do you have to pass in a map string? TBH I don't like this idea.
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 for your PR 👍 ! I made a comment above.
87ee5cf
to
5a62a6d
Compare
@njuettner @shashidharatd any updates? |
I am planning to work on it in few days !! |
I am stuck now. stable etcd release version is
|
Here is the exact issue, i am stuck with and not able to bump etcd
|
Hello, we are trying to test external-dns with coredns 1.2.X / etcdv3 backend, any idea of the next step ? |
@shashidharatd I have been able to build a working external-dns binary when merging this PR into the master branch and make it work with our coredns/etcdv3 cluster. |
That's awesome, what is the etcd version you used, @jremond ? |
@shashidharatd coredns 1.2.1 I merged your code after 5ff808f in master |
I am still getting the same error, when i do
This issue will be resolved by grpc/grpc-go#711 in 5 days. Then etcd should pick this change in their development branch, and we can use it in this project. a long shot. |
@jremond, i suggest you create a new pr with your changes. that would trigger all tests and not just the binary build. lets see how it goes. |
See #761 |
@jremond, recent changes in this repo seemed to fix the issue in this pr. I rebased this pr on latest changes and then did |
5a62a6d
to
66c6a57
Compare
@njuettner @linki, this pr is now unblocked. can you please check it again. @njuettner, i have removed the commit on which you have objection. That problem should have been fixed by #713. Thanks ! |
/assign @njuettner |
provider/coredns.go
Outdated
var sx []*Service | ||
bx := make(map[Service]bool) | ||
for _, n := range r.Kvs { | ||
serv := new(Service) |
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.
wouldn't it be better to name it s
or svc
. serv
sounds more like server to me 😄
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.
updated.
provider/coredns.go
Outdated
queue.PushBack(childNode) | ||
} | ||
continue | ||
var sx []*Service |
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.
maybe svcs?
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.
updated.
} | ||
continue | ||
var sx []*Service | ||
bx := make(map[Service]bool) |
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.
For someone which reads the code it's hard to tell what it does, could you find a better name? or just comment what it does :)
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 have added comments now. sorry for the issue in readability. i referred to the etcd
plugin in coredns
here and didn't do too much of my own modifications.
66c6a57
to
a1563f0
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.
Thanks @njuettner, can you ptal once again. have addressed your comments.
/LGTM |
/APPROVE |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: njuettner The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR is for migrating CoreDNS provider which is based on etcd client v2 to etcd client v3. (Fixes #659 )
Also fixed
couple ofbelow issue:Endpoint Labels are getting lost in TXT registry. 8424d40/cc @njuettner @linki @ideahitme