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