No description
  • Python 74.8%
  • Go 19.3%
  • Dockerfile 4.2%
  • Shell 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michał Jastrzębski 0e754d3c4a
Merge pull request #8 from github/update_controllers
first pass at watching all namespaces
2019-10-07 11:57:17 -07:00
argo-validation-controller Readmes 2019-08-01 14:00:26 -07:00
examples Readmes 2019-08-01 14:00:26 -07:00
garbage-collection update deployment, docker and script 2019-05-14 15:29:39 -07:00
hyperparam-controller first pass at watching all namespaces 2019-09-03 10:54:15 -04:00
tensorboard-spawner Tensorboard spawner 2019-07-19 14:41:52 -07:00
.gitignore certs working 2019-05-31 11:36:29 -07:00
crds.yaml initial version of hyperparam tuning controller 2019-04-26 14:13:07 -07:00
deployment.yaml changes 2019-06-04 15:21:11 -07:00
Dockerfile WIP: initial prototype 2019-05-23 14:59:31 -07:00
LICENSE Initial commit 2019-04-26 08:39:34 -07:00
README.md Update README.md 2019-08-01 15:26:03 -07:00

Argo-ML

Controllers, wrappers and miscellaneous utils to make it easier for Argo to be used in ML scenarios. There are 3 major architectures in the repo.

Controller

Controller, also known as operator, manages Kubernetes Custom Resources, or CRs. Our controllers, written in Python, are built around main loop through Kubernetes events. Event will be emitted every time resource is added, updated or deleted. Kubernetes Python client allows to watch for these events, therefore providing great way to write management code for regular or custom resources.

Example loop will look like that:

group = "mycustomapi"
version = "v1"
plural = "mycustomresource"

for event in watch.stream(custom_api.list_namespaced_custom_object, group, version, namespace, plural):
    if event['type'] == 'ADDED':
        do_something_when_resource_is_created(event['object'])

Admission Controller

Although it's also called controller, it's not following pattern above. Admission Controllers are API endpoints that are triggered when user (or system) attempts to create particular resource. There are two types of admission controllers:

  • Validating admission controller is great place to include resource validation. Whenever resource is created, Kube API will call this endpoint and expect either validation success message or error, throwing it back to user
  • Mutating admission controller is allows us to add custom logic to modify any resource on creation. For example, we could add common secret to every Pod

APIs

Just regular REST APIs

Components

Argo hyperparam workflow

This is controller that takes HyperparamWorkflow custom resource - resource similar to original Argo Workflow, adds new fields that defines hyperparameter search space. Controller then generates Workflow for with list of all hyperparam combinations as parameters.

Argo validation controller

Argo workflows have specific syntax. You can validate it if you create Workflow with argo cli tool, but that won't be the case for our custom wrapper resources. Argo validation controller allows us to validate workflow syntax in these.

Tensorboard spawner

Small API that takes workflow name as input, lists artifacts names tensorboard and spawns Tensorboard instance for them.

Garbage collector

Small utility tool to delete old pods produced by workflows.