kubernetes-ingresshaproxy-ingress

haproxy-ingress not doing health check on TCP service


I have haproxy-ingress set up on my kubernetes cluster. It is working fine, I needed to set up memcached, deployed it and configured my haproxy-ingress with tcp-services-configmap and my configmap is as follows for the TCP services:

apiVersion: v1 kind: ConfigMap metadata: name: haproxy-ingress-tcp namespace: ingress-controller data: "11211": "default/memcached:11211"

Everything works and I can access memcached on port 11211, when I log onto the stats page for haproxy-ingress, I can see the load balancing working for the 3 memcached instances but they are grey "not checked" in the haproxy stat page (I would expect them to be green (checked)). Is there anyway to have haproxy-ingress do a status check on TCP ports?


Solution

  • Since v0.10-beta.1 the tcp-service has a new positional config option which allows you to configure the time between tcp health checks. The default value is 2s if not declared.

    From the doc:

    <check-interval>, added in v0.10, optional and defaults to 2s, configures a TCP check interval. Declare - (one single dash) as the time to disable it. Valid time is a number and a mandatory suffix: us, ms, s, m, h or d.