Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in adding option inside backend #338

Open
Azteker opened this issue Jun 27, 2024 · 2 comments
Open

Problem in adding option inside backend #338

Azteker opened this issue Jun 27, 2024 · 2 comments

Comments

@Azteker
Copy link

Azteker commented Jun 27, 2024

This is what the backend I want is like

backend backend_name1
   mode http
   option httpchk
   option forwarded

However, the api /v2/services/haproxy/configuration/backends does not support parameter to add the option

@smeroth
Copy link

smeroth commented Nov 6, 2024

Please add the option within a defaults section.

defaults options_for_frontend_and_backend_1
  option http
  option httplog
  option forwardfor
  timeout client 30000
  timeout server 30000
  ...

defaults options_for_frontend_and_backend_2
  option tcp
  option tcplog
  timeout connect 5000
  timeout client 10000
  timeout server 10000
  ...

frontend           frontend_name1   from   options_for_frontend_and_backend_1
   default_backend  backend_name1

backend             backend_name1   from   options_for_frontend_and_backend_1
   server ...

It should solve your issue.

@mjuraga
Copy link
Collaborator

mjuraga commented Nov 7, 2024

Hi @Azteker which options do you need, what you described could be set with something like:

{
  "name": "backend_name1",
  "mode": "http",
  "adv_check": "httpchk",
  "forwardfor": "enabled"
}

This should translate to what you are trying to do in the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants