From d177103e764eb1c228ef247ed242ea2f4546d430 Mon Sep 17 00:00:00 2001 From: Tray Keller Date: Wed, 7 Sep 2022 04:43:12 -0400 Subject: [PATCH] documentation for project admin created (#2319) Update docs/content/cluster-scope/add_user_to_project_admin.md Co-authored-by: Gregory Pereira Update docs/content/cluster-scope/add_user_to_project_admin.md Co-authored-by: Gregory Pereira Co-authored-by: Gregory Pereira --- .../add_user_to_project_admin.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/content/cluster-scope/add_user_to_project_admin.md diff --git a/docs/content/cluster-scope/add_user_to_project_admin.md b/docs/content/cluster-scope/add_user_to_project_admin.md new file mode 100644 index 000000000..cfc53380e --- /dev/null +++ b/docs/content/cluster-scope/add_user_to_project_admin.md @@ -0,0 +1,26 @@ +# Giving a user project role access in the smaug cluster + +## Prerequisite +A namespace for the project should already be created before starting. + +## Create an OCP group +1. The first step for giving you project role access should be to create an OCP group. +After creating a OCP group you will add your github username to the group. ++ Documentation on creating an OCP group can be found [here](https://www.operate-first.cloud/apps/content/cluster-scope/create_ocp_group.html). ++ The directory that contains all of the OCP groups can be found [here](https://github.com/operate-first/apps/tree/master/cluster-scope/base/user.openshift.io/groups) +2. After you create the group make sure to add your github username to the group by editing the `group.yaml` file. + +## Give the group the appropriate rbac(roles and and rolebindings) +After creating a OCP group you must give the group the appropriate roles and rolebindings. + +1. Create a directory with the name of your OCP group [here](https://github.com/operate-first/apps/tree/master/cluster-scope/components/project-admin-rolebindings) +copy one of the other directories in that folder and use it as a template. + +2. Once the folder is copied, edit the `rbac.yaml` file and change `spec.metadata.name`. + +3. Change `spec.subjects.name` to the OCP group created in the previous instructions. + +## Add the OCP group to your project/namespace +You have now created the OCP group. You must now add the OCP group to your namespace +1. Open the following file: `cluster-scope/base/core/namespaces//kustomization.yaml` +2. Add the path of the component that you created in `/apps/cluster-scope/components/project-admin-rolebindings` to the `components` section in the overlay `kustomization.yaml` file corresponding to the cluster you are deploying to. You can see examples of this [here](https://github.com/operate-first/apps/tree/master/cluster-scope/components/project-admin-rolebindings).