Skip to content

Commit d9ee9a5

Browse files
job-scheduler (#28)
2 parents 397bea5 + b3d57ab commit d9ee9a5

File tree

15 files changed

+372
-82
lines changed

15 files changed

+372
-82
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Helm chart tests
22
on:
33
pull_request:
44
paths:
5-
- 'charts/sombra/**/*'
5+
- "charts/sombra/**/*"
66

77
jobs:
88
test:
@@ -20,6 +20,8 @@ jobs:
2020
2121
- name: Set up Helm
2222
uses: azure/setup-helm@v4
23+
with:
24+
version: v3.19.0
2325
env:
2426
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2527

@@ -31,3 +33,4 @@ jobs:
3133
run: |
3234
cd charts/ ;
3335
helm unittest sombra ;
36+
helm unittest sombra/charts/job-scheduler ;

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Please see the options supported in the `values.yaml` file. These are also fully
1919

2020
## Test
2121

22-
```
23-
helm unittest -f 'charts/sombra/tests/deployment_test.yaml' charts/sombra
22+
To test these charts:
23+
24+
```console
25+
helm unittest charts/sombra
26+
helm unittest charts/sombra/charts/job-scheduler
2427
```

charts/sombra/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@
8383

8484
* Increase default memory and cpu allocation to prevent pod termination.
8585
* Relax `liveness` and `readiness` probe to prevent pod termination.
86+
87+
## 0.9.0
88+
89+
* Add support for Asynchronous Sombra Job Scheduler

charts/sombra/Chart.lock

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
dependencies:
2-
- name: llm-classifier
3-
repository: ""
4-
version: 0.2.2
5-
- name: pathfinder
6-
repository: ""
7-
version: 0.2.2
2+
- name: llm-classifier
3+
repository: ""
4+
version: 0.2.2
5+
- name: pathfinder
6+
repository: ""
7+
version: 0.2.2
8+
- name: job-scheduler
9+
repository: ""
10+
version: 0.1.0
811
digest: sha256:ade5c8e02d792909cccdb79691a8ddeb3e8bf51a10345e73cde23176f6319dc1
912
generated: "2025-07-29T14:10:12.465351-04:00"

charts/sombra/Chart.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ apiVersion: v2
22
name: sombra
33
description: A Helm chart to deploy Sombra and its dependent services in a Kubernetes cluster
44
type: application
5-
version: 0.8.0
5+
version: 0.9.0
66
maintainers:
7-
- name: Transcend
8-
email: dev@transcend.io
7+
- name: Transcend
8+
email: dev@transcend.io
99
dependencies:
10-
- name: llm-classifier
11-
condition: llm-classifier.enabled
12-
version: "0.2.2"
13-
- name: pathfinder
14-
condition: pathfinder.enabled
15-
version: "0.2.2"
10+
- name: llm-classifier
11+
condition: llm-classifier.enabled
12+
version: "0.2.2"
13+
- name: pathfinder
14+
condition: pathfinder.enabled
15+
version: "0.2.2"
16+
- name: job-scheduler
17+
condition: job-scheduler.enabled
18+
version: "0.1.0"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: sombra-job-scheduler
3+
description: A Helm chart to deploy the Sombra Job Scheduler in a Kubernetes cluster
4+
type: application
5+
version: 0.1.0
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "sombra-job-scheduler.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "sombra-job-scheduler.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "sombra-job-scheduler.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "sombra-job-scheduler.labels" -}}
37+
helm.sh/chart: {{ include "sombra-job-scheduler.chart" . }}
38+
{{ include "sombra-job-scheduler.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "sombra-job-scheduler.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "sombra-job-scheduler.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "sombra-job-scheduler.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "sombra-job-scheduler.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{{- if .Values.enabled -}}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "sombra-job-scheduler.fullname" . }}
6+
namespace: {{ .Values.namespace }}
7+
labels:
8+
{{- include "sombra-job-scheduler.labels" . | nindent 4 }}
9+
spec:
10+
replicas: {{ .Values.replicaCount }}
11+
selector:
12+
matchLabels:
13+
{{- include "sombra-job-scheduler.selectorLabels" . | nindent 6 }}
14+
template:
15+
metadata:
16+
{{- with .Values.podAnnotations }}
17+
annotations:
18+
{{- toYaml . | nindent 8 }}
19+
{{- end }}
20+
labels:
21+
{{- include "sombra-job-scheduler.labels" . | nindent 8 }}
22+
{{- with .Values.podLabels }}
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
25+
spec:
26+
{{- with .Values.global.imagePullSecrets }}
27+
imagePullSecrets:
28+
{{- toYaml . | nindent 8 }}
29+
{{- end }}
30+
{{- with .Values.podSecurityContext }}
31+
securityContext:
32+
{{- toYaml . | nindent 8 }}
33+
{{- end }}
34+
containers:
35+
- name: {{ .Chart.Name }}
36+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
37+
imagePullPolicy: {{ .Values.image.pullPolicy }}
38+
{{- with .Values.containerSecurityContext }}
39+
securityContext:
40+
{{- toYaml . | nindent 12 }}
41+
{{- end }}
42+
{{- if .Values.envFrom }}
43+
envFrom:
44+
{{- toYaml .Values.envFrom | nindent 12 }}
45+
{{- end }}
46+
env:
47+
{{- range $name, $value := .Values.envs }}
48+
- name: {{ $value.name }}
49+
value: {{ $value.value | quote }}
50+
{{- end }}
51+
livenessProbe:
52+
{{- toYaml .Values.livenessProbe | nindent 12 }}
53+
startupProbe:
54+
{{- toYaml .Values.startupProbe | nindent 12 }}
55+
resources:
56+
{{- toYaml .Values.resources | nindent 12 }}
57+
{{- with .Values.volumeMounts }}
58+
volumeMounts:
59+
{{- toYaml . | nindent 12 }}
60+
{{- end }}
61+
{{- with .Values.nodeSelector }}
62+
nodeSelector:
63+
{{- toYaml . | nindent 8 }}
64+
{{- end }}
65+
{{- with .Values.affinity }}
66+
affinity:
67+
{{- toYaml . | nindent 8 }}
68+
{{- end }}
69+
{{- with .Values.tolerations }}
70+
tolerations:
71+
{{- toYaml . | nindent 8 }}
72+
{{- end }}
73+
{{- with .Values.volumes }}
74+
volumes:
75+
{{- toYaml . | nindent 8 }}
76+
{{- end }}
77+
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.enabled -}}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: {{ include "sombra-job-scheduler.fullname" . }}
6+
namespace: {{ .Values.namespace }}
7+
labels:
8+
{{- include "sombra-job-scheduler.labels" . | nindent 4 }}
9+
spec:
10+
type: {{ .Values.service.type }}
11+
selector:
12+
{{- include "sombra-job-scheduler.selectorLabels" . | nindent 4 }}
13+
{{- end }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Docs: https://github.com/helm-unittest/helm-unittest/blob/main/DOCUMENT.md
2+
suite: Deployment
3+
templates:
4+
- deployment.yaml
5+
release:
6+
name: testing
7+
tests:
8+
- it: should render job-scheduler with readinessProbe
9+
set:
10+
enabled: true
11+
global:
12+
imagePullSecrets:
13+
- name: transcend-registry
14+
asserts:
15+
- isKind:
16+
of: Deployment
17+
template: deployment.yaml
18+
- equal:
19+
path: spec.template.spec.containers[0].livenessProbe
20+
value:
21+
exec:
22+
command:
23+
- /bin/sh
24+
- -c
25+
- test -f /tmp/sombra-job-scheduler-alive && find /tmp/sombra-job-scheduler-alive -mmin +1 -print -quit 2>/dev/null | grep -q .
26+
timeoutSeconds: 30
27+
periodSeconds: 10
28+
successThreshold: 1
29+
failureThreshold: 10
30+
- contains:
31+
path: spec.template.spec.containers[0].env
32+
content:
33+
name: SOMBRA_ID
34+
value: "some-id"
35+
- contains:
36+
path: spec.template.spec.containers[0].env
37+
content:
38+
name: SOMBRA_JOB_QUEUE_URL
39+
value: "https://sombra-job-queue.transcend.io/"

0 commit comments

Comments
 (0)