using scrupt
This commit is contained in:
1 parent
6f36938250
commit
4f3b68c720
1 file changed
+14
-9
@@ -28,8 +28,13 @@ spec:
|
|||||||
template:
|
template:
|
||||||
engineVersion: v2
|
engineVersion: v2
|
||||||
data:
|
data:
|
||||||
CONNECTION_STRING: |-
|
{{ if $v.migrateDbFromSqllite.enabled }}
|
||||||
{{ `postgresql://{{.username}}:{{.password}}@{{.host}}:{{.port}}/` }}{{$k}}
|
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.xml: |-
|
||||||
<Config>
|
<Config>
|
||||||
<LogLevel>info</LogLevel>
|
<LogLevel>info</LogLevel>
|
||||||
@@ -212,17 +217,15 @@ spec:
|
|||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: "{{ $v.migrateDbFromSqllite.claimName }}"
|
claimName: "{{ $v.migrateDbFromSqllite.claimName }}"
|
||||||
|
- name: configxml
|
||||||
|
secret:
|
||||||
|
secretName: "{{$k}}-config"
|
||||||
containers:
|
containers:
|
||||||
- name: migration
|
- name: migration
|
||||||
image: "ghcr.io/roxedus/pgloader"
|
image: "ghcr.io/roxedus/pgloader"
|
||||||
command:
|
command:
|
||||||
- pgloader
|
- sh
|
||||||
- --with
|
- /configxml/migration-sqllite-to-pg.sh
|
||||||
- "quote identifiers"
|
|
||||||
- --with
|
|
||||||
- "data only"
|
|
||||||
- /data/{{$k}}.db
|
|
||||||
- $CONNECTION_STRING
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /app
|
- mountPath: /app
|
||||||
name: tffiles
|
name: tffiles
|
||||||
@@ -235,5 +238,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/data"
|
- mountPath: "/data"
|
||||||
name: data
|
name: data
|
||||||
|
- name: configxml
|
||||||
|
mountPath: /configxml
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
Reference in new issue
Block a user