From c54dfeb2be062a9dd56c316faeb2a7d35003487d Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Tue, 14 Nov 2023 12:43:07 -0500 Subject: [PATCH] job --- k8s/apps/videohosting/templates/sts-arrs.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/k8s/apps/videohosting/templates/sts-arrs.yaml b/k8s/apps/videohosting/templates/sts-arrs.yaml index 53a4bc2..d91665f 100644 --- a/k8s/apps/videohosting/templates/sts-arrs.yaml +++ b/k8s/apps/videohosting/templates/sts-arrs.yaml @@ -29,11 +29,13 @@ spec: engineVersion: v2 data: {{ if $v.migrateDbFromSqllite.enabled }} - migration-sqllite-to-pg.sh: + migration-sqllite-to-pg.sh: |- pgloader \ --with "quote identifiers" \ --with "data only" \ - /data/{{$k}}.db '{{ `postgresql://{{.username}}:{{.password}}@{{.host}}:{{.port}}/` }}{{$k}}' + --with "prefetch rows = 100" --with "batch size = 1MB" \ + /data/{{$k}}.db \ + '{{ `postgresql://{{.username}}:{{.password}}@{{.host}}:{{.port}}/` }}{{$k}}' {{ end }} config.xml: |- @@ -215,6 +217,7 @@ spec: name: "migrate-{{$k}}" spec: restartPolicy: Never + backoffLimit: 1 volumes: - name: data persistentVolumeClaim: @@ -226,10 +229,8 @@ spec: - name: migration image: "ghcr.io/roxedus/pgloader" command: - # - sh - # - /configxml/migration-sqllite-to-pg.sh - - sleep - - infinity + - sh + - /configxml/migration-sqllite-to-pg.sh volumeMounts: - mountPath: /app name: tffiles