Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1421990

Summary: option '--wildcard-policy=' cannot work for 'oc expose svc'
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Jacob Tanenbaum <jtanenba>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, bbennett, tdawson
Version: 3.5.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 19:12:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhaozhanqi 2017-02-14 09:45:57 UTC
Description of problem:
Using 'oc expose svc' to create wildcard route with option '--wildcard-policy=Subdomain'.  the column 'WILDCARD' of route still be 'None'

Version-Release number of selected component (if applicable):
# openshift version
openshift v3.5.0.20+87266c6
kubernetes v1.5.2+43a9be4
etcd 3.1.0


How reproducible:
always

Steps to Reproduce:
1. Create service
   oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/unsecure/service_unsecure.json -n z1
2.  Create wildcard route
  oc expose service service-unsecure --hostname=wildcard.0214-0ml.qe.rhcloud.com --wildcard-policy=Subdomain -n z1
3. check the route
  oc get route

Actual results:

step 3

# oc get route service-unsecure -n z1 
NAME               HOST/PORT                          PATH      SERVICES           PORT      TERMINATION   WILDCARD
service-unsecure   wildcard.0214-0ml.qe.rhcloud.com             service-unsecure   http                    None

Expected results:

the route should be wildcard route when using 'Subdomin'

Additional info:

Comment 1 Jacob Tanenbaum 2017-02-14 16:13:32 UTC
Origin PR: 
https://github.com/openshift/origin/pull/12954

Comment 2 openshift-github-bot 2017-02-15 08:52:24 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/94c654d58336de796df0bba6ab50c8a078b86b11
change the parameter names in the route generation function to match the oc expose flag name

When the wildcardpolicy flag was changed to wildcard-policy the GeneraterParam was left unchanged
this mismatch caused the wildcard-policy to be ignored and always appear as none when using oc expose

Bug 1421990

Comment 3 Troy Dawson 2017-02-16 20:32:33 UTC
This has been merged into ocp and is in OCP v3.5.0.21 or newer.

Comment 5 zhaozhanqi 2017-02-17 06:03:59 UTC
Verified this bug on OCP v3.5.0.21

Comment 7 errata-xmlrpc 2017-04-12 19:12:52 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