apiVersion: v1
kind: Pod
metadata:
  name: delete-batch2-tables
spec:
  containers:
  - name: delete-batch2-tables
    image: "{{ batch2_tables_image.image }}"
    command:
     - /bin/bash
     - -c
     - |
       set -ex
       mysql --defaults-extra-file=/secrets/batch-admin/sql-config.cnf < ./delete-batch-tables.sql
    volumeMounts:
      - mountPath: /secrets/batch-admin
        readOnly: true
        name: batch2-admin-secret
  volumes:
    - name: batch2-admin-secret
      secret:
        secretName: "{{ batch2_database.admin_secret_name }}"
  restartPolicy: Never
