Bug 1282822 - [DOCS] Document how to create routes for specific labels/namespaces/projects
[DOCS] Document how to create routes for specific labels/namespaces/projects
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: brice
zhaozhanqi
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-17 09:25 EST by Eduardo Minguez
Modified: 2017-02-08 20:18 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-08 20:18:57 EST
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
Red Hat Knowledge Base (Solution) 2867371 None None None 2017-01-17 02:13 EST

  None (edit)
Description Eduardo Minguez 2015-11-17 09:25:58 EST
Document URL: https://docs.openshift.com/enterprise/3.0/install_config/install/deploy_router.html

Section Number and Name: ?

Describe the issue: In OSE 3.0.2 you can expose routes depending on a few things (https://docs.openshift.com/enterprise/3.0/whats_new/ose_3_0_release_notes.html#ose-3-0-2-0):

* Pass --namespace to the router command to select routes in a single namespace.

* Pass --labels=<selector> or --fields=<selector> to select only routes with the provided labels or fields.

* Pass --project-labels=* to show routes in all labels that the router’s service account is granted access to, --project-labels=<selector> to filter that list by label, or --namespace-labels=<selector> to filter all labels when the router service account has that permission.

But this doesn't work when creating the router using "oadm router" command.

Suggestions for improvement: Document how to pass those parameters

Additional information: 

I've been able to make it work, but modifying the DC in order to set env. variables (as seen here https://github.com/openshift/origin/blob/b7de777c90fd892cd746c905c17d92710eae3de8/pkg/cmd/infra/router/router.go#L45), but the idea will be to create the router with the parameters specifically.

Also, I've need to add the cluster-reader role to the system:openshift-router account because otherwise, it complains:

E1117 08:41:32.006074       1 controller.go:61] unable to find namespaces for router: User "system:openshift-router" cannot list all namespaces in the cluster
Comment 1 Eduardo Minguez 2016-10-19 06:30:41 EDT
OpenShift 3.3 freshly installed and even if in the documentation says to add cluster-reader permissions to the service account[1] system:serviceaccount:default:router, it keeps failing with

unable to find namespaces for router: User "system:openshift-router" cannot list all namespaces in the cluster

So you need to add the cluster-reader permissions to the system:openshift-router user too...

Can this be prioritized or clarified please?

[1] https://docs.openshift.com/container-platform/3.3/install_config/router/index.html#creating-the-router-service-account
Comment 2 brice 2017-02-02 01:14:30 EST
Eduardo,

I've created a PR for this BZ:

https://github.com/openshift/openshift-docs/pull/3637

I've chatted to Ben Bennett from the networking team about how the options you're asking about are out of date, and we thought it would be good to highlight router sharding and the environment variable list as an alternative, as some of the options you're asking about above don't exist anymore.

Also, I'm not sure why you can't get the right service account stuff going. It seems to work fine for me. Is there something I'm missing?
Comment 3 Eduardo Minguez 2017-02-02 04:04:04 EST
Things have changed a lot since November 2015, so IDK if this bz is still needed.
Comment 4 openshift-github-bot 2017-02-02 22:57:25 EST
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/68da5845bf9b5d04f80ab477ae2cd5e1f59f037b
Merge pull request #3637 from bfallonf/route_1282822

Bug 1282822 Arranged section creating routes and the post-creation options
Comment 5 brice 2017-02-02 22:59:09 EST
Eduardo,

I'll agree. I've merged the BZ, as I think the PR added to/arranged the topics to be more clear on the options.

I'll move this BZ to release_pending.

Please let me know if you have any other thoughts.

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