Description
Hello
Thanks so much for the HA Proxy Data Plane API, it's a great tool that really helps automating HAProxy.
I am currently using HAproxy in front of an EKS Kubernetes cluster, where servers (AWS EC2s) get created and removed frequently. To automate HAProxy, I using the AWS EC2 discovery service as per here and can get everything working on single port configurations. Here is an example back-end created by the service:
backend aws-ap-northeast-1-test-test-30000-32767 from unnamed_defaults_1
server SRV_GvirR 10.115.2.134:80 check weight 128
server SRV_uXKF0 127.0.0.1:80 disabled weight 128
server SRV_VmDV3 127.0.0.1:80 disabled weight 128
# ...
However, the configuration I am hoping for should be like this, i.e. without the port being set so that I can forward the whole Kubernetes NodePort range:
backend eks from unnamed_defaults_1
server ip-10-115-2-134 10.115.2.134 check port 32767
server ip-10-115-1-80 10.115.1.80 check port 32767
server ip-10-115-1-62 10.115.1.62 check port 32767
# ...
I tried various approaches such as setting either the HAProxy:Service:Port
or HAProxy:Instance:Port
EC2 tags to an empty string or * but it doesn't seem to work.
Is there a way to not set the server port when using AWS EC2 discovery service?