Bug 1393489 - [RFE] Administrators should be able to set a routes host name, so that the name responds to DNS queries.
Summary: [RFE] Administrators should be able to set a routes host name, so that the na...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.5.z
Assignee: Phil Cameron
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On: 1347822
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-09 16:37 UTC by Eric Rich
Modified: 2018-10-08 13:36 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1347822
Environment:
Last Closed: 2018-10-08 13:36:48 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin-web-console issues 336 0 None None None 2016-11-14 16:09:32 UTC
Origin (Github) 12195 0 None None None 2016-12-09 18:55:23 UTC

Description Eric Rich 2016-11-09 16:37:25 UTC
+++ This bug was initially created as a clone of Bug #1347822 +++

Description of problem:
As a user I want to use custom domain name for my application. That means I need to setup my DNS entry properly pointing at OpenShift routers. 

In order to do this, I need a single name or IP address, to be queryable (on the router object) or reported, when I create a route, with my desired domain name. This will allow me to define a proper CNAME (with my dns provider) that points to the routers hostname, as well as define a routename that aligns with this CNAME. 

- It should be noted that with this model, routes are only routable once a CNAME is established (with a DNS provider, outside of openshift), and a route is defined that use the CNAME as its hostname.

Comment 2 Phil Cameron 2016-12-09 18:48:47 UTC
Code changes
https://github.com/openshift/origin/pull/12195

Comment 3 Phil Cameron 2016-12-14 21:44:58 UTC
Documentation PR 3377
https://github.com/openshift/openshift-docs/pull/3377

Comment 4 openshift-github-bot 2017-01-21 15:34:51 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/dc5a0b0999abcbdb47d558c95110fa97bc60415a
Router sets its host name in admitted routes

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
           https://github.com/openshift/origin-web-console/issues/336
openshift-docs PR#3377

Signed-off-by: Phil Cameron <pcameron>

Comment 5 openshift-github-bot 2017-01-30 04:06:02 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/ceacf503e656f663726ae571c2fd1ff604ad1801
Router sets its hostname in admitted routes

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
https://github.com/openshift/origin/pull/12195

Signed-off-by: Phil Cameron <pcameron>

Comment 6 zhaozhanqi 2018-05-15 08:02:01 UTC
this issue had been resolved from 3.5 version.
So verified this bug .


Note You need to log in before you can comment on or make changes to this bug.