apiVersion: apps/v1
kind: Deployment
metadata:
  name: activemq
spec:
  selector:
    matchLabels:
      app: activemq
  replicas: 1
  template:
    metadata:
      labels:
        app: activemq
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9404"
    spec:
      securityContext:
        fsGroup: 1000
        runAsUser: 0
      containers:
        - name: activemq
          image: vromero/activemq-artemis:2.12.0-alpine
          imagePullPolicy: Always
          ports:
            - containerPort: 8161
            - containerPort: 9404
            - containerPort: 61616
          env:
            - name: ENABLE_JMX_EXPORTER
              value: "true"
          volumeMounts:
            - name: activemq-persistent-storage
              mountPath: /var/lib/artemis/data
      volumes:
        - name: activemq-persistent-storage
          persistentVolumeClaim:
            claimName: activemq-pvc
