Skip to content

Commit 01947f3

Browse files
authored
Merge c02c8dc into f95ceea
2 parents f95ceea + c02c8dc commit 01947f3

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

charts/posthog/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type: application
1111

1212
# This is the chart version. This version number should be incremented each time you make changes
1313
# to the chart and its templates, including the app version.
14-
version: 30.35.0
14+
version: 30.36.0
1515

1616
# This is the version number of the application being deployed. This version number should be
1717
# incremented each time you make changes to the application.

charts/posthog/templates/_helpers.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ Set the posthog image
4949
{{- end -}}
5050
{{- end -}}
5151

52+
{{/*
53+
Set the posthog web image
54+
*/}}
55+
{{- define "posthog.web.image.fullPath" -}}
56+
{{ if .Values.web.image.sha -}}
57+
"{{ .Values.web.image.repository }}@{{ .Values.web.image.sha }}"
58+
{{- else if .Values.web.image.tag -}}
59+
"{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
60+
{{- else -}}
61+
{{ include "posthog.image.fullPath" . }}
62+
{{- end -}}
63+
{{- end -}}
64+
5265
{{/*
5366
Set zookeeper host
5467
*/}}

charts/posthog/templates/web-deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,14 @@ spec:
8181

8282
containers:
8383
- name: {{ .Chart.Name }}-web
84-
image: {{ template "posthog.image.fullPath" . }}
84+
image: {{ template "posthog.web.image.fullPath" . }}
85+
{{ if .Values.web.image.command -}}
86+
command:
87+
{{- toYaml .Values.web.image.command | indent 8 }}
88+
{{ else }}
8589
command:
8690
- ./bin/docker-server
91+
{{ end }}
8792
imagePullPolicy: {{ .Values.image.pullPolicy }}
8893
ports:
8994
- containerPort: {{ .Values.service.internalPort }}

charts/posthog/tests/web-deployment.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,29 @@ tests:
167167
content:
168168
name: POSTHOG_POSTGRES_READ_HOST
169169
value: beep-boop
170+
171+
- it: should be able to have web.image set
172+
template: templates/web-deployment.yaml
173+
set:
174+
cloud: local
175+
web.image.sha: sha256:2a16a47578d0193480dd02bcda7952f09acb34eacdf764315123f2271f72838d
176+
web.image.repository: webimage
177+
asserts:
178+
- hasDocuments:
179+
count: 1
180+
- equal:
181+
path: spec.template.spec.containers[0].image
182+
value: webimage@sha256:2a16a47578d0193480dd02bcda7952f09acb34eacdf764315123f2271f72838d
183+
184+
- it: should be able to have custom web.image.command set
185+
template: templates/web-deployment.yaml
186+
set:
187+
cloud: local
188+
web.image.command: [./bin/run]
189+
asserts:
190+
- hasDocuments:
191+
count: 1
192+
- equal:
193+
path: spec.template.spec.containers[0].command
194+
value:
195+
- ./bin/run

charts/posthog/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ web:
189189
# -- Whether to install the PostHog web stack or not.
190190
enabled: true
191191

192+
image: {}
193+
192194
podAnnotations:
193195
# Uncomment these lines if you want Prometheus server to scrape metrics.
194196
# prometheus.io/scrape: "true"

0 commit comments

Comments
 (0)