nerc-project / operations

Issues related to the operation of the NERC OpenShift environment
2 stars 0 forks source link

test-2 cluster needs github teams for access (kruize gpu trigger) #645

Closed schwesig closed 4 months ago

schwesig commented 4 months ago

MUST, urgent (kruize gpu project)

SHOULD (maybe new issue if not decided in this sprint)

/CC @larsks @computate @schwesig @tssala23 @hpdempsey


Right now, we don't have dedicated team(s) for the test-2 cluster. https://console-openshift-console.apps.nerc-ocp-test-2.nerc.mghpcc.org/

The current usecase (kruize GPU), and most likely future projects, will need rights, but separated from the infra and and other clusters. Therefore we need new teams for access.

Most urgent right now: to get this current project on board, with admin rights. Naming idea:

  1. nerc-test-2-admins

for future teams I guess

  1. nerc-test-2-logs-metrics
  2. nerc-test-2-people

Next steps, focus on admins first, to run the kruize GPU project as quick as possible:

help for https://github.com/nerc-project/operations/issues/624

tssala23 commented 4 months ago

What would be the exact roles assigned to the new team? Or maybe a better question is how would they differ from the roles applied to the nerc-ops team?

- ../../base/rbac.authorization.k8s.io/clusterrolebindings/nerc-ops
- ../../base/rbac.authorization.k8s.io/clusterroles/nerc-ops
- ../../base/rbac.authorization.k8s.io/clusterroles/nerc-ops-pod-exec
- ../../base/rbac.authorization.k8s.io/clusterroles/nerc-ops-portforward
- ../../base/rbac.authorization.k8s.io/clusterroles/nerc-ops-secrets-reader
- ../../base/rbac.authorization.k8s.io/clusterroles/nerc-ops-sudoer
- ../../base/rbac.authorization.k8s.io/clusterroles/nerc-ops-monitoring

/CC @larsks

shekhar316 commented 4 months ago

Hi @schwesig ,

In addition to @dinogun, @rebeccaSimmonds19, and @shekhar316, please grant admin access to the following three users also:

schwesig commented 4 months ago

@tssala23 @larsks

What would be the exact roles assigned to the new team? Or maybe a better question is how would they differ from the roles applied to the nerc-ops team?

what information do you need to decide?

larsks commented 4 months ago

I have created the team kruize-admins and invited everyone listed in this issue.

larsks commented 4 months ago

@tssala23 you will need to create a new ClusterRoleBinding that binds the kruize-admins group to the nerc-ops ClusterRole. That is:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: kruize-admins
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: nerc-ops
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: Group
  name: kruize-admins

You will also need to update the cluster OAuth resource to allow members of that team to log in:

apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - github:
      teams:
      - ocp-on-nerc/nerc-ops
      - ocp-on-nerc/kruize-admins
tssala23 commented 4 months ago

@larsks here is the PR for those changes. I created the ClusterRoleBinding inside the rbac dir in base, and added the team to the oauth by modifying the existing path in the overlay kustomization file.