dataplaneapi
dataplaneapi copied to clipboard
Consul discovery: parameters are not considered
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
Thank you for the report, it is a bug.
This should be fixed with: https://github.com/haproxytech/dataplaneapi/commit/e50c24281e183a38882a048502769f55aab36df1