apiVersion: apps/v1
kind: Deployment
metadata:
  name: image-worker-deployment
spec:
  selector:
    matchLabels:
      app: image-worker
  template:
    metadata:
      labels:
        app: image-worker
    spec:
      containers:
      - name: image-worker
        image: gcr.io/ucdlib-pubreg/krm-node-image-worker:main
        imagePullPolicy: Always
        env:
        - name: KRM_ENV
          value: "gce-prod"
        - name: LOG_LEVEL
          value: "warn"
        - name: RABBITMQ_HOST
          value: rabbitmq-service
        - name: KAFKA_HOST
          value: "kafka-service"
        - name: WORKER_TYPE
          value: node.image.worker
        resources:
          limits:
            memory: "1Gi"
            cpu: "1"
          requests:
            memory: "128Mi"
            cpu: "500m"
        volumeMounts:
        - mountPath: /storage/nfs
          name: nfspsc
        - mountPath: /etc/google
          name: service-account
      volumes:
      - name: nfspsc
        persistentVolumeClaim:
          claimName: nfs-persistent-storage-claim
          readOnly: false
      - name: service-account
        secret:
          secretName: service-account
      nodeSelector:
        intendedfor: worker
