kind: Deployment
apiVersion: apps/v1
metadata:
  name: ltv-reader-prod
  namespace: airlytics
  labels:
    app: ltv-reader
  annotations:
    deployment.kubernetes.io/revision: '3'
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ltv-reader
  template:
    metadata:
      labels:
        app: ltv-reader
    spec:
      nodeSelector:
        pod-type: <POD_TYPE>
      containers:
        - name: ltv-reader
          image: <IMAGE_STORE_SERVER>/airlytics/ltv-reader:latest
          ports:
            - containerPort: 8084
              name: metrics
              protocol: TCP
          env:
            - name: AIRLYTICS_ENVIRONMENT
              value: 'PROD'
            - name: AIRLYTICS_DEPLOYMENT
              valueFrom:
                configMapKeyRef:
                  name: airlytics-deployments-config
                  key: airlytics.deployment
            - name: AWS_LTV_INPUT_SECRET_KEY
              valueFrom:
                secretKeyRef:
                  name: ltv-reader-secret
                  key: input-sercret-key
            - name: AWS_LTV_INPUT_INTERNAL_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: ltv-reader-secret
                  key: aws-ltv-input-access-key
            - name: AWS_LTV_INPUT_INTERNAL_SECRET_KEY
              valueFrom:
                  secretKeyRef:
                    name: ltv-reader-secret
                    key: aws-ltv-input-secret-key
          livenessProbe:
            httpGet:
              path: /metrics
              port: metrics
            initialDelaySeconds: 30
            periodSeconds: 30
          resources:
            limits:
              memory: 500Mi
            requests:
              memory: 250Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      schedulerName: default-scheduler
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600