-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding wildcard policy to oc create route
and a column for it in oc get route
#12713
Conversation
@openshift/networking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @ramr PTAL
[test] |
Please reword your commit message to be descriptive as to what it's actually doing (Add wildcard policy to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pkg/cmd/cli/cmd/create/route.go
Outdated
return "", fmt.Errorf("only \"Subdomain\" or \"None\" are supported for wildcardpolicy") | ||
} | ||
return wildcardpolicy, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should use validation from the route api (we will need to export
something out in the route validation for that though). This looks good for now but if you can please add a comment here that we should use the validation from the route. Thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation functions are called as part of object creation on the server side. I used debug functions to print a stack trace on the server side on a failed attempt to create a route (for another PR but should be the same for this one) StackTrace
Ok, we will open a new bug because 'oc route' doesn't validate anything on the cli side. This PR is consistent with everything else in the 'oc route' so I think it is good to go. When this is squashed and the description cleaned up, I think it is good to go. Thanks. |
oc create route
and a column for it in oc get route
oc create route
and a column for it in oc get route
oc create route
and a column for it in oc get route
The BZ that knobunc mentioned above BZ1418023 |
…wildcardpolicy to `oc get route' Adding wildcard policy to 'oc create route' Adding a column for wildcard policy in 'oc get route' Bug 1391786
2c4be4d
to
5dbe228
Compare
Evaluated for origin test up to 5dbe228 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13440/) (Base Commit: ed1d332) |
@knobunc adding some of these checks on client side could be problematic. One is that older cli clients would behave differently vis-a-vis newer cli clients + what happens when the server validation changes say for a list of choices from [foo, bar] to [foo, bar, baz] or even [one, two]? The older cli client checks would be invalid at that point or worse yet even block valid values. |
@ramr: All good points. Added your concerns to the bug. [merge] |
Evaluated for origin merge up to 5dbe228 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13514/) (Base Commit: 00fbbdd) (Image: devenv-rhel7_5838) |
@@ -112,6 +113,11 @@ func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ar | |||
return err | |||
} | |||
|
|||
wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be wildcard-policy. Please open a follow-up.
@@ -36,7 +36,7 @@ var ( | |||
imageStreamImageColumns = []string{"NAME", "DOCKER REF", "UPDATED", "IMAGENAME"} | |||
imageStreamColumns = []string{"NAME", "DOCKER REPO", "TAGS", "UPDATED"} | |||
projectColumns = []string{"NAME", "DISPLAY NAME", "STATUS"} | |||
routeColumns = []string{"NAME", "HOST/PORT", "PATH", "SERVICES", "PORT", "TERMINATION"} | |||
routeColumns = []string{"NAME", "HOST/PORT", "PATH", "SERVICES", "PORT", "TERMINATION", "WILDCARDPOLICY"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WILDCARD, column length is critical and the extra POLICY doesn't help much.
Please ensure @openshift/cli-review is included on all CLI changes to enforce consistency for our processes. |
@smarterclayton posted follow up: #12774 |
Adding wildcard policy to 'oc create route'
Adding a column for wildcard policy in 'oc get route'
Bug 1391786 Link