apiVersion: batch/v1
kind: Job
metadata:
  name: proxy-error-resend-<PRODUCT>-prod
  namespace: airlytics
  labels:
    app: proxy-error-resend
  annotations:
    deployment.kubernetes.io/revision: '3'
spec:
  ttlSecondsAfterFinished: 172800
  template:
    metadata:
      labels:
        app: proxy-error-resend
    spec:
      nodeSelector:
        pod-type: <POD_TYPE>
      containers:
        - name: proxy-error-resend
          image: <IMAGE_STORE_SERVER>/airlytics/proxy-error-resend-job:latest
          ports:
            - containerPort: 8084
              name: metrics
              protocol: TCP
          env:
            - name: AIRLYTICS_ENVIRONMENT
              value: 'PROD'
            - name: AIRLYTICS_PRODUCT
              value: '<PRODUCT>'
            - name: METRICS_PORT
              value:  '8084'
            - name: AIRLYTICS_DEPLOYMENT
              valueFrom:
                configMapKeyRef:
                  name: airlytics-deployments-config
                  key: airlytics.deployment
          livenessProbe:
            httpGet:
              path: /healthcheck/is-alive
              port: metrics
            initialDelaySeconds: 90
            periodSeconds: 30
          readinessProbe:
            httpGet:
              path: /healthcheck/is-ready
              port: metrics
            initialDelaySeconds: 60
            periodSeconds: 30
          resources:
            limits:
              memory: 4Gi
            requests:
              memory: 4Gi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      schedulerName: default-scheduler
      restartPolicy: Never
  backoffLimit: 0