1
0
Fork 0

Try Fix Swarm connection

This commit is contained in:
Joao Gilberto Magalhaes 2023-02-26 20:58:43 -06:00
parent 4d54fede5c
commit 3cc9547388

View file

@ -171,9 +171,9 @@ class Swarm(ProcessorInterface):
break
network_list.append(endpoint["NetworkID"])
# add the network ha_proxy_network_id to the service object
if ip_address is None:
network_list.append(ha_proxy_network_id)
service.update(networks = network_list)
self.client.networks.get(ha_proxy_network_id).connect(service.name)
continue # skip to the next service to give time to update the network
self.parsed_object[ip_address] = service.attrs["Spec"]["Labels"]