Skip to content

Handle services of type ExternalName by returning a CNAME #11790

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

Merged

Conversation

smarterclayton
Copy link
Contributor

Compliance with Kube 1.4

@ncdc [test]

@smarterclayton smarterclayton force-pushed the support_external_name_dns branch from a55e1ed to 8f5bf24 Compare November 4, 2016 18:24
@ncdc
Copy link
Contributor

ncdc commented Nov 4, 2016

@knobunc @liggitt

@ncdc
Copy link
Contributor

ncdc commented Nov 4, 2016

Wow that took me way too long to figure out the bash craziness in the extended dns test for verifying that dig is working correctly :p.

LGTM

@smarterclayton
Copy link
Contributor Author

I blame Tim Hockin. He's crazy, and I didn't want to rewrite those.

On Nov 4, 2016, at 3:49 PM, Andy Goldstein [email protected] wrote:

Wow that took me way too long to figure out the bash craziness in the
extended dns test for verifying that dig is working correctly :p.

LGTM


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#11790 (comment),
or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABG_p04eb4V1DH_HrvjjRQ6SBk_aoCp_ks5q64xfgaJpZM4Kp1Hb
.

@@ -140,8 +140,13 @@ func (b *ServiceResolver) Records(dnsName string, exact bool) ([]msg.Service, er

// if has a portal IP and looking at svc
if svc.Spec.ClusterIP != kapi.ClusterIPNone && !retrieveEndpoints {
hostValue := svc.Spec.ClusterIP
if svc.Spec.Type == kapi.ServiceTypeExternalName {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this only valid if len(svc.Spec.ClusterIP) == 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but type dominates clusterIP

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@@ -128,7 +128,7 @@ func (b *ServiceResolver) Records(dnsName string, exact bool) ([]msg.Service, er
}

// no clusterIP and not headless, no DNS
if len(svc.Spec.ClusterIP) == 0 {
if len(svc.Spec.ClusterIP) == 0 && svc.Spec.Type != kapi.ServiceTypeExternalName {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any security implication to letting the user control the CNAME that comes back from a DNS query?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can already set up a proxy at that name that points to any server. TLS only trusts the name the user gives, not the other way around. Also, you trust the name and the thing the name points to already.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@smarterclayton smarterclayton force-pushed the support_external_name_dns branch from 8f5bf24 to ef10971 Compare November 4, 2016 20:59
@@ -128,7 +128,7 @@ func (b *ServiceResolver) Records(dnsName string, exact bool) ([]msg.Service, er
}

// no clusterIP and not headless, no DNS
if len(svc.Spec.ClusterIP) == 0 {
if len(svc.Spec.ClusterIP) == 0 && svc.Spec.Type != kapi.ServiceTypeExternalName {
Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@@ -140,8 +140,13 @@ func (b *ServiceResolver) Records(dnsName string, exact bool) ([]msg.Service, er

// if has a portal IP and looking at svc
if svc.Spec.ClusterIP != kapi.ClusterIPNone && !retrieveEndpoints {
hostValue := svc.Spec.ClusterIP
if svc.Spec.Type == kapi.ServiceTypeExternalName {
Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@smarterclayton
Copy link
Contributor Author

[test]

@smarterclayton smarterclayton force-pushed the support_external_name_dns branch from ef10971 to a3f4e25 Compare November 5, 2016 04:11
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to a3f4e25

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11172/) (Base Commit: 046fad4)

@smarterclayton
Copy link
Contributor Author

[merge](test passed)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to a3f4e25

@openshift-bot
Copy link
Contributor

openshift-bot commented Nov 5, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11182/) (Base Commit: 3c28ed4) (Image: devenv-rhel7_5325)

@openshift-bot openshift-bot merged commit b81b382 into openshift:master Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants