kubernetesactivemq-artemisartemiscloudarkmq

Exposing webconsole when using Artemis operator with size > 1


I am using Artemis operator with deploymentPlan.size=2.

I would like to expose the Artemis management webconsole for each broker instance; I was thinking of doing it through (a kubernetes service + an ingress rule) for each instance.

The problem is that as far as I know the structure of the webconsole app requires the ingress rule to be like:

apiVersion: networking.k8s.io/v1
kind: Ingress
...
  annotations:
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$1

...
          - path: /(.*)
            pathType: ImplementationSpecific
            backend:
              service:
                name: broker-webconsole-svc
                port: 
                  number: 8080

That is, it does not tolerate an url rewriting with some prefix:

/instance0/(.*) --> svc0 #KO
/instance1/(.*) --> svc1 #KO

Am I missing something?


Solution

  • The ArkMQ Operator creates an ingress for each console when the field spec.console.expose is true, i.e.

    apiVersion: broker.amq.io/v1beta1
    kind: ActiveMQArtemis
    metadata:
      name: artemis-broker
    spec:
      console:
        expose: true
      ingressDomain: my-domain.com