Skip to content

Commit 5e51aab

Browse files
committed
fix: Create Influxdb ahead of migration
1 parent 9d578de commit 5e51aab

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

charts/opencrvs-services/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: opencrvs-services
33
description: OpenCRVS Services
44
type: application
5-
version: 0.1.22
5+
version: 0.1.23
66
appVersion: 1.9.0
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
apiVersion: batch/v1
3+
kind: Job
4+
metadata:
5+
annotations:
6+
"helm.sh/hook": pre-install,pre-upgrade
7+
"helm.sh/hook-weight": "1"
8+
labels:
9+
app: influxdb-on-deploy
10+
name: influxdb-on-deploy
11+
spec:
12+
template:
13+
metadata:
14+
labels:
15+
app: influxdb-on-deploy
16+
spec:
17+
containers:
18+
- name: influxdb
19+
image: "appropriate/curl"
20+
command: ["/bin/sh", "-c"]
21+
args:
22+
- |
23+
echo "Creating db $DB"
24+
curl -X POST http://$HOST:$PORT/query --data-urlencode "q=CREATE DATABASE \"$DB\""
25+
env:
26+
- name: HOST
27+
value: {{ .Values.influxdb.host }}
28+
- name: PORT
29+
value: {{ .Values.influxdb.port | quote }}
30+
- name: DB
31+
value: {{ .Values.influxdb.db }}
32+
restartPolicy: "OnFailure"

0 commit comments

Comments
 (0)