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

[LTS] [Operator] Expose custom annotations in deployment spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • AMQ 7.10.0.OPR.3.GA
    • operator

      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
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: