Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions roles/openshift_hosted/tasks/router/router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
resource_name: hostnetwork
with_items: "{{ openshift_hosted_routers }}"

- name: Set additional permissions for router service account
oc_adm_policy_user:
user: "system:serviceaccount:{{ item.namespace }}:{{ item.serviceaccount }}"
namespace: "{{ item.namespace }}"
resource_kind: cluster-role
resource_name: cluster-reader
when: item.namespace == 'default'
Copy link
Member Author

@mtnbikenc mtnbikenc Mar 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I'm not sure about is whether this needs to be run for all shards, or only on the 'default' namespace.

Copy link
Contributor

@kwoodson kwoodson Mar 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtnbikenc, good question here. How we run it today is with the same service account and in the same namespace so a single call would probably suffice. The loop would get both use cases where someone wants to run with a different service account.

with_items: "{{ openshift_hosted_routers }}"

- name: Create OpenShift router
oc_adm_router:
name: "{{ item.name }}"
Expand Down