apiVersion: batch/v1
kind: Job
metadata:
  name: "crud-service"
spec:
  template:
    metadata:
      name: "crud-service"
    spec:
      restartPolicy: Never
      containers:
        - name: post-install-job
          image: michaelnv/python-crud-service:latest
          imagePullPolicy: IfNotPresent
          command: [ "flask",  "db", "upgrade" ]
          envFrom:
            - secretRef:
                name: backend-secret
  backoffLimit: 0
