Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1391786 - [networking_public_222]Should add related option like 'wildcardPolicy' for CLI/WEB when creating route
[networking_public_222]Should add related option like 'wildcardPolicy' for CL...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking (Show other bugs)
3.4.0
All All
high Severity medium
: ---
: ---
Assigned To: jtanenba
Meng Bo
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-03 23:23 EDT by zhaozhanqi
Modified: 2017-07-24 10 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Add wildcard route support to the CLI Reason: A feature was not exposed in the CLI. Result: Now you can create routes as wildcard in the CLI.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 15:16:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Origin (Github) 12238 None None None 2016-12-13 10:47 EST
Origin (Github) 12713 None None None 2017-01-30 13:23 EST
Origin (Github) 12774 None None None 2017-02-02 13:27 EST
Origin (Github) 12849 None None None 2017-02-07 09:50 EST
Red Hat Product Errata RHBA-2017:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description zhaozhanqi 2016-11-03 23:23:26 EDT
Description of problem:

Should add one option 'wildcardPolicy' when creating wildcard subdomain route like 'oc expose svc/oc create route' otherwise, we cannot create wildcard subdomain route in CLI. 

'wildcardPolicy' have been added in API, detail https://github.com/openshift/origin/pull/11550/files

Version-Release number of selected component (if applicable):
# oc version
oc v3.4.0.21+ca4702d
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO


How reproducible:
always

Steps to Reproduce:
1. oc expose svc --help 
2. oc create route --help
3.

Actual results:
no this option like 'wildcardPolicy'

Expected results:
should add this option for creating wildcard subdomain route.

Additional info:
for now we only can create wildcard subdomain route by json like 

{
    "kind": "Route",
    "apiVersion": "v1",
    "metadata": {
        "name": "route-passthrough"
    },
    "spec": {
        "host": "route-pass.example.com",
         "wildcardPolicy": "Subdomain",
        "to": {
            "kind": "Service",
            "name": "service-secure"
        },
        "tls": {
        "termination": "passthrough"
        }
    }
}
Comment 2 Meng Bo 2016-11-07 06:39:56 EST
We should also report the wildcard status back to the CLI when GET the routes.

$ oc get route -o wide 
NAME          HOST/PORT          PATH      SERVICES           PORT      TERMINATION
route-edge3   edge.example.com             service-unsecure   <all>     edge
Comment 4 Ben Bennett 2017-01-17 10:39:18 EST
The work for the CLI is done (https://github.com/openshift/origin/issues/12238)

The web console work is being done on card https://trello.com/c/GEdeKzea

Closing this in preference to the card.
Comment 5 zhaozhanqi 2017-01-18 21:25:33 EST
hi, 
 reopen this bug since it's not complete.

1. this feature should be also added to `oc create route` for the TLS related route.

2. should add an extra column for oc get route at same time.
Comment 6 jtanenba 2017-01-30 13:23:55 EST
Linked PR should complete this BZ

https://github.com/openshift/origin/pull/12713
Comment 7 openshift-github-bot 2017-02-02 12:40:34 EST
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/5dbe22899128d7066d4c2783c10eb858a5c5bb12
Adding wildcardpolicy flag to `oc create route` and a column for the wildcardpolicy to `oc get route'

Adding wildcard policy to 'oc create route'

Adding a column for wildcard policy in 'oc get route'

Bug 1391786
Comment 8 jtanenba 2017-02-02 13:27:24 EST
follow up PR:
https://github.com/openshift/origin/pull/12774
Comment 9 Troy Dawson 2017-02-06 14:27:01 EST
This has been merged into ocp and is in OCP v3.5.0.17 or newer.
Comment 11 zhaozhanqi 2017-02-06 22:13:26 EST
Did testing on v3.5.0.17 version, the added option is working well. 

there is a little issue for `oc expose svc`

found in `oc expose svc` the option still is '--wildcardpolicy=', please help updated to '--wildcard-policy=' in order to keep consistent with `oc create route` side


************ oc expose svc *********************
$ oc expose svc --help | tail -3

 --wildcardpolicy='': Sets the WildcardPolicy for the hostname, the default is "None". Valid values are "None" and "Subdomain"


************ oc create route************************

# oc create route edge --help | tail -4
    # oc create route edge --help | tail -3
      --wildcard-policy='': Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"

Use "oc options" for a list of global command-line options (applies to all commands).
Comment 12 jtanenba 2017-02-07 09:50:59 EST
Posted follow-up

https://bugzilla.redhat.com/show_bug.cgi?id=1391786
Comment 13 jtanenba 2017-02-07 09:54:25 EST
(In reply to jtanenba from comment #12)
> Posted follow-up
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1391786

Sorry the link is 
https://github.com/openshift/origin/pull/12849
Comment 14 Troy Dawson 2017-02-08 17:27:11 EST
This has been merged into ocp and is in OCP v3.5.0.18 or newer.
Comment 15 zhaozhanqi 2017-02-08 23:14:46 EST
Verified this bug on v3.5.0.18
Comment 17 errata-xmlrpc 2017-04-12 15:16:00 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0884

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