kind: Deployment
apiVersion: apps/v1
metadata:
  name: retention-tracker-db-handler-<PRODUCT>
  namespace: airlytics
  labels:
    app: retention-tracker-db-handler
  annotations:
    deployment.kubernetes.io/revision: '3'
spec:
  replicas: 1
  selector:
    matchLabels:
      app: retention-tracker-db-handler
  template:
    metadata:
      labels:
        app: retention-tracker-db-handler
    spec:
      nodeSelector:
        pod-type: <POD_TYPE>
      containers:
        - name: retention-tracker-db-handler
          image: <IMAGE_STORE_SERVER>/airlytics/userdb-periodical-process:latest
          env:
            - name: AIRLYTICS_PRODUCT
              value: '<PRODUCT>'
            - name: AIRLYTICS_ENVIRONMENT
              valueFrom:
                configMapKeyRef:
                  name: airlytics-deployments-config
                  key: airlytics.environment
            - name: USERDB_PROCESS_TYPE
              value: 'retention'
            - name: AIRLYTICS_DEPLOYMENT
              valueFrom:
                configMapKeyRef:
                  name: airlytics-deployments-config
                  key: airlytics.deployment
          ports:
            - containerPort: 8084
              name: metrics
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthcheck
              port: metrics
            initialDelaySeconds: 30
            periodSeconds: 30
          resources:
            requests:
              memory: 2Gi
            limits:
              memory: 2Gi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      schedulerName: default-scheduler
  strategy:
    type: Recreate
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600