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

[Operator] Expose custom annotations in deployment spec

XMLWordPrintable

      When you apply an ActiveMQArtemis custom resource and you have defined some custom annotations (because you might need them for any purpose), those annotations are propagated to the StatefulSet, but they are not propagated to the PODs managed by the Statefulset.

       

      apiVersion: broker.amq.io/v2alpha5
      kind: ActiveMQArtemis
      metadata: 
        annotations: 
          my.annotation/custom: myvalue
      spec: 
        adminUser: adminuser
        deploymentPlan: 
          size: 2
      :
      :
      : 

      All annotations configured explicitly in the custom resource should be propagated to every running POD as well. In the example above, the pods should be annotated with my.annotation/custom: myvalue

       

      For example, one common use case is to declare Prometheus annotations (if you're not declaring a Servicemonitor) to scrape your PODs, this way:

      annotations: 
        prometheus.io/path: /metrics
        prometheus.io/port: 9404
        prometheus.io/scheme: http
        prometheus.io/scrape: "true"
      

       

              gaohoward Howard Gao
              ryanezil Rafael Yáñez Illescas
              Roman Vais Roman Vais (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: