apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: aqueduct-analysis-supply-chain-worker
  name: aqueduct-analysis-supply-chain-worker
  namespace: aqueduct
spec:
  progressDeadlineSeconds: 2147483647
  replicas: 1
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      name: aqueduct-analysis-supply-chain-worker
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: aqueduct-analysis-supply-chain-worker
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: type
                    operator: In
                    values:
                      - apps
      containers:
        - args:
            - worker
          env:
            - name: ENVIRONMENT
              value: staging
            - name: LOGGER_LEVEL
              value: DEBUG
            - name: REDIS_URL
              valueFrom:
                secretKeyRef:
                  key: REDIS_URL
                  name: dbsecrets
            - name: AWS_REGION
              value: us-east-1
            - name: S3_BUCKET_NAME
              valueFrom:
                secretKeyRef:
                  key: AQUEDUCT_S3_BUCKET_NAME
                  name: appsecrets
            - name: AWS_ACCESS_KEY_ID
              valueFrom:
                secretKeyRef:
                  key: AQUEDUCT_S3_ACCESS_KEY_ID
                  name: appsecrets
            - name: AWS_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  key: AQUEDUCT_S3_SECRET_ACCESS_KEY
                  name: appsecrets
          image: gfwdockerhub/aqueduct-analysis
          imagePullPolicy: Always
          name: aqueduct-analysis-supply-chain-worker
          resources:
            requests:
              cpu: "0"
              memory: "0"
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: regcred
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: { }
      terminationGracePeriodSeconds: 30
