Skip to content

Commit

Permalink
Allow using separate image/command for posthog web
Browse files Browse the repository at this point in the history
This will allow us to test out our nginx unit image on web first
  • Loading branch information
frankh committed Nov 22, 2023
1 parent f95ceea commit f41d660
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
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
6 changes: 5 additions & 1 deletion charts/posthog/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ spec:

containers:
- name: {{ .Chart.Name }}-web
image: {{ template "posthog.image.fullPath" . }}
image: {{ template "posthog.web.image.fullPath" . }}
{{ if .Values.web.image.command -}}
command:
- ./bin/docker-server
{{ else }}
{{- toYaml .Values.web.image.command | indent 8 }}
{{ end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.internalPort }}
Expand Down

0 comments on commit f41d660

Please sign in to comment.