Skip to content

Commit

Permalink
refactor(helm): refactor wait-minio (#755)
Browse files Browse the repository at this point in the history
`wait-minio` inside of  `initContainer` moved to the helm helper templates

Signed-off-by: Kaan Yagci <kaan.yagci-ext@owkin.com>
  • Loading branch information
kaanyagci committed Oct 9, 2023
1 parent edfb991 commit 85d797d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
6 changes: 6 additions & 0 deletions charts/substra-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [22.8.4] - 2023-10-06

## Changed

- `wait-minio` container definition moved to the Helm helper templates

## [22.8.3] - 2023-10-06

### Changed
Expand Down
2 changes: 1 addition & 1 deletion charts/substra-backend/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: substra-backend
home: https://github.com/Substra
version: 22.8.3
version: 22.8.4
appVersion: 0.42.1
kubeVersion: ">= 1.19.0-0"
description: Main package for Substra
Expand Down
10 changes: 10 additions & 0 deletions charts/substra-backend/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,14 @@ The hostname we should connect to (external is defined, otherwise integrated)
{{- else }}
{{- template "postgresql.primary.fullname" .Subcharts.postgresql }}.{{ .Release.Namespace }}
{{- end }}
{{- end -}}
{{/*
`wait-minio` container initialisation used inside of `initContainers`
*/}}
{{- define "common.waitMinIOContainer" -}}
- name: wait-minio
image: jwilder/dockerize:0.6.1
command: ['dockerize', '-wait', 'tcp://{{ .Release.Name }}-minio:9000']
{{- end -}}
4 changes: 1 addition & 3 deletions charts/substra-backend/templates/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ spec:
- name: wait-postgresql
image: jwilder/dockerize:0.6.1
command: ['dockerize', '-wait', 'tcp://{{ template "substra-backend.database.host" . }}:{{ .Values.database.port }}']
- name: wait-minio
image: jwilder/dockerize:0.6.1
command: ['dockerize', '-wait', 'tcp://{{ .Release.Name }}-minio:9000']
{{- include "common.waitMinIOContainer" . | nindent 6 }}
- name: init-migrate
image: {{ include "substra-backend.images.name" (dict "img" .Values.server.image "defaultTag" $.Chart.AppVersion) }}
command: ['python', 'manage.py', 'migrate']
Expand Down
4 changes: 1 addition & 3 deletions charts/substra-backend/templates/statefulset-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ spec:
- name: wait-postgresql
image: jwilder/dockerize:0.6.1
command: ['dockerize', '-wait', 'tcp://{{ template "substra-backend.database.host" . }}:{{ .Values.database.port }}']
- name: wait-minio
image: jwilder/dockerize:0.6.1
command: ['dockerize', '-wait', 'tcp://{{ .Release.Name }}-minio:9000']
{{- include "common.waitMinIOContainer" . | nindent 6}}
containers:
- name: worker
image: {{ include "substra-backend.images.name" (dict "img" .Values.worker.image "defaultTag" $.Chart.AppVersion) }}
Expand Down

0 comments on commit 85d797d

Please sign in to comment.