geographybuff opened a new pull request, #2832:
URL: https://github.com/apache/activemq/pull/2832

   Fixes #1999.
   
   With default values, the chart's liveness probe sends an unauthenticated 
`GET /admin/` to the web console. The console requires a login, so the probe 
gets a 401 and the kubelet restarts the broker about every 70 seconds. This PR 
changes the liveness probe to `tcpSocket` on the OpenWire port, the same check 
the startup and readiness probes already use.
   
   It also adds a README note on overriding probes. Helm merges a user's 
`livenessProbe` with the default, so setting `tcpSocket` on the old chart 
produced a probe with two handlers and the install failed (`may not specify 
more than 1 handler type`). Setting the default handler to `null` avoids that, 
and the README now shows it with a tested example.
   
   The Authorization-header workaround from the issue comment doesn't work on 
the current image (6.2.1): `/admin/` answers 403 even with valid credentials, 
and the probe treats 403 as a failure.
   
   ## Testing
   
   kind v0.33.0, Kubernetes 1.37.0, Helm 4.3, image `apache/activemq:6.2.1`.
   
   | Case | Result |
   |---|---|
   | `main`, default values | Restarted 3 times in 4 minutes. Events: `Liveness 
probe failed: HTTP probe failed with statuscode: 401` |
   | `main`, `livenessProbe.tcpSocket` set in values | Install rejected: 
`livenessProbe.tcpSocket: Forbidden: may not specify more than 1 handler type` |
   | `main`, Authorization header from the issue | Restarted 4 times in 5 
minutes. Events: `statuscode: 403` |
   | This branch, default values | 0 restarts in 5.5 minutes, no probe failures 
|
   | This branch, the README's `exec` example (`tcpSocket: null`) | 0 restarts 
in 5.5 minutes, no probe failures |
   | `curl` inside the pod | `/admin/`: 401 without login, 403 with 
`admin:admin`. `/admin/index.jsp`: 200 with `admin:admin` |
   | `helm lint` | Pass |
   
   Not tested: Kubernetes versions other than 1.37, a broker that hangs while 
its OpenWire port still accepts connections (a TCP probe won't catch that, just 
as the current readiness probe won't), and installs with 
`service.openwire.enabled=false`, where all three probes reference a port that 
doesn't exist, as they did before this change.
   
   AI disclosure: Claude Code wrote this change and this description, and ran 
the tests.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to