Skip to content

Commit 93250ef

Browse files
committed
feat: better quickstart
1 parent d211965 commit 93250ef

File tree

10 files changed

+174
-98
lines changed

10 files changed

+174
-98
lines changed

charts/hatchet-api/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: hatchet-api
33
description: A Helm chart for deploying Hatchet API components on Kubernetes.
44
type: application
5-
version: 0.5.0
5+
version: 0.6.0
66
maintainers:
77
- name: Hatchet Engineering
88

charts/hatchet-api/templates/deployment.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ spec:
5555
value: "{{ $value }}"
5656
{{- end }}
5757
envFrom:
58-
{{ toYaml .Values.envFrom | indent 10 }}
58+
{{ toYaml .Values.deploymentEnvFrom | nindent 10 }}
59+
{{- if .Values.envFrom }}
60+
{{ toYaml .Values.envFrom | nindent 10 }}
61+
{{- end }}
5962
ports:
6063
- containerPort: {{ .Values.service.internalPort }}
6164
name: {{ template "hatchet.name" . }}

charts/hatchet-api/templates/pre-deploy-hook.yaml

-78
This file was deleted.
+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{{- if .Values.setupJob.enabled }}
2+
# create a role and rolebinding to write to the configmap
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: Role
5+
metadata:
6+
name: hatchet-config-writer
7+
labels:
8+
{{- include "hatchet.labels" . | nindent 4 }}
9+
rules:
10+
- apiGroups: [""]
11+
resources: ["configmaps", "secrets"]
12+
verbs: ["get", "create", "update", "patch", "delete"]
13+
---
14+
apiVersion: rbac.authorization.k8s.io/v1
15+
kind: RoleBinding
16+
metadata:
17+
name: hatchet-config-writer
18+
labels:
19+
{{- include "hatchet.labels" . | nindent 4 }}
20+
roleRef:
21+
apiGroup: rbac.authorization.k8s.io
22+
kind: Role
23+
name: hatchet-config-writer
24+
subjects:
25+
- kind: ServiceAccount
26+
name: {{ template "hatchet.serviceAccountName" . }}
27+
namespace: {{ .Release.Namespace }}
28+
---
29+
apiVersion: batch/v1
30+
kind: Job
31+
metadata:
32+
name: "{{ .Release.Name | trunc 20 }}-{{ randAlphaNum 10 | lower }}"
33+
labels:
34+
{{- include "hatchet.labels" . | nindent 4 }}
35+
spec:
36+
backoffLimit: 1
37+
activeDeadlineSeconds: 300
38+
template:
39+
metadata:
40+
name: {{ template "hatchet.fullname" . }}-migration
41+
labels:
42+
{{- include "hatchet.labels" . | nindent 8 }}
43+
spec:
44+
restartPolicy: Never
45+
shareProcessNamespace: true
46+
serviceAccountName: {{ template "hatchet.serviceAccountName" . }}
47+
{{- if .Values.priorityClassName }}
48+
priorityClassName: "{{ .Values.priorityClassName }}"
49+
{{- end }}
50+
initContainers:
51+
# Run migrations as an init container
52+
{{- if .Values.migrationJob.enabled }}
53+
- name: migration-job
54+
image: "{{ .Values.migrationJob.image.repository }}:{{ required "Please set a value for .Values.image.tag" .Values.migrationJob.image.tag }}"
55+
imagePullPolicy: Always
56+
command: ["/bin/sh", "-c"]
57+
args:
58+
- ./atlas-apply.sh
59+
securityContext:
60+
capabilities:
61+
add:
62+
- SYS_PTRACE
63+
env:
64+
{{- range $key, $value := .Values.env }}
65+
- name: "{{ $key }}"
66+
value: "{{ $value }}"
67+
{{- end }}
68+
envFrom:
69+
{{ toYaml .Values.envFrom | indent 10 }}
70+
{{- end }}
71+
{{- if .Values.seedJob.enabled }}
72+
- name: seed-job
73+
image: "{{ .Values.setupJob.image.repository }}:{{ required "Please set a value for .Values.image.tag" .Values.setupJob.image.tag }}"
74+
imagePullPolicy: Always
75+
# this command requires read-write access on the hatchet-config configmap
76+
command: ["/hatchet/hatchet-admin", "quickstart", "--skip", "certs", "--skip", "keys"]
77+
securityContext:
78+
capabilities:
79+
add:
80+
- SYS_PTRACE
81+
env:
82+
{{- range $key, $value := .Values.env }}
83+
- name: "{{ $key }}"
84+
value: "{{ $value }}"
85+
{{- end }}
86+
envFrom:
87+
{{ toYaml .Values.envFrom | indent 10 }}
88+
{{- end }}
89+
{{- if and (not .Values.migrationJob.enabled) (not .Values.seedJob.enabled) }}
90+
[]
91+
{{- end }}
92+
containers:
93+
- name: setup-job
94+
image: "{{ .Values.setupJob.image.repository }}:{{ required "Please set a value for .Values.image.tag" .Values.setupJob.image.tag }}"
95+
imagePullPolicy: Always
96+
# this command requires read-write access on the hatchet-config configmap
97+
command: ["/hatchet/hatchet-admin", "k8s", "quickstart", "--namespace", "{{ .Release.Namespace }}"]
98+
securityContext:
99+
capabilities:
100+
add:
101+
- SYS_PTRACE
102+
env:
103+
{{- range $key, $value := .Values.env }}
104+
- name: "{{ $key }}"
105+
value: "{{ $value }}"
106+
{{- end }}
107+
envFrom:
108+
{{ toYaml .Values.envFrom | indent 10 }}
109+
- name: setup-worker-token
110+
image: "{{ .Values.setupJob.image.repository }}:{{ required "Please set a value for .Values.image.tag" .Values.setupJob.image.tag }}"
111+
imagePullPolicy: Always
112+
# this command requires read-write access on the hatchet-config configmap
113+
command: ["/hatchet/hatchet-admin", "k8s", "create-worker-token", "--namespace", "{{ .Release.Namespace }}"]
114+
securityContext:
115+
capabilities:
116+
add:
117+
- SYS_PTRACE
118+
env:
119+
{{- range $key, $value := .Values.env }}
120+
- name: "{{ $key }}"
121+
value: "{{ $value }}"
122+
{{- end }}
123+
envFrom:
124+
{{ toYaml .Values.deploymentEnvFrom | nindent 10 }}
125+
{{- if .Values.envFrom }}
126+
{{ toYaml .Values.envFrom | nindent 10 }}
127+
{{- end }}
128+
{{- with .Values.extraContainers }}
129+
{{ toYaml . | indent 8 }}
130+
{{- end }}
131+
{{- end }}

charts/hatchet-api/values.yaml

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
image:
22
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-api"
3-
tag: "v0.42.8"
3+
tag: "v0.42.12"
44
pullPolicy: "Always"
55

66
migrationJob:
77
enabled: true
88
image:
99
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-migrate"
10-
tag: "v0.42.8"
10+
tag: "v0.42.12"
11+
pullPolicy: "Always"
12+
13+
seedJob:
14+
enabled: true
15+
image:
16+
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-admin"
17+
tag: "v0.42.12"
18+
pullPolicy: "Always"
19+
20+
setupJob:
21+
enabled: true
22+
image:
23+
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-admin"
24+
tag: "v0.42.12"
1125
pullPolicy: "Always"
1226

1327
commandline:
@@ -28,6 +42,10 @@ retainFailedHooks: false
2842

2943
env: {}
3044

45+
deploymentEnvFrom:
46+
- secretRef:
47+
name: hatchet-config
48+
3149
envFrom: []
3250

3351
files: {}

charts/hatchet-frontend/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: hatchet-frontend
33
description: A Helm chart for deploying a frontend static file server on Kubernetes.
44
type: application
5-
version: 0.5.0
5+
version: 0.6.0
66
maintainers:
77
- name: Hatchet Engineering
88

charts/hatchet-frontend/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
image:
22
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-frontend"
3-
tag: "v0.42.8"
3+
tag: "v0.42.12"
44
pullPolicy: "Always"
55

66
commandline:

charts/hatchet-stack/Chart.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
dependencies:
22
- name: hatchet-api
33
repository: file://../hatchet-api
4-
version: 0.5.0
4+
version: 0.6.0
55
- name: hatchet-api
66
repository: file://../hatchet-api
7-
version: 0.5.0
7+
version: 0.6.0
88
- name: hatchet-frontend
99
repository: file://../hatchet-frontend
10-
version: 0.5.0
10+
version: 0.6.0
1111
- name: postgresql
1212
repository: https://charts.bitnami.com/bitnami
1313
version: 14.3.3
1414
- name: rabbitmq
1515
repository: https://charts.bitnami.com/bitnami
1616
version: 12.15.0
17-
digest: sha256:2ce45e960b781a4d24cfe7da62528b1d9e8627243a8d5374ec27b01ec1d99b10
18-
generated: "2024-08-20T15:58:44.184303-04:00"
17+
digest: sha256:9a33ce0d42d2ee3ea4d6205e51cf7f06ba2192a4250fd2739a04b85db5a3f8d9
18+
generated: "2024-08-22T17:26:47.846473-04:00"

charts/hatchet-stack/Chart.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ apiVersion: v2
22
name: hatchet-stack
33
description: A Helm chart for deploying Hatchet on Kubernetes together with a PostgreSQL database and RabbitMQ.
44
type: application
5-
version: 0.5.0
5+
version: 0.6.0
66
maintainers:
77
- name: Hatchet Engineering
88
99
dependencies:
1010
- name: "hatchet-api"
1111
condition: api.enabled
1212
repository: "file://../hatchet-api"
13-
version: "^0.5.0"
13+
version: "^0.6.0"
1414
alias: api
1515
- name: "hatchet-api"
1616
condition: engine.enabled
1717
repository: "file://../hatchet-api"
18-
version: "^0.5.0"
18+
version: "^0.6.0"
1919
alias: engine
2020
- name: "hatchet-frontend"
2121
condition: frontend.enabled
2222
repository: "file://../hatchet-frontend"
23-
version: "^0.5.0"
23+
version: "^0.6.0"
2424
alias: frontend
2525
- name: "postgresql"
2626
condition: postgres.enabled

charts/hatchet-stack/values.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ api:
33
replicaCount: 2
44
image:
55
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-api"
6-
tag: "v0.42.8"
6+
tag: "v0.42.12"
77
pullPolicy: "Always"
88
migrationJob:
99
image:
@@ -16,9 +16,9 @@ api:
1616
SERVER_URL: "http://localhost:8080"
1717
SERVER_AUTH_COOKIE_INSECURE: "t"
1818
SERVER_AUTH_SET_EMAIL_VERIFIED: "t"
19-
SERVER_LOGGER_LEVEL: "debug"
19+
SERVER_LOGGER_LEVEL: "warn"
2020
SERVER_LOGGER_FORMAT: "console"
21-
DATABASE_LOGGER_LEVEL: "debug"
21+
DATABASE_LOGGER_LEVEL: "warn"
2222
DATABASE_LOGGER_FORMAT: "console"
2323
SERVER_AUTH_GOOGLE_ENABLED: "f"
2424
SERVER_AUTH_BASIC_AUTH_ENABLED: "t"
@@ -56,10 +56,12 @@ engine:
5656
replicaCount: 1
5757
image:
5858
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-engine"
59-
tag: "v0.42.8"
59+
tag: "v0.42.12"
6060
pullPolicy: "Always"
6161
migrationJob:
6262
enabled: false
63+
setupJob:
64+
enabled: false
6365
service:
6466
externalPort: 7070
6567
internalPort: 7070
@@ -115,7 +117,7 @@ frontend:
115117
enabled: true
116118
image:
117119
repository: "ghcr.io/hatchet-dev/hatchet/hatchet-frontend"
118-
tag: "v0.42.8"
120+
tag: "v0.42.12"
119121
pullPolicy: "Always"
120122
service:
121123
externalPort: 8080

0 commit comments

Comments
 (0)