diff --git a/charts/flagsmith/Chart.yaml b/charts/flagsmith/Chart.yaml index 946d1cb..dc7ed48 100644 --- a/charts/flagsmith/Chart.yaml +++ b/charts/flagsmith/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: flagsmith description: Flagsmith type: application -version: 0.21.0 +version: 0.22.0 appVersion: 2.57.0 dependencies: - name: postgresql diff --git a/charts/flagsmith/templates/deployment-api.yaml b/charts/flagsmith/templates/deployment-api.yaml index a4bfc15..4d92a69 100644 --- a/charts/flagsmith/templates/deployment-api.yaml +++ b/charts/flagsmith/templates/deployment-api.yaml @@ -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: @@ -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) }} diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index b49d514..c975eac 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -60,6 +60,7 @@ api: successThreshold: 1 timeoutSeconds: 2 dbWaiter: + useExternalImage: true image: repository: willwill/wait-for-it tag: latest