apiVersion: apps/v1
kind: Deployment
metadata:
  name: phraseanet-rabbitmq
spec:
  replicas: 1
  selector:
    matchLabels:
      app: phraseanet
      tier: rabbitmq
  template:
    metadata:
      labels:
        app: phraseanet
        tier: rabbitmq
    spec:
      containers:
      - name: rabbitmq
        image: rabbitmq:3-management
        terminationMessagePolicy: FallbackToLogsOnError
        env:
        - name: RABBITMQ_DEFAULT_USER
          value: {{ .Values.rabbitmq.default_user }}
        - name: RABBITMQ_DEFAULT_PASS
          value: {{ .Values.rabbitmq.default_pass }}
        - name: RABBITMQ_NODE_PORT
          value: {{ .Values.rabbitmq.port | quote }}
        - name: RABBITMQ_DEFAULT_VHOST
          value: {{ .Values.rabbitmq.default_vhost }}
        - name: RABBITMQ_HEARTBEAT
          value: {{ .Values.rabbitmq.heartbeat | quote }}
          