Closed saggiyogesh closed 2 months ago
This seems to be the type of config that can be added via a config snippet, doc here. HAProxy has tons of config options, and we choose to add as our config keys just the ones harder to be configured otherwise.
@jcmoraisjr is this correct way to configure
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
haproxy-ingress.github.io/balance-algorithm: roundrobin
haproxy-ingress.github.io/maxconn-server: "500"
haproxy-ingress.github.io/ssl-redirect: "false"
haproxy-ingress.github.io/config-backend: |
retry-on 503 502
retries 3
It seems correct to my understanding, since they both can configured in the backend.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
haproxy-ingress.github.io/config-backend: |
retry-on 503
retries 100
timeout connect 30
creationTimestamp: '2024-07-03T11:56:37Z'
generation: 5
name: nginx
namespace: default
resourceVersion: '126319'
uid: 786e57fd-f12b-4236-ac37-0390c11b8043
spec:
ingressClassName: haproxy
rules:
- host: nginx.a-b.deploy.in
http:
paths:
- backend:
service:
name: nginx-service
port:
number: 80
pathType: ImplementationSpecific
@jcmoraisjr The above config seems not to be working, as there's no delay in response to the client in case of a 503 error. Any way to debug this ?
@saggiyogesh I would suggest you first exec into the container to check if the /etc/haproxy/haproxy.cfg
was generated correctly
This issue got stale and will be closed in 7 days.
What are you trying to do
Trying to use
retry-on
option with ingressretry-on
is available with haproxy as per below doc link https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#retry-onAny way to configure it with ingresses.