Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/posthog/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type: application

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

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
13 changes: 13 additions & 0 deletions charts/posthog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ Set the posthog image
{{- end -}}
{{- end -}}

{{/*
Set the posthog web image
*/}}
{{- define "posthog.web.image.fullPath" -}}
{{ if .Values.web.image.sha -}}
"{{ .Values.web.image.repository }}@{{ .Values.web.image.sha }}"
{{- else if .Values.web.image.tag -}}
"{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
{{- else -}}
{{ include "posthog.image.fullPath" . }}
{{- end -}}
{{- end -}}

{{/*
Set zookeeper host
*/}}
Expand Down
9 changes: 8 additions & 1 deletion charts/posthog/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,16 @@ spec:

containers:
- name: {{ .Chart.Name }}-web
image: {{ template "posthog.image.fullPath" . }}
image: {{ template "posthog.web.image.fullPath" . }}
{{ if .Values.web.image.command -}}
command:
{{- range .Values.web.image.command }}
- {{ . }}
{{- end }}
{{ else }}
command:
- ./bin/docker-server
{{ end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.internalPort }}
Expand Down
26 changes: 26 additions & 0 deletions charts/posthog/tests/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,29 @@ tests:
content:
name: POSTHOG_POSTGRES_READ_HOST
value: beep-boop

- it: should be able to have web.image set
template: templates/web-deployment.yaml
set:
cloud: local
web.image.sha: sha256:2a16a47578d0193480dd02bcda7952f09acb34eacdf764315123f2271f72838d
web.image.repository: webimage
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.template.spec.containers[0].image
value: webimage@sha256:2a16a47578d0193480dd02bcda7952f09acb34eacdf764315123f2271f72838d

- it: should be able to have custom web.image.command set
template: templates/web-deployment.yaml
set:
cloud: local
web.image.command: [./bin/run]
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.template.spec.containers[0].command
value:
- ./bin/run
2 changes: 2 additions & 0 deletions charts/posthog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ web:
# -- Whether to install the PostHog web stack or not.
enabled: true

image: {}

podAnnotations:
# Uncomment these lines if you want Prometheus server to scrape metrics.
# prometheus.io/scrape: "true"
Expand Down