apiVersion: apps/v1
kind: Deployment
metadata:
  name: ${_APP}-cron
  labels:
    app: ${_APP}-cron
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      app: ${_APP}-cron
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: ${_APP}-cron
    spec:
      containers:
      - name: ${_APP}-cron
        image: gcr.io/${PROJECT_ID}/${_APP}:${COMMIT_SHA}
        command: ["node", "./build/cron.cjs"]
        imagePullPolicy: Always
        # Use default vars from the dev app
        envFrom:
          - configMapRef:
              name: ${_APP}
