apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    service: sentiment-analyzer
  name: sentiment-analyzer
spec:
  replicas: 2
  selector:
    matchLabels:
      service: sentiment-analyzer
  template:
    metadata:
      labels:
        service: sentiment-analyzer
    spec:
      containers:
      - image: stefanpapp/sentiment-analyzer
        name: sentiment-analyzer
        imagePullPolicy: Always
        resources:
          requests:
            memory: "64Mi"
            cpu: "250m"
          limits:
            memory: "1024Mi"
            cpu: "500m"
        env:
          - name: ARN
            valueFrom:
              secretKeyRef:
                name: aws-secret
                key: ARN
          - name: AWS_ACCESS_KEY
            valueFrom:
              secretKeyRef:
                name: aws-secret
                key: AWS_ACCESS_KEY
          - name: AWS_SECRET_KEY
            valueFrom:
              secretKeyRef:
                name: aws-secret
                key: AWS_SECRET_KEY
          - name: AWS_REGION
            valueFrom:
              secretKeyRef:
                name: aws-secret
                key: AWS_REGION
          - name: LANDING_ZONE
            valueFrom:
              secretKeyRef:
                name: aws-secret
                key: LANDING_ZONE
          - name: COMPLETE_ZONE
            valueFrom:
              secretKeyRef:
                name: aws-secret
                key: COMPLETE_ZONE
