Skip to content
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

Create gatekeeper policy to validate pods for classes running in rhods-notebooks namespace #638

Open
IsaiahStapleton opened this issue Jul 3, 2024 · 3 comments
Assignees
Labels
ope This issue pertains to ope projects openshift This issue pertains to NERC OpenShift

Comments

@IsaiahStapleton
Copy link

We need to create a gatekeeper policy to validate pods (such as rejecting pods being created that don’t conform to what students should be running: class image, xsmall size, no gpu). We will need to create this policy per class, so that students are only running what they are supposed to for their class.

This issue depends on: #637 because gatekeeper needs a way to differentiate which users belong to which class in rhods-notebooks namespace.

@IsaiahStapleton IsaiahStapleton self-assigned this Jul 3, 2024
@DanNiESh DanNiESh added ope This issue pertains to ope projects openshift This issue pertains to NERC OpenShift labels Jul 30, 2024
@IsaiahStapleton
Copy link
Author

I have created the gatekeeper policy in order to enforce the pods, which works with my webhook to add class labels. We can create an individual constraint, based on the constrainttemplate, for each class in order to enforce users of a specific class to use certain images and resource sizes.

This solution has been tested and now we just need to find a time to deploy it into production.

@msdisme mentioned it might be best to do it at the start of next semester rather than now so we don't cause problems with anyone's environments as the semester is coming to a close.

@hpdempsey
Copy link

Are people still using the environment for classes after the last day of classes (which is today)?

@IsaiahStapleton
Copy link
Author

We decided we will be deploying this solution the second week of January before the classes start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ope This issue pertains to ope projects openshift This issue pertains to NERC OpenShift
Projects
None yet
Development

No branches or pull requests

4 participants