apiVersion: apps/v1
kind: Deployment
metadata:
  name: geocrop-worker
  namespace: geocrop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: geocrop-worker
  template:
    metadata:
      labels:
        app: geocrop-worker
    spec:
      containers:
      - name: geocrop-worker
        image: frankchine/geocrop-worker:latest
        imagePullPolicy: Always
        env:
        - name: REDIS_HOST
          value: redis.geocrop.svc.cluster.local
        - name: MINIO_ACCESS_KEY
          valueFrom:
            secretKeyRef:
              name: geocrop-secrets
              key: minio-access-key
        - name: MINIO_SECRET_KEY
          valueFrom:
            secretKeyRef:
              name: geocrop-secrets
              key: minio-secret-key
        - name: AWS_ACCESS_KEY_ID
          valueFrom:
            secretKeyRef:
              name: geocrop-secrets
              key: minio-access-key
        - name: AWS_SECRET_ACCESS_KEY
          valueFrom:
            secretKeyRef:
              name: geocrop-secrets
              key: minio-secret-key
        resources:
          limits:
            memory: "2Gi"
          requests:
            memory: "1Gi"
