Skip to content

Commit

Permalink
Issue 111: option to remove use of waitforit image
Browse files Browse the repository at this point in the history
  • Loading branch information
plumdog committed May 30, 2023
1 parent 89d9c9b commit f8ea178
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/flagsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: flagsmith
description: Flagsmith
type: application
version: 0.18.1
version: 0.19.0
appVersion: 2.42.1
dependencies:
- name: postgresql
Expand Down
12 changes: 12 additions & 0 deletions charts/flagsmith/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ spec:
initContainers:
{{- if eq .Values.databaseExternal.enabled false }}
- name: wait-for-db
{{- if .Values.api.dbWaiter.useExternalImage }}
image: {{ .Values.api.dbWaiter.image.repository }}:{{ .Values.api.dbWaiter.image.tag }}
imagePullPolicy: {{ .Values.api.dbWaiter.image.imagePullPolicy }}
command:
Expand All @@ -73,6 +74,17 @@ spec:
{{- end }}
- --port=5432
- --timeout={{ .Values.api.dbWaiter.timeoutSeconds }}
{{- else }}
image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default (printf "%s" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.api.image.imagePullPolicy }}
command:
- python
- manage.py
- waitfordb
- --waitfor
- {{ .Values.api.dbWaiter.timeoutSeconds | quote }}
env: {{ include (print $.Template.BasePath "/_api_environment.yaml") . | nindent 8 }}
{{- end }}
{{- end }}
- name: migrate-db
image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default (printf "%s" .Chart.AppVersion) }}
Expand Down
1 change: 1 addition & 0 deletions charts/flagsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ api:
successThreshold: 1
timeoutSeconds: 2
dbWaiter:
useExternalImage: true
image:
repository: willwill/wait-for-it
tag: latest
Expand Down

0 comments on commit f8ea178

Please sign in to comment.