From fb096dce984a085ae4db5af1b220bbe955f7615a Mon Sep 17 00:00:00 2001 From: Meera Malhotra Date: Thu, 22 Jan 2026 15:34:31 -0500 Subject: [PATCH] updates to groupsync for multiple classes --- README.md | 7 ++++--- cronjobs/group-sync/clusterrolebinding.yaml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a2c1875..20b248b 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,14 @@ This cronjob runs once every hours at the top of the hour, adding all users with This offers us a way to keep class users added to course namespaces via ColdFront in sync with the in cluster OCP course group. To run this cronjob: 1. Ensure you are logged in to your OpenShift account via the CLI and you have access to rhods-notebooks namespace. -2. Switch to your course namespace: +2. Ensure that if multiple courses are running the groupsync cronjob, that the clusterrolebinding name in cronjobs/group-sync/clusterrolebinding.yaml is changed, as to not overwrite permissions for the cronjobs. +3. Switch to your course namespace: ``` oc project ``` -3. Update the `GROUP_NAME` and `NAMESPACE` env variables in cronjobs/group-sync/cronjob.yaml and update `namespace` variable in kustomization.yaml -4. From cronjobs/group-sync/ directory run: +4. Update the `GROUP_NAME` and `NAMESPACE` env variables in cronjobs/group-sync/cronjob.yaml and update `namespace` variable in kustomization.yaml +5. From cronjobs/group-sync/ directory run: ``` oc apply -k . --as system:admin ``` diff --git a/cronjobs/group-sync/clusterrolebinding.yaml b/cronjobs/group-sync/clusterrolebinding.yaml index b35f2ae..67a6441 100644 --- a/cronjobs/group-sync/clusterrolebinding.yaml +++ b/cronjobs/group-sync/clusterrolebinding.yaml @@ -1,6 +1,7 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: + # CHANGE THIS VALUE TO BE RELEVANT TO CLASS NAME (if multiple classes are running group sync) name: group-sync subjects: - kind: ServiceAccount