using scrupt

This commit is contained in:
Ariel Sosnovsky committed 2023-11-14 12:26:36 -05:00
1 parent 6f36938250
commit 4f3b68c720
1 file changed
+14 -9
+14 -9
View File
@@ -28,8 +28,13 @@ spec:
template:
engineVersion: v2
data:
CONNECTION_STRING: |-
{{ `postgresql://{{.username}}:{{.password}}@{{.host}}:{{.port}}/` }}{{$k}}
{{ if $v.migrateDbFromSqllite.enabled }}
migration-sqllite-to-pg.sh:
pgloader \
--with "quote identifiers" \
--with "data only" \
/data/{{$k}}.db {{ `postgresql://{{.username}}:{{.password}}@{{.host}}:{{.port}}/` }}{{$k}}
{{ end }}
config.xml: |-
<Config>
<LogLevel>info</LogLevel>
@@ -212,17 +217,15 @@ spec:
- name: data
persistentVolumeClaim:
claimName: "{{ $v.migrateDbFromSqllite.claimName }}"
- name: configxml
secret:
secretName: "{{$k}}-config"
containers:
- name: migration
image: "ghcr.io/roxedus/pgloader"
command:
- pgloader
- --with
- "quote identifiers"
- --with
- "data only"
- /data/{{$k}}.db
- $CONNECTION_STRING
- sh
- /configxml/migration-sqllite-to-pg.sh
volumeMounts:
- mountPath: /app
name: tffiles
@@ -235,5 +238,7 @@ spec:
volumeMounts:
- mountPath: "/data"
name: data
- name: configxml
mountPath: /configxml
{{ end }}
{{ end }}