apiVersion: batch/v1
kind: Job
metadata:
  name: iam-migrations
spec:
  backoffLimit: 0
  template:
    metadata:
      name: iam-migrations
    spec:
      restartPolicy: Never
      containers:
      - name: iam-migrations
        image: netologygroup/iam-migrations
        env:
        - name: DATABASE_URL
          valueFrom:
            secretKeyRef:
              name: postgresql-iam-credentials
              key: database_url
        resources:
          requests:
            cpu: 500m
            memory: 250Mi
          limits:
            cpu: 700m
            memory: 512Mi
