artemiscloud / activemq-artemis-operator

Apache License 2.0
69 stars 63 forks source link

Operator cannot access broker status when console is secured with pem cert #962

Closed gaohoward closed 4 months ago

gaohoward commented 5 months ago

Describe the bug If the console is sslEnabled with a certificate from cert-manager (i.e. pem format cert) the operator cannot update the status and the Conditions shows UnableToRetrieveStatus reason. for example

  - lastTransitionTime: "2024-06-19T04:02:30Z"
    message: 'Get "http://HMwwfpiz:***@artemis-broker-ss-0.artemis-broker-hdls-svc.default.svc.cluster.local:8161/console/jolokia/read/org.apache.activemq.artemis:broker=%22amq-broker%22/Status":
      net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x03\x00\x02\x02P"'
    reason: UnableToRetrieveStatus
    status: Unknown
    type: BrokerPropertiesApplied
  - lastTransitionTime: "2024-06-19T04:02:41Z"
    message: 'Get "http://HMwwfpiz:***@artemis-broker-ss-0.artemis-broker-hdls-svc.default.svc.cluster.local:8161/console/jolokia/read/org.apache.activemq.artemis:broker=%22amq-broker%22/Status":
      net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x03\x00\x02\x02P"'
    reason: UnableToRetrieveStatus
    status: Unknown
    type: BrokerVersionAligned

The reason is that when using pem cert the jolokia couldn't get correct protocols and uses 'http' protocol. It should use 'https' protocol.

[!TIP] Vote this issue reacting with :+1: or :-1: