Skip to content

Commit

Permalink
fix: two different jobs for quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
abelanger5 committed Aug 23, 2024
1 parent 590b02d commit 15373aa
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/hatchet-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: hatchet-api
description: A Helm chart for deploying Hatchet API components on Kubernetes.
type: application
version: 0.6.0
version: 0.6.1
maintainers:
- name: Hatchet Engineering
email: [email protected]
39 changes: 38 additions & 1 deletion charts/hatchet-api/templates/setup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:
image: "{{ .Values.setupJob.image.repository }}:{{ required "Please set a value for .Values.image.tag" .Values.setupJob.image.tag }}"
imagePullPolicy: Always
# this command requires read-write access on the hatchet-config configmap
command: ["/hatchet/hatchet-admin", "k8s", "quickstart", "--namespace", "{{ .Release.Namespace }}"]
command: ["/hatchet/hatchet-admin", "k8s", "quickstart", "--namespace", "{{ .Release.Namespace }}", "--overwrite=false"]
securityContext:
capabilities:
add:
Expand All @@ -106,6 +106,43 @@ spec:
{{- end }}
envFrom:
{{ toYaml .Values.envFrom | indent 10 }}
{{- with .Values.extraContainers }}
{{ toYaml . | indent 8 }}
{{- end }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Release.Name | trunc 20 }}-{{ randAlphaNum 10 | lower }}-worker-token"
labels:
{{- include "hatchet.labels" . | nindent 4 }}
spec:
backoffLimit: 1
activeDeadlineSeconds: 300
template:
metadata:
name: {{ template "hatchet.fullname" . }}-migration
labels:
{{- include "hatchet.labels" . | nindent 8 }}
spec:
restartPolicy: Never
shareProcessNamespace: true
serviceAccountName: {{ template "hatchet.serviceAccountName" . }}
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
initContainers:
- name: check-db-connection
image: postgres:latest
command: ['sh', '-c', 'until pg_isready -d $DATABASE_URL; do echo waiting for database; sleep 2; done;']
env:
{{- range $key, $value := .Values.env }}
- name: "{{ $key }}"
value: "{{ $value }}"
{{- end }}
envFrom:
{{ toYaml .Values.envFrom | indent 10 }}
containers:
- name: setup-worker-token
image: "{{ .Values.setupJob.image.repository }}:{{ required "Please set a value for .Values.image.tag" .Values.setupJob.image.tag }}"
imagePullPolicy: Always
Expand Down
8 changes: 4 additions & 4 deletions charts/hatchet-stack/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies:
- name: hatchet-api
repository: file://../hatchet-api
version: 0.6.0
version: 0.6.1
- name: hatchet-api
repository: file://../hatchet-api
version: 0.6.0
version: 0.6.1
- name: hatchet-frontend
repository: file://../hatchet-frontend
version: 0.6.0
Expand All @@ -14,5 +14,5 @@ dependencies:
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 12.15.0
digest: sha256:9a33ce0d42d2ee3ea4d6205e51cf7f06ba2192a4250fd2739a04b85db5a3f8d9
generated: "2024-08-22T17:26:47.846473-04:00"
digest: sha256:55f10a3553260c0843121428f683b8d8f27e067c9560a27bc481e9dca7d9086e
generated: "2024-08-22T20:18:09.230502-04:00"
6 changes: 3 additions & 3 deletions charts/hatchet-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ apiVersion: v2
name: hatchet-stack
description: A Helm chart for deploying Hatchet on Kubernetes together with a PostgreSQL database and RabbitMQ.
type: application
version: 0.6.0
version: 0.6.1
maintainers:
- name: Hatchet Engineering
email: [email protected]
dependencies:
- name: "hatchet-api"
condition: api.enabled
repository: "file://../hatchet-api"
version: "^0.6.0"
version: "^0.6.1"
alias: api
- name: "hatchet-api"
condition: engine.enabled
repository: "file://../hatchet-api"
version: "^0.6.0"
version: "^0.6.1"
alias: engine
- name: "hatchet-frontend"
condition: frontend.enabled
Expand Down

0 comments on commit 15373aa

Please sign in to comment.