Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-8921

[Docs][Operator] Define a new 'host' option for the webconsole route

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • documentation
    • None

      Now if you want to expose the webconsole for every AMQ instance in your cluster you have to do it by including the appropriate entries in the CustomResource. Example:

      apiVersion: broker.amq.io/v1beta1
      kind: ActiveMQArtemis
      metadata:
        name: my-cluster
        application: my-cluster-app
      spec:
        console:
          expose: true
          sslEnabled: true
          sslSecret: my-tls-secret-console
        :
        :
        :

      These are the only options to customize how the webconsole is exposed:

      • spec.console.expose
      • spec.console.sslEnabled
      • spec.console.sslSecret

      Now, the operator is creating as many routes as replicas (spec.deploymentplan.size parameter) defined. But the current operator version does not allow to define which host will be used to expose the route, and it defines a route host following a pattern like this:

       

      <ActiveMQArtemis.metadata.name>-wconsj-<POD_number>-svc-rte-<namespace_name>.<OpenShift_domain>

       

      Example (for a cluster composed of two nodes):

      • Route-0: my-cluster-wconsj-0-svc-rte-mynamespace.subdomain.domain.org
      • Route-1: my-cluster-wconsj-1-svc-rte-mynamespace.subdomain.domain.org

       

      There are many OpenShift clusters deployed with a topology which includes different routers configured, creating a logical segmentation (for example, one router is used for the namespaces belonging to production environment, a different one is used for preproduction, and so on).

      Therefore, the router can be configured to filter the host names by applying a pattern, in order to discard incoming request not matching the configured pattern. In this scenario, the generated host for the webconsole route does not match the router filter, and the AMQ webconsole is not accessible.

      We need to include a new optional "host" parameter in order to customize the exposed webconsole route by defining a user defined pattern. As the operator needs to create a different OpenShift route per running POD, one wildcard can be used to set which position in the host string will be replaced by the POD number.

      Example proposed (the wildcard character is '#' ):

      apiVersion: broker.amq.io/v1beta1
      kind: ActiveMQArtemis
      metadata:
        name: my-cluster
        application: my-cluster-app
      spec:
        console:
          expose: true
          sslEnabled: true
          sslSecret: my-tls-secret-console
          host: amq7-console-#-production.subdomain.domain.org

      The above configuration would generate routes like this:

      • POD 0: amq7-console-0-production.subdomain.domain.org
      • POD 1: amq7-console-1-production.subdomain.domain.org

      The rest of the operator behaviour will remain as is: every route will point to the appropriate service which gives access to the POD.

       

       

       

       

       

       

            jcliffor@redhat.com John Clifford
            ryanezil Rafael Yáñez Illescas
            Mikhail Krutov Mikhail Krutov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: