-
Notifications
You must be signed in to change notification settings - Fork 481
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
fix bug with delete externalName service #210
fix bug with delete externalName service #210
Conversation
/ok-to-test |
@BenTheElder travis-ci broked in the master branch. |
@BenTheElder Any updated? |
@sergeylanzman I'm not the right person to review this PR, but Prow tests are passing at least. To get Travis to re-run I think you can close / reopen it. We have |
/assign @MrHohn |
/retest |
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 the fix, this makes sense. According to the specification and doc on kubernetes.io, endpoints controller does not create Endpoints records for externalName service (users might be able to be that should have no effect) and such service only gets a CNAME record.
/lgtm
@MrHohn what about release 1.14.9? I need this fix, today I can't delete externalname service |
@sergeylanzman We are planing on releasing 1.14.9 ~next week. While I agree we shouldn't generate unnecessary record for extenalName service, it is not quite clear to me how you have hit this. "On delete service from namespace kube-dns get event EndpointAdd" sounds a bit odd, deleting a service shouldn't have any endpoint to be created, or do you have some custom logic that triggers this? |
Step to reproduce
I continue to receive DNS resolve with externalName CName value |
@sergeylanzman Interesting, sounds like the endpoints controller was tricked and thought the yet to be deleted endpoint belongs to the externalName service. Did you create the externalName service with the same selector (which should have no effect)? |
@MrHohn I create extername service with kubectl create, without selector, but it's create with selector from clusterIP(maybe cache in apiserver) |
On delete service from namespace kube-dns get event EndpointAdd.
Func addDNSUsingEndpoints generate RecordsForHeadlessService in cache to service type externalName.
After this delete from a cache, it's deleted an empty record, but a record of Entries for externalName stuck forever.
Solution: don't generate the empty record for externalName