-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update internal-oauth-proxy-image #8
Conversation
This will enforce all users using |
@DanNiESh That is correct it will enforce all users using rhods-notebooks to select the OPE image and restrict the container size. It was my thought that rhods-notebooks was being used exclusively for the class and researchers and other persons use their own project namespace within the data science projects tab. Is that incorrect? Are there other people using the rhods-notebooks namespace? |
@DanNiESh Oh wait... I did not think about the fact that not all classes use the same image. We will need to come up with a way to differentiate between classes in the namespace. Are we using that mutating webhook that Dylan made to assign a label to the pods? Because then I could have separate policies for the classes that only selects the pods with the class label. |
We created groups in rhods-notebooks. For example, for last semester, there were 3 groups, ece440, cs210 and cs506. We used it to differentiate class students from other users. |
@DanNiESh Okay perfect. Then I can create the constraint template: validate-ope-pods-constrainttemplate.yaml. And then I can create individual constraints that can enforce each classes image and resources with respect to the pods with the class label in rhods-notebooks. I will close this commit for now until these changes are reworked. |
@DanNiESh Am I missing anything else? |
Oh, can you also add a label to prevent students from GPU claiming? |
@DanNiESh The reason I didn't include that is because I needed to see the yaml of a created pod with a claimed GPU, and so I tried to create a pod claiming 1 GPU but I kept getting an error every time so I was never able to create a pod claiming a GPU to test. When inspecting the logs the error is: /bin/bash: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/x86_64-linux-gnu/libtinfo.so.6). So in order to include the prevention of GPU claiming I would need to get a pod running with a claimed GPU in the ope testing namespace. Do you know how I could do this? |
discussions in slack: Hi! Does anyone know why Comment on #8 Add policies for enforcing OPE Pods & Update internal-oauth-proxy-image larsks @Danni Shi Danni Shi larsks Danni Shi larsks Isaiah Stapleton image.png Danni Shi larsks larsks Isaiah Stapleton Isaiah Stapleton Isaiah Stapleton Danni Shi |
@IsaiahStapleton based on the slack conversation what are the next steps for this? |
@joachimweyl I was able to claim a GPU and create a policy that denies pods with GPUs being created. But after doing so I quickly realized that we need a way to differentiate between users of different classes in the rhods-notebooks namespace. This is because not all classes are going to have the same image or resource requirements. Which is where this issue came from: nerc-project/operations#637. After finishing that scripts for that issue I realized that gatekeeper intercepts pods as they are being created and the script I wrote assigns labels AFTER the pod is being created. So using gatekeeper here will not work unless we have a way to assign the label DURING pod creation. So the solution is either:
I am going to try method 1 because using gatekeeper is the preferred method since it provides feedback to the user about why their pod creation is denied, vs the script that just deletes their pod if it doesn't have the right values. I am going to try this today and based on my results I will update all of the issues and this PR. |
This adds this policy to the ope-rhods-testing namespace and removes name match so that it applies to all pods in the namespace
I removed the commit for the policy to enforce ALL ope pods in the namespace (based on my previous message). This PR will now just add the gatekeeper policy to make all pods in rhods-notebooks and ope-testing namespace pull from the internal oauth container rather than the external one. |
This adds the internal-oauth-proxy-image policy to the ope-rhods-testing namespace and removes the name match so that it applies to all pods in the namespace