Hi, I have a question regarding the usage of some Data Plane API APIs that wrap the Runtime API. I’m using HAProxy 3.2.6.
I specified a resolvers section in my HAProxy configuration similarly to the following example, along with an empty backend section:
resolvers mydns
nameserver dns1 192.168.50.30:53
accepted_payload_size 8192
backend webservers
I would like to add a new server to the backend section by specifying only the FQDN and linking that server to the configured resolvers section. In a normal HAProxy configuration, I would add something like this and restart the service:
backend webservers
server s1 s1.example.com:8080 check resolvers mydns
However, I want to use the Runtime API through the Data Plane API, since I do not know the servers in advance.
If I understood correctly, this is not possible with the add server (doc here) and set server (doc here) Runtime API commands. I see that set server can update an existing server, but in principle, how can I add a new server with an FQDN linked to a resolver if add server does not seem to support an fqdn parameter or a way to reference a resolvers section?
The mapped commands in the Data Plane API are: POST /services/haproxy/runtime/backends/{parent_name}/servers (doc here), and PUT /services/haproxy/runtime/backends/{parent_name}/servers/{name} (doc here). It does not seem possible to pass the FQDN and resolvers instead of the IP address of a new server.
Thank you in advance.