BCDevOps / OpenShift4-Migration

Scripts and info for Ministry teams migration from OpenShift 3.11 to 4.x
Apache License 2.0
3 stars 0 forks source link

Is there a way to easily add team members to all OCP4 namspaces? #7

Closed jleach closed 3 years ago

jleach commented 4 years ago

TL;DR

RBAC. Use a YAML manifest with RBAC rules and keep it as part of your source control; keep in mind that the IDs added to your RBAC should be business contact details.

Using RBAC for Access Control

You can create a manifest file in yaml that you can apply to each namespace to quickly grant and manage access to your namespaces.

// TODO:(jl) Add sample RBAC manifest here.

matthieu-foucault commented 4 years ago

https://github.com/bcgov/cas-pipeline/pull/32 (work in progress) might be of interest. TL;DR: One can do

./lib/oc_add_gh_team_to_nsp.sh --token <your_gh_token> -t cas-owners -pp abc123,qwe456,321rty -r admin

To give admin access to everyone in the bcgov/cas-owners team, in all of the namespaces they want (-pp is short for --project-prefixes)