apiVersion: apps/v1
kind: Deployment
metadata:
  name: rabbitmq
  labels:
    service: rabbitmq
spec:
  replicas: 1
  selector:
    matchLabels:
      service: rabbitmq
  template:
    metadata:
      labels:
        service: rabbitmq
    spec:
      {{ if .Values.psp.enabled }}
      serviceAccountName: robot-shop
      {{ end }}
      containers:
      - name: rabbitmq
        image: rabbitmq:3.7-management-alpine
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        ports:
        - containerPort: 5672
        - containerPort: 15672
        resources:
          limits:
            cpu: 200m
            memory: 512Mi
          requests:
            cpu: 100m
            memory: 256Mi
      restartPolicy: Always
