apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-jobs-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api-jobs
  template:
    metadata:
      labels:
        app: api-jobs
    spec:
      containers:
        - image: gcr.io/bedrock-foundation/bedrock-core-services-api-jobs
          imagePullPolicy: Always
          name: main
          # resources:
          #   limits:
          #     cpu: "1000m"
          #     memory: "4Gi"
          command:
            - /service/scripts/entrypoints/jobs.sh
          args:
            - /service/jobs/default.yml
          env:
            - name: ENV_NAME
              value: "staging"
            - name: NODE_ENV
              value: "production"
            - name: MONGO_URI
              value: "mongodb://mongo:27017/bedrock_staging"
            - name: POSTMARK_FROM
              value: "no-reply@bedrock.foundation"
            - name: POSTMARK_API_KEY
              value: "abc"
          volumeMounts:
            - name: cache
              mountPath: /service/data
      volumes:
        - name: cache
          emptyDir: {}
