Bug 1391786 - [networking_public_222]Should add related option like 'wildcardPolicy' for CLI/WEB when creating route
Summary: [networking_public_222]Should add related option like 'wildcardPolicy' for CL...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.4.0
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Jacob Tanenbaum
QA Contact: Meng Bo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-04 03:23 UTC by zhaozhanqi
Modified: 2017-07-24 14:11 UTC (History)
7 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-04-12 19:16:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 12238 0 None None None 2016-12-13 15:47:36 UTC
Origin (Github) 12713 0 None None None 2017-01-30 18:23:54 UTC
Origin (Github) 12774 0 None None None 2017-02-02 18:27:24 UTC
Origin (Github) 12849 0 None None None 2017-02-07 14:50:59 UTC
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description zhaozhanqi 2016-11-04 03:23:26 UTC
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 11:39:56 UTC
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 15:39:18 UTC
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-19 02:25:33 UTC
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 Jacob Tanenbaum 2017-01-30 18:23:55 UTC
Linked PR should complete this BZ

https://github.com/openshift/origin/pull/12713

Comment 7 openshift-github-bot 2017-02-02 17:40:34 UTC
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 Jacob Tanenbaum 2017-02-02 18:27:24 UTC
follow up PR:
https://github.com/openshift/origin/pull/12774

Comment 9 Troy Dawson 2017-02-06 19:27:01 UTC
This has been merged into ocp and is in OCP v3.5.0.17 or newer.

Comment 11 zhaozhanqi 2017-02-07 03:13:26 UTC
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 Jacob Tanenbaum 2017-02-07 14:50:59 UTC
Posted follow-up

https://bugzilla.redhat.com/show_bug.cgi?id=1391786

Comment 13 Jacob Tanenbaum 2017-02-07 14:54:25 UTC
(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 22:27:11 UTC
This has been merged into ocp and is in OCP v3.5.0.18 or newer.

Comment 15 zhaozhanqi 2017-02-09 04:14:46 UTC
Verified this bug on v3.5.0.18

Comment 17 errata-xmlrpc 2017-04-12 19:16:00 UTC
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.