-
Notifications
You must be signed in to change notification settings - Fork 38.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
Adding support for generating A records for headless services. #8643
Conversation
@@ -4,13 +4,13 @@ | |||
|
|||
.PHONY: all kube2sky container push clean test | |||
|
|||
TAG = 1.6 | |||
TAG = 1.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.
We only need to bump it if you intend to cut a release - is that the intent?
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.
Not yet. Reverted this change.
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 |
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) |
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 ks.newPortalService() to parallel newHeadlessService() ?
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.
Done.
Overall good, a few minor points - could use some helpful comments for poor future me (or future you :) |
e442421
to
f912ddf
Compare
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. |
@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. |
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.
isn't this TODO done by the above?
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.
Good catch. Had it in there while I was working on the PR. Removed.
@@ -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" |
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 is the RBD PR merged into this one?
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.
Rebase issue. Fixed it.
LGTM except you have another PR merged in here (ceph RBD) |
CLAs look good, thanks! |
@thockin: Rebase issue fixed and unwanted TODO removed. |
LGTM |
Rebased to head and updated e2e tests to use the e2e framework. |
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? |
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
|
I don't understand-- how can the new e2e test pass then? |
I ran the e2e manually. If it is imperative to make a new release and use On Sun, May 24, 2015 at 1:52 PM, Daniel Smith notifications@github.com
|
Jenkins will run the e2e tests - if we don't have a kube2sky container On Sun, May 24, 2015 at 6:36 PM, Vish Kannan notifications@github.com
|
Added a new release of kube2sky. |
@thockin Jenkins will run e2e tests post-merge, but it isn't running any tests pre-merge yet - only building them. |
Adding support for generating A records for headless services.
I ran the e2e again and it passed! @saad-ali |
Thanks! On Tue, May 26, 2015 at 2:44 PM, Vish Kannan notifications@github.com
|
Thanks. Merged. Will keep an eye on Jenkins |
Unit and e2e tests will be added.
@thockin @ArtfulCoder