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

Adding support for generating A records for headless services. #8643

Merged
merged 3 commits into from May 26, 2015

Conversation

vishh
Copy link
Contributor

@vishh vishh commented May 21, 2015

Unit and e2e tests will be added.

@thockin @ArtfulCoder

@@ -4,13 +4,13 @@

.PHONY: all kube2sky container push clean test

TAG = 1.6
TAG = 1.7
Copy link
Member

Choose a reason for hiding this comment

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

We only need to bump it if you intend to cut a release - is that the intent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet. Reverted this change.

@vishh
Copy link
Contributor Author

vishh commented May 21, 2015

Sample output:

# kubectl get services elasticsearch-logging-h
NAME                      LABELS                                                                                                    SELECTOR                     IP(S)     PORT(S)
elasticsearch-logging-h   kubernetes.io/cluster-service=true,kubernetes.io/name=Elasticsearch-headless,name=elasticsearch-logging   name=elasticsearch-logging   None      9200/TCP
$ dig @10.244.1.10 elasticsearch-logging-h.default.cluster.local

;; QUESTION SECTION:
;elasticsearch-logging-h.default.cluster.local. IN A

;; ANSWER SECTION:
elasticsearch-logging-h.default.cluster.local. 30 IN A 10.244.0.4
elasticsearch-logging-h.default.cluster.local. 30 IN A 10.244.1.3

@k8s-bot
Copy link

k8s-bot commented May 21, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain @ixdy.

if !kapi.IsServiceIPSet(service) {
return ks.newHeadlessService(subdomain, service)
}
return ks.generateRecordsForRegularService(subdomain, service)
Copy link
Member

Choose a reason for hiding this comment

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

maybe ks.newPortalService() to parallel newHeadlessService() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@thockin
Copy link
Member

thockin commented May 21, 2015

Overall good, a few minor points - could use some helpful comments for poor future me (or future you :)

@vishh vishh force-pushed the headless branch 4 times, most recently from e442421 to f912ddf Compare May 22, 2015 21:03
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@vishh vishh changed the title WIP: Adding support for generating A records for headless services. Adding support for generating A records for headless services. May 22, 2015
@vishh
Copy link
Contributor Author

vishh commented May 22, 2015

@thockin: Unit tests and e2e tests added. The e2e test needs to be upgraded to verify the number of A records. But, this PR is safe to land as-is.

glog.V(2).Infof("Subdomain %q does not exist in etcd", subdomain)
return nil
}
// TODO: Ignore non-existent subdomains.
Copy link
Member

Choose a reason for hiding this comment

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

isn't this TODO done by the above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Had it in there while I was working on the PR. Removed.

@thockin thockin added lgtm "Looks good to me", indicates that a PR is ready to be merged. cla: yes and removed cla: no lgtm "Looks good to me", indicates that a PR is ready to be merged. labels May 22, 2015
@@ -34,6 +34,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/volume/iscsi"
"github.com/GoogleCloudPlatform/kubernetes/pkg/volume/nfs"
"github.com/GoogleCloudPlatform/kubernetes/pkg/volume/persistent_claim"
"github.com/GoogleCloudPlatform/kubernetes/pkg/volume/rbd"
Copy link
Member

Choose a reason for hiding this comment

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

why is the RBD PR merged into this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebase issue. Fixed it.

@thockin
Copy link
Member

thockin commented May 22, 2015

LGTM except you have another PR merged in here (ceph RBD)

@googlebot
Copy link

CLAs look good, thanks!

@vishh
Copy link
Contributor Author

vishh commented May 22, 2015

@thockin: Rebase issue fixed and unwanted TODO removed.

@thockin thockin added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 22, 2015
@thockin
Copy link
Member

thockin commented May 22, 2015

LGTM

@vishh
Copy link
Contributor Author

vishh commented May 23, 2015

Rebased to head and updated e2e tests to use the e2e framework.

@lavalamp
Copy link
Member

Maybe I am dense but I can't tell from the PR-- what tag did you build kube2sky with, and where is the configuration change to make the cluster use the new build?

@vishh
Copy link
Contributor Author

vishh commented May 24, 2015

I am not making a new kube2sky as part of this release.

On Sat, May 23, 2015 at 8:28 PM, Daniel Smith notifications@github.com
wrote:

Maybe I am dense but I can't tell from the PR-- what tag did you build
kube2sky with, and where is the configuration change to make the cluster
use the new build?


Reply to this email directly or view it on GitHub
#8643 (comment)
.

@lavalamp
Copy link
Member

I don't understand-- how can the new e2e test pass then?

@vishh
Copy link
Contributor Author

vishh commented May 25, 2015

I ran the e2e manually. If it is imperative to make a new release and use
jenkins e2e to verify this PR, I can make a new release.

On Sun, May 24, 2015 at 1:52 PM, Daniel Smith notifications@github.com
wrote:

I don't understand-- how can the new e2e test pass then?


Reply to this email directly or view it on GitHub
#8643 (comment)
.

@thockin
Copy link
Member

thockin commented May 25, 2015

Jenkins will run the e2e tests - if we don't have a kube2sky container
pushed it can't pass, right?

On Sun, May 24, 2015 at 6:36 PM, Vish Kannan notifications@github.com
wrote:

I ran the e2e manually. If it is imperative to make a new release and use
jenkins e2e to verify this PR, I can make a new release.

On Sun, May 24, 2015 at 1:52 PM, Daniel Smith notifications@github.com
wrote:

I don't understand-- how can the new e2e test pass then?


Reply to this email directly or view it on GitHub
<
#8643 (comment)

.


Reply to this email directly or view it on GitHub
#8643 (comment)
.

@vishh
Copy link
Contributor Author

vishh commented May 26, 2015

Added a new release of kube2sky.

@ixdy
Copy link
Member

ixdy commented May 26, 2015

@thockin Jenkins will run e2e tests post-merge, but it isn't running any tests pre-merge yet - only building them.

saad-ali added a commit that referenced this pull request May 26, 2015
Adding support for generating A records for headless services.
@saad-ali saad-ali merged commit abaa278 into kubernetes:master May 26, 2015
@vishh
Copy link
Contributor Author

vishh commented May 26, 2015

I ran the e2e again and it passed! @saad-ali

@thockin
Copy link
Member

thockin commented May 26, 2015

Thanks!

On Tue, May 26, 2015 at 2:44 PM, Vish Kannan notifications@github.com
wrote:

I ran the e2e again and it passed! @saad-ali https://github.com/saad-ali


Reply to this email directly or view it on GitHub
#8643 (comment)
.

@saad-ali
Copy link
Member

Thanks. Merged. Will keep an eye on Jenkins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants