Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllNamespaces ¶
AllNamespaces lists all the namespaces in the system.
func CreateNameSpace ¶
CreateNameSpace creates a new namespace which will contain all the dependencies of a Course.
func DeleteNameSpace ¶
DeleteNameSpace deletes a namespace that represents a specific Course. Warning: This method will delete all the Course's objects and its dependencies from the system.
Types ¶
type Container ¶
Container contains the Base Docker Image and the Commands. These describe the task that has to be executed in the Container of a K8s Job object.
type K8s ¶
type K8s struct {
// contains filtered or unexported fields
}
K8s is an implementation of the Kube interface using K8s.
func (*K8s) KRun ¶
func (k *K8s) KRun(ctx context.Context, task *Container, id string, courseName string, secretAg string) (string, error)
KRun implements the Kube Interface. This method creates a K8s Job and Secret Object. The Job object takes the task from the Autograder, and run it in a Docker Container. The Job Object will be created in the spesified NameSpace by the Parameter "courseName". Tasks can run in parallel. The method will not return before the Job is on completed status.
type KRunner ¶
type KRunner interface { // Run should synchronously execute the described Container and return the output. KRun(context.Context, *Container, string, string, string) (string, error) }
KRunner contains methods for configuring a K8s Job Object to run the user-provided code in isolation.