Skip to content

Comments

[RFE] Router sets its dns name in admitted routes#3377

Merged
bfallonf merged 1 commit intoopenshift:masterfrom
pecameron:bz1393489
Jan 30, 2017
Merged

[RFE] Router sets its dns name in admitted routes#3377
bfallonf merged 1 commit intoopenshift:masterfrom
pecameron:bz1393489

Conversation

@pecameron
Copy link

@pecameron pecameron commented Dec 13, 2016

Openshift 3.5 feature

The router is managed by the cluster admin and the admin knows the
external host name of the router. The user creates routes to route
desired host DNS names to the the application. The user doesn't have
access to the router (which is usually in a diffeent namespace). When
a router admits a route the user needs to work with the external
network admin to point the route's hostname to the router. Previously
the user had to contact the cluster admin to find the host name of the
router.

This change adds the --router-canonical-hostname= option to oadm router
which creates and populates the ROUTER_CANONICAL_HOSTNAME environment
variable in the router's dc. This is a string that contains the
canonical hostname of the router. Whenever the router reloads and
evaluates the routes the route's status is edited to include the router's
host name so the user can quickly access the information. If the
ROUTER_CANONICAL_HOSTNAME is updated or added to an existing router the
new information is updated in the admitted routes on the next reload.

The route (oc get route -o yaml) status reports the name
of the router(s) that have admitted the route. This change adds the
Router's host name to the status in the route.

The information is also reported in "oc describe route" as shown below.

Example:

oadm router myroutername --router-canonical-hostname=oh.my.heavens.org

oc get dc/myroutername -o yaml
...
spec:
template:
spec:
containers:
- env:
- name: ROUTER_CANONICAL_HOSTNAME
value: oh.my.heavens.org

oc get route hello-route3 -o yaml
...
status:
ingress:

  • conditions:
    • lastTransitionTime: 2016-12-07T15:20:57Z
      status: "True"
      type: Admitted
      host: hello-openshift-v3.not.in3.mycloud.com
      routerCanonicalHostname: oh.my.heavens.org
      routerName: myroutername
      wildcardPolicy: None

oc describe route/hello-route3
...
Requested Host: hello-openshift-v3.not.in3.mycloud.com
exposed on router myroutername (host oh.my.heavens.org) 12
minutes ago

bug 1393489
🚶‍♂️ https://bugzilla.redhat.com/show_bug.cgi?id=1393489
Resolves origin-web-console issue 336
Trello:
https://trello.com/c/BLASUOQC/376-5-add-a-way-to-pass-a-preferred-dns-name-to-routers-to-populate-route-statuses-ingress-usability
openshift/origin#12195

Signed-off-by: Phil Cameron pcameron@redhat.com

@pecameron
Copy link
Author

@knobunc First draft of router DNS Name doc changes PTAL

@pecameron pecameron force-pushed the bz1393489 branch 2 times, most recently from 9b9c17e to ad44b94 Compare January 13, 2017 21:36
@pecameron
Copy link
Author

@knobunc changed from dns name to hostname PTAL

@pecameron pecameron force-pushed the bz1393489 branch 2 times, most recently from cdab728 to d5529ff Compare January 18, 2017 16:18
@pecameron
Copy link
Author

@knobunc changed to --router-canonical-hostname and ROUTER_CANONICAL_HOSTNAME
PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

?

The point is that the end user should set up their DNS with a CNAME that points at this hostname.

Copy link
Author

Choose a reason for hiding this comment

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

@knobunc changed

Copy link
Contributor

Choose a reason for hiding this comment

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

known

Copy link
Author

Choose a reason for hiding this comment

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

Chanaged

Copy link
Contributor

Choose a reason for hiding this comment

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

s/routeri/router/

Copy link
Author

Choose a reason for hiding this comment

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

Changed

Copy link
Contributor

Choose a reason for hiding this comment

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

iCANONICAL again

Copy link
Author

Choose a reason for hiding this comment

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

Changed

Copy link
Contributor

Choose a reason for hiding this comment

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

Say deployment config not dc (here and throughout)

Copy link
Author

Choose a reason for hiding this comment

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

Changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hopefully the cluster administrator documents how to make that selection if multiple admit the route...

Copy link
Author

Choose a reason for hiding this comment

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

@knobunc Isn't router to application a potentially many to one mapping? You can pick any router that admits the route and get traffic to the application. What do you want to say here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should this paragraph be lower? It feels out of order.

Copy link
Author

Choose a reason for hiding this comment

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

Moved it lower

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe not network admin, but DNS admin? And ask them to set up a CNAME from ... to ...

Copy link
Author

Choose a reason for hiding this comment

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

Reworded this.

Copy link
Contributor

Choose a reason for hiding this comment

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

the route, the router

Copy link
Author

Choose a reason for hiding this comment

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

Changed

@pecameron
Copy link
Author

@knobunc Any further changes needed before moving this along?

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to either say 'host name' or 'hostname' consistently throughout. I think hostname is now preferred in the later RFCs.

Copy link
Author

Choose a reason for hiding this comment

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

OK changed to hostname

Copy link
Contributor

Choose a reason for hiding this comment

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

The argument to ... ? The flag itself isn't that...

Copy link
Author

Choose a reason for hiding this comment

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

Changed wording

Copy link
Contributor

Choose a reason for hiding this comment

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

The current value of ...

Copy link
Author

Choose a reason for hiding this comment

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

Changed wording.

@pecameron
Copy link
Author

@knobunc PTAL

Copy link
Contributor

@knobunc knobunc left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@knobunc
Copy link
Contributor

knobunc commented Jan 24, 2017

@openshift/team-documentation tech review complete. Over to you

@vikram-redhat
Copy link
Contributor

@bfallonf - PTAL.

Choose a reason for hiding this comment

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

@pecameron Can I ask: "that is shown in the in route statuses".

Should that be "that is shown in the route status" or should it have markup (is it some sort of parameter or variable) like "that is shown in the IN_ROUTE statuses"

?

Copy link
Author

Choose a reason for hiding this comment

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

@bfallonf should be status. Fixed...

Choose a reason for hiding this comment

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

Sure. Thanks @pecameron . I'll merge this and do a followup.

@bfallonf
Copy link

@pecameron I just have one question, but when that's answered I can merge and perhaps do some style followups. Otherwise, looks good!

Openshift 3.5 feature

The router is managed by the cluster admin and the admin knows the
external host name of the router. The user creates routes to route
desired host DNS names to the the application. The user doesn't have
access to the router (which is usually in a different namespace). When
a router admits a route the user needs to work with the external
network admin to point the route's hostname to the router. Previously
the user had to contact the cluster admin to find the host name of the
router.

This change adds the --router-canonical-hostname= option to oadm router
which creates and populates the ROUTER_CANONICAL_HOSTNAME environment
variable in the router's dc. This is a string that contains the
canonical hostname of the router. Whenever the router reloads and
evaluates the routes the route's status is edited to include the
router's host name so the user can quickly access the information. If
the ROUTER_CANONICAL_HOSTNAME is updated or added to an existing router
the new information is updated in the admitted routes on the next reload.

The route (oc get route <routename> -o yaml) status reports the name
of the router(s) that have admitted the route. This change adds the
Router's host name to the status in the route.

The information is also reported in "oc describe route" as shown below.

Example:

oadm router myroutername --router-canonical-hostname=oh.my.heavens.org

oc get dc/myroutername -o yaml
...
spec:
  template:
    spec:
      containers:
      - env:
        - name: ROUTER_CANONICAL_HOSTNAME
          value: oh.my.heavens.org

oc get route hello-route3 -o yaml
...
status:
  ingress:
  - conditions:
    - lastTransitionTime: 2016-12-07T15:20:57Z
      status: "True"
      type: Admitted
    host: hello-openshift-v3.not.in3.mycloud.com
    routerCanonicalHostname: oh.my.heavens.org
    routerName: myroutername
    wildcardPolicy: None

oc describe route/hello-route3
...
Requested Host: hello-openshift-v3.not.in3.mycloud.com
          exposed on router myroutername (host oh.my.heavens.org) 12
minutes ago

bug 1393489
https://bugzilla.redhat.com/show_bug.cgi?id=1393489
Resolves origin-web-console issue 336
Trello:
https://trello.com/c/BLASUOQC/376-5-add-a-way-to-pass-a-preferred-dns-name-to-routers-to-populate-route-statuses-ingress-usability
openshift/origin#12195

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@bfallonf bfallonf merged commit 1e4c678 into openshift:master Jan 30, 2017
@vikram-redhat vikram-redhat modified the milestones: Future Release, Staging Apr 12, 2017
@vikram-redhat vikram-redhat modified the milestones: OCP 3.5 GA, Staging Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants