Skip to content

Commit 7071923

Browse files
authored
Update Jitsu to v2.5.0 (#13)
* feat: bump appversion to 2.5.0 * feat: add clickhouse subchart and configuration
1 parent 8376d1f commit 7071923

12 files changed

+308
-10
lines changed

Chart.lock

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
dependencies:
22
- name: postgresql
33
repository: oci://registry-1.docker.io/bitnamicharts
4-
version: 14.0.1
4+
version: 14.3.3
55
- name: redis
66
repository: oci://registry-1.docker.io/bitnamicharts
7-
version: 18.12.1
7+
version: 18.19.4
88
- name: kafka
99
repository: oci://registry-1.docker.io/bitnamicharts
10-
version: 26.8.4
10+
version: 26.11.4
1111
- name: mongodb
1212
repository: oci://registry-1.docker.io/bitnamicharts
13-
version: 14.8.2
14-
digest: sha256:8a5ee2a84944c85ca2eec100296242a997a6f83f5840386fe0b0543781db7661
15-
generated: "2024-02-05T00:49:32.33554551+01:00"
13+
version: 14.13.0
14+
- name: clickhouse
15+
repository: oci://registry-1.docker.io/bitnamicharts
16+
version: 6.0.2
17+
digest: sha256:849a9bf101f0f355ef5462e3523a9b8aa848a5e80b9d24897cc75fb61407d6b2
18+
generated: "2024-04-11T08:04:50.759931548+02:00"

Chart.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type: application
44

55
# Chart version is set automatically as part of the release process
66
version: 0.0.0
7-
appVersion: 2.4.6
7+
appVersion: 2.5.0
88

99
dependencies:
1010
- name: postgresql
@@ -23,3 +23,7 @@ dependencies:
2323
version: ^14.8.2
2424
repository: oci://registry-1.docker.io/bitnamicharts
2525
condition: mongodb.enabled
26+
- name: clickhouse
27+
version: ^6.0.2
28+
repository: oci://registry-1.docker.io/bitnamicharts
29+
condition: clickhouse.enabled

templates/_helpers.tpl

+32
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,35 @@ Create the name of the service account to use
117117
{{ .Values.config.mongodbUrl }}
118118
{{- end }}
119119
{{- end }}
120+
121+
{{- define "jitsu.clickhouseHost" -}}
122+
{{- if and (not .Values.config.clickhouseHost) .Values.clickhouse.enabled }}
123+
{{ .Release.Name }}-clickhouse:8123
124+
{{- else }}
125+
{{ .Values.config.clickhouseHost }}
126+
{{- end }}
127+
{{- end }}
128+
129+
{{- define "jitsu.clickhouseDatabase" -}}
130+
{{- if and (not .Values.config.clickhouseDatabase) .Values.clickhouse.enabled }}
131+
default
132+
{{- else }}
133+
{{ .Values.config.clickhouseDatabase }}
134+
{{- end }}
135+
{{- end }}
136+
137+
{{- define "jitsu.clickhouseUsername" -}}
138+
{{- if and (not .Values.config.clickhouseUsername) .Values.clickhouse.enabled }}
139+
jitsu
140+
{{- else }}
141+
{{ .Values.config.clickhouseUsername }}
142+
{{- end }}
143+
{{- end }}
144+
145+
{{- define "jitsu.clickhousePassword" -}}
146+
{{- if and (not .Values.config.clickhousePassword) .Values.clickhouse.enabled }}
147+
jitsu
148+
{{- else }}
149+
{{ .Values.config.clickhousePassword }}
150+
{{- end }}
151+
{{- end }}

templates/bulker/_helpers.tpl

+41-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ app.kubernetes.io/component: bulker
1010
- name: BULKER_INSTANCE_ID
1111
value: {{ .instanceId | quote }}
1212

13-
1413
{{- if or .redisUrlFrom $.Values.config.redisUrlFrom }}
1514
- name: BULKER_REDIS_URL
1615
valueFrom:
@@ -168,6 +167,47 @@ app.kubernetes.io/component: bulker
168167
{{- end }}
169168
{{- end }}
170169

170+
{{- if or .clickhouseHostFrom $.Values.config.clickhouseHostFrom }}
171+
- name: BULKER_CLICKHOUSE_HOST
172+
valueFrom:
173+
{{- toYaml (.clickhouseHostFrom | default $.Values.config.clickhouseHostFrom) | nindent 4 }}
174+
{{- else }}
175+
- name: BULKER_CLICKHOUSE_HOST
176+
value: {{ .clickhouseHost | default (include "jitsu.clickhouseHost" $) | quote }}
177+
{{- end }}
178+
179+
{{- if or .clickhouseDatabaseFrom $.Values.config.clickhouseDatabaseFrom }}
180+
- name: BULKER_CLICKHOUSE_DATABASE
181+
valueFrom:
182+
{{- toYaml (.clickhouseDatabaseFrom | default $.Values.config.clickhouseDatabaseFrom) | nindent 4 }}
183+
{{- else }}
184+
- name: BULKER_CLICKHOUSE_DATABASE
185+
value: {{ .clickhouseDatabase | default (include "jitsu.clickhouseDatabase" $) | quote }}
186+
{{- end }}
187+
188+
{{- if or .clickhouseUsernameFrom $.Values.config.clickhouseUsernameFrom }}
189+
- name: BULKER_CLICKHOUSE_USERNAME
190+
valueFrom:
191+
{{- toYaml (.clickhouseUsernameFrom | default $.Values.config.clickhouseUsernameFrom) | nindent 4 }}
192+
{{- else }}
193+
- name: BULKER_CLICKHOUSE_USERNAME
194+
value: {{ .clickhouseUsername | default (include "jitsu.clickhouseUsername" $) | quote }}
195+
{{- end }}
196+
197+
{{- if or .clickhousePasswordFrom $.Values.config.clickhousePasswordFrom }}
198+
- name: BULKER_CLICKHOUSE_PASSWORD
199+
valueFrom:
200+
{{- toYaml (.clickhousePasswordFrom | default $.Values.config.clickhousePasswordFrom) | nindent 4 }}
201+
{{- else }}
202+
- name: BULKER_CLICKHOUSE_PASSWORD
203+
value: {{ .clickhousePassword | default (include "jitsu.clickhousePassword" $) | quote }}
204+
{{- end }}
205+
206+
{{- with (.clickhouseSsl | default $.Values.config.clickhouseSsl) }}
207+
- name: BULKER_CLICKHOUSE_SSL
208+
value: {{ . | quote }}
209+
{{- end }}
210+
171211
{{- with .batchRunnerDefaultPeriodSec }}
172212
- name: BULKER_BATCH_RUNNER_DEFAULT_PERIOD_SEC
173213
value: {{ . | quote }}

templates/bulker/deployment.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ spec:
4646
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
4747
args: ["job-wr", "{{ include "jitsu.fullname" . }}-token-generator-{{ sha1sum (toJson .Values) | substr 0 8 }}"]
4848
{{- end }}
49+
{{- if .Values.clickhouse.enabled }}
50+
- name: wait-for-clickhouse
51+
{{- with (.Values.bulker.securityContext | default .Values.global.securityContext) }}
52+
securityContext:
53+
{{- toYaml . | nindent 12 }}
54+
{{- end }}
55+
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
56+
args: ["service", "{{ .Release.Name }}-clickhouse"]
57+
{{- end }}
4958
{{- if .Values.redis.enabled }}
5059
- name: wait-for-redis
5160
{{- with (.Values.bulker.securityContext | default .Values.global.securityContext) }}

templates/console/_helpers.tpl

+41
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,47 @@ app.kubernetes.io/component: console
2525
value: {{ .databaseUrl | default (include "jitsu.databaseUrl" $) | quote }}
2626
{{- end }}
2727

28+
{{- if or .clickhouseHostFrom $.Values.config.clickhouseHostFrom }}
29+
- name: CLICKHOUSE_HOST
30+
valueFrom:
31+
{{- toYaml (.clickhouseHostFrom | default $.Values.config.clickhouseHostFrom) | nindent 4 }}
32+
{{- else }}
33+
- name: CLICKHOUSE_HOST
34+
value: {{ .clickhouseHost | default (include "jitsu.clickhouseHost" $) | quote }}
35+
{{- end }}
36+
37+
{{- if or .clickhouseDatabaseFrom $.Values.config.clickhouseDatabaseFrom }}
38+
- name: CLICKHOUSE_DATABASE
39+
valueFrom:
40+
{{- toYaml (.clickhouseDatabaseFrom | default $.Values.config.clickhouseDatabaseFrom) | nindent 4 }}
41+
{{- else }}
42+
- name: CLICKHOUSE_DATABASE
43+
value: {{ .clickhouseDatabase | default (include "jitsu.clickhouseDatabase" $) | quote }}
44+
{{- end }}
45+
46+
{{- if or .clickhouseUsernameFrom $.Values.config.clickhouseUsernameFrom }}
47+
- name: CLICKHOUSE_USERNAME
48+
valueFrom:
49+
{{- toYaml (.clickhouseUsernameFrom | default $.Values.config.clickhouseUsernameFrom) | nindent 4 }}
50+
{{- else }}
51+
- name: CLICKHOUSE_USERNAME
52+
value: {{ .clickhouseUsername | default (include "jitsu.clickhouseUsername" $) | quote }}
53+
{{- end }}
54+
55+
{{- if or .clickhousePasswordFrom $.Values.config.clickhousePasswordFrom }}
56+
- name: CLICKHOUSE_PASSWORD
57+
valueFrom:
58+
{{- toYaml (.clickhousePasswordFrom | default $.Values.config.clickhousePasswordFrom) | nindent 4 }}
59+
{{- else }}
60+
- name: CLICKHOUSE_PASSWORD
61+
value: {{ .clickhousePassword | default (include "jitsu.clickhousePassword" $) | quote }}
62+
{{- end }}
63+
64+
{{- with (.clickhouseSsl | default $.Values.config.clickhouseSsl) }}
65+
- name: CLICKHOUSE_SSL
66+
value: {{ . | quote }}
67+
{{- end }}
68+
2869
{{- if and (not .bulkerUrl) (not $.Values.config.bulkerUrl) $.Values.bulker.enabled }}
2970
- name: BULKER_URL
3071
value: {{ printf "http://%s-bulker:%d" (include "jitsu.fullname" $) (int $.Values.bulker.service.port) | quote }}

templates/console/deployment.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ spec:
4646
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
4747
args: ["job-wr", "{{ include "jitsu.fullname" . }}-token-generator-{{ sha1sum (toJson .Values) | substr 0 8 }}"]
4848
{{- end }}
49+
{{- if .Values.clickhouse.enabled }}
50+
- name: wait-for-clickhouse
51+
{{- with (.Values.console.securityContext | default .Values.global.securityContext) }}
52+
securityContext:
53+
{{- toYaml . | nindent 12 }}
54+
{{- end }}
55+
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
56+
args: ["service", "{{ .Release.Name }}-clickhouse"]
57+
{{- end }}
4958
{{- if .Values.migration.enabled }}
5059
- name: wait-for-migration
5160
{{- with (.Values.console.securityContext | default .Values.global.securityContext) }}

templates/ingest/_helpers.tpl

+41
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,47 @@ app.kubernetes.io/component: ingest
1919
value: {{ .redisUrl | default (include "jitsu.redisUrl" $) | quote }}
2020
{{- end }}
2121

22+
{{- if or .clickhouseHostFrom $.Values.config.clickhouseHostFrom }}
23+
- name: INGEST_CLICKHOUSE_HOST
24+
valueFrom:
25+
{{- toYaml (.clickhouseHostFrom | default $.Values.config.clickhouseHostFrom) | nindent 4 }}
26+
{{- else }}
27+
- name: INGEST_CLICKHOUSE_HOST
28+
value: {{ .clickhouseHost | default (include "jitsu.clickhouseHost" $) | quote }}
29+
{{- end }}
30+
31+
{{- if or .clickhouseDatabaseFrom $.Values.config.clickhouseDatabaseFrom }}
32+
- name: INGEST_CLICKHOUSE_DATABASE
33+
valueFrom:
34+
{{- toYaml (.clickhouseDatabaseFrom | default $.Values.config.clickhouseDatabaseFrom) | nindent 4 }}
35+
{{- else }}
36+
- name: INGEST_CLICKHOUSE_DATABASE
37+
value: {{ .clickhouseDatabase | default (include "jitsu.clickhouseDatabase" $) | quote }}
38+
{{- end }}
39+
40+
{{- if or .clickhouseUsernameFrom $.Values.config.clickhouseUsernameFrom }}
41+
- name: INGEST_CLICKHOUSE_USERNAME
42+
valueFrom:
43+
{{- toYaml (.clickhouseUsernameFrom | default $.Values.config.clickhouseUsernameFrom) | nindent 4 }}
44+
{{- else }}
45+
- name: INGEST_CLICKHOUSE_USERNAME
46+
value: {{ .clickhouseUsername | default (include "jitsu.clickhouseUsername" $) | quote }}
47+
{{- end }}
48+
49+
{{- if or .clickhousePasswordFrom $.Values.config.clickhousePasswordFrom }}
50+
- name: INGEST_CLICKHOUSE_PASSWORD
51+
valueFrom:
52+
{{- toYaml (.clickhousePasswordFrom | default $.Values.config.clickhousePasswordFrom) | nindent 4 }}
53+
{{- else }}
54+
- name: INGEST_CLICKHOUSE_PASSWORD
55+
value: {{ .clickhousePassword | default (include "jitsu.clickhousePassword" $) | quote }}
56+
{{- end }}
57+
58+
{{- with (.clickhouseSsl | default $.Values.config.clickhouseSsl) }}
59+
- name: INGEST_CLICKHOUSE_SSL
60+
value: {{ . | quote }}
61+
{{- end }}
62+
2263
{{- if .authTokensFrom }}
2364
- name: INGEST_AUTH_TOKENS
2465
valueFrom:

templates/ingest/deployment.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ spec:
4242
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
4343
args: ["job-wr", "{{ include "jitsu.fullname" . }}-token-generator-{{ sha1sum (toJson .Values) | substr 0 8 }}"]
4444
{{- end }}
45+
{{- if .Values.clickhouse.enabled }}
46+
- name: wait-for-clickhouse
47+
{{- with (.Values.ingest.securityContext | default .Values.global.securityContext) }}
48+
securityContext:
49+
{{- toYaml . | nindent 12 }}
50+
{{- end }}
51+
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
52+
args: ["service", "{{ .Release.Name }}-clickhouse"]
53+
{{- end }}
4554
{{- if .Values.redis.enabled }}
4655
- name: wait-for-redis
4756
{{- with (.Values.ingest.securityContext | default .Values.global.securityContext) }}

templates/rotor/_helpers.tpl

+41
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,47 @@ app.kubernetes.io/component: rotor
2525
value: {{ .mongodbUrl | default (include "jitsu.mongodbUrl" $) | quote }}
2626
{{- end }}
2727

28+
{{- if or .clickhouseHostFrom $.Values.config.clickhouseHostFrom }}
29+
- name: CLICKHOUSE_HOST
30+
valueFrom:
31+
{{- toYaml (.clickhouseHostFrom | default $.Values.config.clickhouseHostFrom) | nindent 4 }}
32+
{{- else }}
33+
- name: CLICKHOUSE_HOST
34+
value: {{ .clickhouseHost | default (include "jitsu.clickhouseHost" $) | quote }}
35+
{{- end }}
36+
37+
{{- if or .clickhouseDatabaseFrom $.Values.config.clickhouseDatabaseFrom }}
38+
- name: CLICKHOUSE_DATABASE
39+
valueFrom:
40+
{{- toYaml (.clickhouseDatabaseFrom | default $.Values.config.clickhouseDatabaseFrom) | nindent 4 }}
41+
{{- else }}
42+
- name: CLICKHOUSE_DATABASE
43+
value: {{ .clickhouseDatabase | default (include "jitsu.clickhouseDatabase" $) | quote }}
44+
{{- end }}
45+
46+
{{- if or .clickhouseUsernameFrom $.Values.config.clickhouseUsernameFrom }}
47+
- name: CLICKHOUSE_USERNAME
48+
valueFrom:
49+
{{- toYaml (.clickhouseUsernameFrom | default $.Values.config.clickhouseUsernameFrom) | nindent 4 }}
50+
{{- else }}
51+
- name: CLICKHOUSE_USERNAME
52+
value: {{ .clickhouseUsername | default (include "jitsu.clickhouseUsername" $) | quote }}
53+
{{- end }}
54+
55+
{{- if or .clickhousePasswordFrom $.Values.config.clickhousePasswordFrom }}
56+
- name: CLICKHOUSE_PASSWORD
57+
valueFrom:
58+
{{- toYaml (.clickhousePasswordFrom | default $.Values.config.clickhousePasswordFrom) | nindent 4 }}
59+
{{- else }}
60+
- name: CLICKHOUSE_PASSWORD
61+
value: {{ .clickhousePassword | default (include "jitsu.clickhousePassword" $) | quote }}
62+
{{- end }}
63+
64+
{{- with (.clickhouseSsl | default $.Values.config.clickhouseSsl) }}
65+
- name: CLICKHOUSE_SSL
66+
value: {{ . | quote }}
67+
{{- end }}
68+
2869
{{- if and (not .repositoryBaseUrl) $.Values.console.enabled $.Values.tokenGenerator.enabled }}
2970
- name: REPOSITORY_BASE_URL
3071
value: {{ printf "http://%s-console:%d/api/admin/export"

templates/rotor/deployment.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ spec:
4646
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
4747
args: ["job-wr", "{{ include "jitsu.fullname" . }}-token-generator-{{ sha1sum (toJson .Values) | substr 0 8 }}"]
4848
{{- end }}
49+
{{- if .Values.clickhouse.enabled }}
50+
- name: wait-for-clickhouse
51+
{{- with (.Values.rotor.securityContext | default .Values.global.securityContext) }}
52+
securityContext:
53+
{{- toYaml . | nindent 12 }}
54+
{{- end }}
55+
image: ghcr.io/groundnuty/k8s-wait-for:v2.0
56+
args: ["service", "{{ .Release.Name }}-clickhouse"]
57+
{{- end }}
4958
{{- if .Values.redis.enabled }}
5059
- name: wait-for-redis
5160
{{- with (.Values.rotor.securityContext | default .Values.global.securityContext) }}

0 commit comments

Comments
 (0)