dataplaneapi icon indicating copy to clipboard operation
dataplaneapi copied to clipboard

Consul discovery: parameters are not considered

Open DXInfinity opened this issue 3 years ago • 1 comments

I'm adding consul discovery using dataplaneapi and found that some parameters are not considered during discovery process. { "name": "test-consul", "address": "127.0.0.1", "port": 2222, "enabled": true, "retry_timeout": 10, "service_allowlist": [ "test-ext-service" ] } service_allowlist is not applied. Discovery process tries to add backends for ALL registered services. The problem is here: https://github.com/haproxytech/dataplaneapi/blob/b362aae0b04d0e330bd9dcfbf9f315b670de013b/discovery/consul_service_discovery_instance.go#L115-L120 This section misses UpdateParams call: https://github.com/haproxytech/dataplaneapi/blob/b362aae0b04d0e330bd9dcfbf9f315b670de013b/discovery/consul_service_discovery_instance.go#L101-L108

DXInfinity avatar Nov 03 '21 11:11 DXInfinity

Thank you for the report, it is a bug.

mjuraga avatar Nov 23 '21 13:11 mjuraga

This should be fixed with: https://github.com/haproxytech/dataplaneapi/commit/e50c24281e183a38882a048502769f55aab36df1

mjuraga avatar Sep 29 '22 10:09 mjuraga