Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Add argo specifications #173

Merged
merged 17 commits into from
Nov 15, 2021
1 change: 1 addition & 0 deletions .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ chart-repos:
- jupyterhub=https://jupyterhub.github.io/helm-chart/
- bitnami=https://charts.bitnami.com/bitnami
- datadoghq=https://helm.datadoghq.com
- argo=https://argoproj.github.io/argo-helm
target-branch: main
debug: true
remote: origin
Expand Down
7 changes: 5 additions & 2 deletions charts/illumidesk/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 10.1.3
digest: sha256:e4bd5d2770c6a02dba48a0694412284caa2b599da4af2d27a432464229105f83
generated: "2021-09-23T22:33:40.589230523Z"
- name: argo-events
repository: https://argoproj.github.io/argo-helm
version: 1.3.1
digest: sha256:8807988ef99c124ec3009174a07217fb9cbac8b05c3c6d9b144c1c67d8cd6ad3
generated: "2021-10-26T14:42:59.771687+05:30"
5 changes: 4 additions & 1 deletion charts/illumidesk/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: illumidesk
version: 5.9.7
version: 5.10.0
appVersion: 1.2.0
description: An extention of the JupyterHub Chart with additional IllumiDesk resources
icon: https://configs.illumidesk.com/images/illumidesk-80.png
Expand All @@ -15,6 +15,9 @@ dependencies:
version: "10.1.3"
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: argo-events
version: "1.3.1"
repository: https://argoproj.github.io/argo-helm
maintainers:
- name: IllumiDesk Team
email: [email protected]
40 changes: 40 additions & 0 deletions charts/illumidesk/templates/argo_amqp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
kind: Service
metadata:
labels:
component: argo-rabbitmq
name: argo-rabbitmq-service
spec:
ports:
- name: main
port: 5672
- name: management
port: 15672
selector:
app: argo-rabbitmq-task-queue
component: argo-rabbitmq

---
apiVersion: v1
kind: ReplicationController
metadata:
labels:
component: argo-rabbitmq
name: argo-rabbitmq-controller
spec:
replicas: 1
template:
metadata:
labels:
app: argo-rabbitmq-task-queue
component: argo-rabbitmq
spec:
containers:
- image: rabbitmq:3.8.22-management-alpine
name: argo-rabbitmq
ports:
- containerPort: 5672
- containerPort: 15672
resources:
limits:
cpu: 100m
6 changes: 6 additions & 0 deletions charts/illumidesk/templates/argo_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-config
data:
PARALLEL_AUTOGRADING: "1"
35 changes: 35 additions & 0 deletions charts/illumidesk/templates/argo_event_source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: autograde-event-source
spec:
amqp:
autograde_events:
# amqp server url
url: amqp://argo-rabbitmq-service:5672
# jsonBody specifies that all event body payload coming from this
# source will be JSON
jsonBody: true
# name of the exchange.
exchangeName: {{ .Release.Namespace }}
# exchange type. more info at https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges
exchangeType: topic
# routing key
routingKey: autograde_events
queueDeclare:
name: autograde_events
durable: false
autoDelete: false
exclusive: true
noWait: false
# optional backoff time for connection retries.
# if not provided, default connection backoff time will be used.
connectionBackoff:
# duration in nanoseconds, or strings like "1s", "1m". following value is 10 seconds
duration: 10s
# how many backoffs
steps: 5
# factor to increase on each step.
# setting factor > 1 makes backoff exponential.
factor: 2
jitter: 0.2
7 changes: 7 additions & 0 deletions charts/illumidesk/templates/argo_eventbus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
name: default
spec:
nats:
native: {}
31 changes: 31 additions & 0 deletions charts/illumidesk/templates/argo_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: operate-workflow-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: operate-workflow-role
rules:
- apiGroups:
- argoproj.io
verbs:
- "*"
resources:
- workflows
- workflowtemplates
- cronworkflows
- clusterworkflowtemplates
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: operate-workflow-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: operate-workflow-role
subjects:
- kind: ServiceAccount
name: operate-workflow-sa
66 changes: 66 additions & 0 deletions charts/illumidesk/templates/argo_sensor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: autograde-sensor
spec:
template:
serviceAccountName: operate-workflow-sa
dependencies:
- name: autograding-event-dep
eventSourceName: autograde-event-source
eventName: autograde_events
triggers:
- template:
name: autograde-workflow-trigger
k8s:
group: argoproj.io
version: v1alpha1
resource: workflows
operation: create
source:
resource:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: autograde-workflow-
jgwerner marked this conversation as resolved.
Show resolved Hide resolved
spec:
synchronization:
semaphore:
configMapKeyRef:
name: argo-config
key: PARALLEL_AUTOGRADING
entrypoint: autograde-worker
securityContext:
runAsNonRoot: true
runAsUser: 10001
volumes:
- name: shared-pv-{{ .Release.Namespace }}
persistentVolumeClaim:
claimName: shared-pvc-{{ .Release.Namespace }}
- name: grader-pv-{{ .Release.Namespace }}
persistentVolumeClaim:
claimName: grader-pvc-{{ .Release.Namespace }}
templates:
- name: autograde-worker
container:
image: illumidesk/grader-notebook:latest
imagePullPolicy: Always
command: [async_nbgrader]
args: ["process_message", "message"]
env:
jgwerner marked this conversation as resolved.
Show resolved Hide resolved
- name: JUPYTERHUB_API_URL
valueFrom:
configMapKeyRef:
name: hub-illumidesk-cm
key: JUPYTERHUB_API_URL
volumeMounts:
- name: grader-pv-{{ .Release.Namespace }}
mountPath: /home
subPath: illumidesk-courses/{{ .Release.Namespace }}/home
- name: shared-pv-{{ .Release.Namespace }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be removed

mountPath: /srv/nbgrader/exchange
subPath: {{ .Release.Namespace }}/exchange
parameters:
- src:
dependencyName: autograding-event-dep
dest: spec.templates.0.container.args.1
Binary file added docs/illumidesk-5.10.0.tgz
Binary file not shown.
Loading