apiVersion: batch/v1
kind: Job
metadata:
  labels:
    retraceddev: "1"
  name: retraced-migrate-pg-1-4-6
  namespace: '{{repl Namespace}}'
spec:
  template:
    metadata:
      labels:
        retraceddev: "1"
    spec:
      containers:
      - name: db
        image: registry.replicated.com/library/retraced:1.4.6
        command:
        - /src/retraceddb
        - pg
        - up
        # - node
        # - --inspect=0.0.0.0
        # - -r
        # - ts-node/register
        # - src/_db/runner-lite.ts
        # - pg
        env:
        - name: BUGSNAG_TOKEN
          valueFrom:
            secretKeyRef:
              key: DB_TOKEN
              name: auditlog
        - name: SCHEMA_PATH
          value: /src/migrations/pg10
        envFrom:
        - secretRef:
            name: auditlog
        imagePullPolicy: IfNotPresent
      imagePullSecrets: []
      restartPolicy: Never