apiVersion: apps/v1
kind: Deployment

metadata:
  name: rabbitmq-consumer-deployment
  labels:
    run: rabbitmq-consumer

spec:
  replicas: 1
  selector:
    matchLabels:
      run: rabbitmq-consumer

  template:
    metadata:
      labels:
        run: rabbitmq-consumer
        app: rabbitmq-consumer
    spec:
      containers:
        - name: mqconsumer
          image: moonstone.azurecr.io/mqconsumer:latest
          env:
            - name: ASPNETCORE_ENVIRONMENT
              value: "Development"
            - name: RABBITMQ_HOST_NAME
              value: "rabbitmq"
            - name: RABBITMQ_USER_NAME
              value: "user"
            - name: RABBITMQ_PASSWORD
              value: "PASSWORD"
            - name: RABBITMQ_BATCH_SIZE
              value: "150"
          imagePullPolicy: Always
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
