Skip to content

Allow service healthcheck body#12468

Open
aek wants to merge 20 commits intotraefik:masterfrom
aekis-dev:healthcheck-allow-body
Open

Allow service healthcheck body#12468
aek wants to merge 20 commits intotraefik:masterfrom
aekis-dev:healthcheck-allow-body

Conversation

@aek
Copy link

@aek aek commented Dec 24, 2025

What does this PR do?

This allow to define a body in the healthcheck of a service in order to be able to use it for example to send jsonrpc requests like this one that works for all Odoo versions

  services:
    odoo-2abc75a5:
      loadBalancer:
        servers:
        - url: http://localhost:8069
        healthcheck:
          path: "/jsonrpc"
          method: "POST"
          interval: "10s"
          timeout: "3s"
          headers:
            Content-Type: "application/json"
          body: '{"jsonrpc": "2.0","method": "call", "params": {"service": "db", "method": "db_exist", "args": ["your_db_name"]}}'

Motivation

The need to be able to send jsonrpc requests to healthcheck Odoo instances that works for all the Odoo versions available
I have also seen that this was already requested in #10055

More

  • Added examples to the docs

rtribotte and others added 6 commits December 29, 2025 16:19
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
…to be able to use it for example to send jsonrpc requests like this one that works for all Odoo versions

  services:
    odoo-2abc75a5:
      loadBalancer:
        servers:
        - url: http://localhost:8069
        healthcheck:
          path: "/jsonrpc"
          method: "POST"
          interval: "10s"
          timeout: "3s"
          headers:
            Content-Type: "application/json"
          body: '{"jsonrpc": "2.0","method": "call", "params": {"service": "db", "method": "db_exist", "args": ["your_db_name"]}}'
@aek aek force-pushed the healthcheck-allow-body branch from 0f900be to 9e7b90d Compare December 29, 2025 22:32
@nmengin
Copy link
Contributor

nmengin commented Jan 5, 2026

Hey @aek,

Thanks for this!

We've set this to "review" and will review the code.
We'll update you once the review is done.

@nmengin nmengin added this to the next milestone Jan 5, 2026
Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aek

Could you please add unit tests

aek and others added 2 commits January 30, 2026 18:49
as suggested by mmatur let's make it more open

Co-authored-by: Michael <mmatur@users.noreply.github.com>
Co-authored-by: Michael <mmatur@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants