eduNEXT / tutor-contrib-codejail

Tutor plugin that enables execution of untrusted code in secure sandboxes using an external service based on the codejail library.
GNU Affero General Public License v3.0
3 stars 13 forks source link

Add kubernetes support #26

Closed MoisesGSalas closed 2 years ago

MoisesGSalas commented 2 years ago

Description

Add the patches needed to deploy on Kubernetes.

To enforce the AppArmor profile on Kubernetes we must load the profile onto the nodes. On a local installation we use the init task to load the profile on the host. The strategy in Kubernetes is to use a DaemonSet and use a dummy job for the init task.

This also includes three additional settings for choosing whether you want to run codejail in secure mode or skip the init job:

The directory containing the init task was renamed to 'codejail-apparmor' to make it conformant with Kubernetes naming.