-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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:
dataplaneapi/discovery/consul_service_discovery_instance.go
Lines 115 to 120 in b362aae
| case <-time.After(c.timeout): | |
| c.logDebug("discovery job reconciliation started") | |
| if err := c.updateServices(); err != nil { | |
| // c.log.Errorf("error while updating service: %w", err) | |
| c.stop() | |
| } |
This section misses UpdateParams call:
dataplaneapi/discovery/consul_service_discovery_instance.go
Lines 101 to 108 in b362aae
| err := c.discoveryConfig.UpdateParams(discoveryInstanceParams{ | |
| Allowlist: c.params.ServiceAllowlist, | |
| Denylist: c.params.ServiceDenylist, | |
| LogFields: c.logFields, | |
| ServerSlotsBase: int(*c.params.ServerSlotsBase), | |
| SlotsGrowthType: *c.params.ServerSlotsGrowthType, | |
| SlotsIncrement: int(c.params.ServerSlotsGrowthIncrement), | |
| }) |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working