apiVersion: batch/v1
kind: Job
metadata:
  name: db-check
spec:
  template:
    spec:
      containers:
      - name: db-check
        image: ctfd/ctfd
        command: ["python",  "ping.py"]
        env:
          - name: "DATABASE_URL"
            valueFrom:
              secretKeyRef:
                name: "deployment-secrets"
                key: "db_connection_string"
      restartPolicy: Never
  backoffLimit: 4
