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

Allow option http-keep-alive and TLS backends #343

Closed
smerschjohann opened this issue Aug 5, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@smerschjohann
Copy link

commented Aug 5, 2017

Hi,

I looked at the the haproxy template and found some configurations that I would like to change which is currently not possible:

  • support for http-keep-alive instead of http-server-close
  • support for HTTPs backends like server srv01 10.20.30.40:443 weight 1 maxconn 100 check ssl verify none

Is there a particular reason why you chose http-server-close over http-keep-alive?

@tamalsaha tamalsaha added this to the 3.2.0 milestone Aug 6, 2017

@tamalsaha

This comment has been minimized.

Copy link
Member

commented Aug 7, 2017

@smerschjohann , we can make both of these configurable. This will be part of next 3.2.0 release.

Is there a particular reason why you chose http-server-close over http-keep-alive? We don't remember why. We can picked something when we started. :)

@smerschjohann

This comment has been minimized.

Copy link
Author

commented Aug 7, 2017

Ah cool 👍 I'll wait for that release then :)

@greg-jaunt

This comment has been minimized.

Copy link

commented Aug 15, 2017

Looks like I need this too. Connections to my service fail with the default http-server-close mode.

@sadlil

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2017

@greg-jaunt @smerschjohann in our 3.1.* version there is an work around to add option http-keep-alive in the beackend rules.
if you set option http-keep-alive as backendRules this will apply http-keep-alive for that specif options.

tamalsaha added a commit that referenced this issue Aug 18, 2017

Allow custom options (#403)
Fix #343 

Supports all valid options for defaults section of HAProxy config from the list from here
https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-option%20abortonclose

Expects a json encoded map
ie: "ingress.alpha.appscode.com/default-option": {"http-keep-alive": "true", "dontlognull": "true", "clitcpka": "false"}
This will be appended in the defaults section of HAProxy as
```
   option http-keep-alive
   option dontlognull
   no option clitcpka
```

It is upto user to provide valid configurations. Providing invalid options will not run HAProxy. The log will display something like
```
daemon.err: Aug 18 06:14:41 reloader:  [ALERT] 229/061441 (37) : parsing [/etc/haproxy/haproxy.cfg:21]: negation/default is not supported for option 'invalid-options-false'.
daemon.err: Aug 18 06:14:41 reloader: [ALERT] 229/061441 (37) : parsing [/etc/haproxy/haproxy.cfg:22] : unknown option 'invalid-options-true'.
daemon.err: Aug 18 06:14:41 reloader: [ALERT] 229/061441 (37) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
daemon.err: Aug 18 06:14:41 reloader: [ALERT] 229/061441 (37) : Fatal errors found in configuration.
daemon.err: Aug 18 06:14:41 reloader: I0818 06:14:41.308405      18 mount.go:140] failed to run cmd

```

tamalsaha added a commit that referenced this issue Dec 13, 2017

Allow custom options (#403)
Fix #343 

Supports all valid options for defaults section of HAProxy config from the list from here
https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-option%20abortonclose

Expects a json encoded map
ie: "ingress.alpha.appscode.com/default-option": {"http-keep-alive": "true", "dontlognull": "true", "clitcpka": "false"}
This will be appended in the defaults section of HAProxy as
```
   option http-keep-alive
   option dontlognull
   no option clitcpka
```

It is upto user to provide valid configurations. Providing invalid options will not run HAProxy. The log will display something like
```
daemon.err: Aug 18 06:14:41 reloader:  [ALERT] 229/061441 (37) : parsing [/etc/haproxy/haproxy.cfg:21]: negation/default is not supported for option 'invalid-options-false'.
daemon.err: Aug 18 06:14:41 reloader: [ALERT] 229/061441 (37) : parsing [/etc/haproxy/haproxy.cfg:22] : unknown option 'invalid-options-true'.
daemon.err: Aug 18 06:14:41 reloader: [ALERT] 229/061441 (37) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
daemon.err: Aug 18 06:14:41 reloader: [ALERT] 229/061441 (37) : Fatal errors found in configuration.
daemon.err: Aug 18 06:14:41 reloader: I0818 06:14:41.308405      18 mount.go:140] failed to run cmd

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.