apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: federatorai
  name: alameda-rabbitmq
  labels:
    app: rabbitmq
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rabbitmq
  template:
    metadata:
      labels:
        app: rabbitmq
    spec:
      serviceAccountName: alameda-rabbitmq
      terminationGracePeriodSeconds: 10
      containers:
      - name: rabbitmq
        image: docker.io/rabbitmq:3.7.15-alpine
        ports:
          - name: http
            protocol: TCP
            containerPort: 15672
          - name: amqp
            protocol: TCP
            containerPort: 5672
        livenessProbe:
          exec:
            command: ["rabbitmqctl", "status"]
          initialDelaySeconds: 60
          timeoutSeconds: 15
          periodSeconds: 60
        readinessProbe:
          exec:
            command: ["rabbitmqctl", "status"]
          initialDelaySeconds: 20
          timeoutSeconds: 10
          periodSeconds: 60
        imagePullPolicy: "IfNotPresent"
        env:
          - name: RABBITMQ_DEFAULT_USER
            value: "admin"
          - name: RABBITMQ_DEFAULT_PASS
            value: "adminpass"
