Bug 1282822 - [DOCS] Document how to create routes for specific labels/namespaces/projects
Summary: [DOCS] Document how to create routes for specific labels/namespaces/projects
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: brice
QA Contact: zhaozhanqi
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-17 14:25 UTC by Eduardo Minguez
Modified: 2021-08-30 13:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-09 01:18:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1413848 0 unspecified CLOSED Router deployed by ansible installer does not use openshift-router.kubeconfig 2021-08-30 12:12:10 UTC
Red Hat Knowledge Base (Solution) 2867371 0 None None None 2017-01-17 07:13:42 UTC

Internal Links: 1413848

Description Eduardo Minguez 2015-11-17 14:25:58 UTC
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 10:30:41 UTC
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 06:14:30 UTC
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 09:04:04 UTC
Things have changed a lot since November 2015, so IDK if this bz is still needed.

Comment 4 openshift-github-bot 2017-02-03 03:57:25 UTC
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-03 03:59:09 UTC
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.