apiVersion: apps/v1
kind: Deployment
metadata:
  name: activemq-broker
  labels:
    app: activemq-broker
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
        app: activemq-broker
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
          app: activemq-broker
    spec:
      restartPolicy: Always
      containers:
      - name: activemq-artemis
        image: "{{ .Values.broker.image.repository }}{{ .Values.broker.image.name }}:{{ .Values.broker.image.version  }}"
        imagePullPolicy: Always
        envFrom:
        - secretRef:
            name: activemq-broker-secrets
            optional: false
        - configMapRef:
            name: activemq-broker-configmap
            optional: false

        ports:
        - name: activemq-stomp
          containerPort: 61616
          protocol: TCP
