Skip to content

Commit

Permalink
GeoWeb opmet backend: add initContainer waiting for database being av…
Browse files Browse the repository at this point in the history
…ailable
  • Loading branch information
petringo committed Oct 18, 2024
1 parent ca1d73c commit 1303fea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/geoweb-opmet-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.5.2
version: 3.5.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions charts/geoweb-opmet-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ The following table lists the configurable parameters of the Opmet backend chart

| Chart version | opmet version |
|---------------|---------------|
| 3.5.3 | 3.0.0 |
| 3.5.2 | 3.0.0 |
| 3.5.1 | 3.0.0 |
| 3.5.0 | 2.12.1 |
Expand Down
7 changes: 6 additions & 1 deletion charts/geoweb-opmet-backend/templates/opmet-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ spec:
{{- if eq .Values.secretProvider "aws" }}
serviceAccountName: {{ .Values.opmet.secretServiceAccount }}
{{- end }}
{{- if and .Values.opmet.useCustomConfigurationFiles (eq .Values.opmet.customConfigurationLocation "s3")}}
initContainers:
{{- if and .Values.opmet.useCustomConfigurationFiles (eq .Values.opmet.customConfigurationLocation "s3")}}
- name: init
image: amazon/aws-cli
command: ["/bin/sh"]
Expand All @@ -37,6 +37,11 @@ spec:
volumeMounts:
- mountPath: "/opmet/"
name: {{ .Values.opmet.name }}-volume
{{- end }}
{{- if .Values.opmet.db.useZalandoOperatorDb }}
- name: wait-for-db
image: busybox
command: ['sh', '-c', "until nc -z -v -w30 {{ .Values.opmet.db.name }} 5432; do echo 'Waiting for database...'; sleep 5; done"]
{{- end }}
containers:
- name: {{ .Values.opmet.name }}
Expand Down

0 comments on commit 1303fea

Please sign in to comment.