---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: openfaas
    component: queue-worker
  name: queue-worker
  namespace: "openfaas"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: queue-worker
  template:
    metadata:
      annotations:
        prometheus.io.scrape: "false"
      labels:
        app: queue-worker
    spec:
      volumes:
      - name: auth
        secret:
          secretName: basic-auth
      containers:
      - name:  queue-worker
        resources:
            requests:
              cpu: 50m
              memory: 120Mi
            
        image: openfaas/queue-worker:0.11.0-arm64
        imagePullPolicy: Always
        env:
        - name: faas_nats_address
          value: "nats.openfaas.svc.cluster.local"
        - name: faas_nats_channel
          value: "faas-request"
        - name: faas_nats_queue_group
          value: "faas"
        - name: faas_gateway_address
          value: "gateway.openfaas.svc.cluster.local"
        - name: "gateway_invoke"
          value: "true"
        - name: faas_function_suffix
          value: ".openfaas-fn.svc.cluster.local"
        - name: max_inflight
          value: "1"
        - name: ack_wait    # Max duration of any async task / request
          value: 60s
        - name: secret_mount_path
          value: "/var/secrets"
        - name: basic_auth
          value: "true"
        volumeMounts:
        - name: auth
          readOnly: true
          mountPath: "/var/secrets"
      nodeSelector:
        beta.kubernetes.io/arch: arm64
        
