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: hello@illumidesk.com
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"
209 changes: 209 additions & 0 deletions charts/illumidesk/templates/argo_event_resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-events-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-events-role
rules:
- apiGroups:
- argoproj.io
resources:
- sensors
- sensors/finalizers
- sensors/status
- eventsources
- eventsources/finalizers
- eventsources/status
- eventbus
- eventbus/finalizers
- eventbus/status
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
- pods/exec
- configmaps
- secrets
- services
- persistentvolumeclaims
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-events-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-events-role
subjects:
- kind: ServiceAccount
name: argo-events-sa
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: eventbus-controller
spec:
replicas: 1
selector:
matchLabels:
app: eventbus-controller
template:
metadata:
labels:
app: eventbus-controller
spec:
containers:
- args:
- eventbus-controller
- --namespaced
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NATS_STREAMING_IMAGE
value: nats-streaming:0.22.1
- name: NATS_METRICS_EXPORTER_IMAGE
value: natsio/prometheus-nats-exporter:0.8.0
image: quay.io/argoproj/argo-events:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
name: eventbus-controller
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
securityContext:
runAsNonRoot: true
runAsUser: 9731
serviceAccountName: argo-events-sa
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: eventsource-controller
spec:
replicas: 1
selector:
matchLabels:
app: eventsource-controller
template:
metadata:
labels:
app: eventsource-controller
spec:
containers:
- args:
- eventsource-controller
- --namespaced
env:
- name: EVENTSOURCE_IMAGE
value: quay.io/argoproj/argo-events:latest
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argo-events:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
name: eventsource-controller
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
securityContext:
runAsNonRoot: true
runAsUser: 9731
serviceAccountName: argo-events-sa
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sensor-controller
spec:
replicas: 1
selector:
matchLabels:
app: sensor-controller
template:
metadata:
labels:
app: sensor-controller
spec:
containers:
- args:
- sensor-controller
- --namespaced
env:
- name: SENSOR_IMAGE
value: quay.io/argoproj/argo-events:latest
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argo-events:latest
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
name: sensor-controller
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 3
periodSeconds: 3
securityContext:
runAsNonRoot: true
runAsUser: 9731
serviceAccountName: argo-events-sa
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
Loading