Merge pull request #51495 from akerouanton/revert-a8b9eff90

libnet: create DNS records on sbJoin (if not agent node)
This commit is contained in:
Albin Kerouanton
2025-11-13 20:02:28 +01:00
committed by GitHub
2 changed files with 29 additions and 5 deletions

View File

@@ -348,10 +348,8 @@ func (sb *Sandbox) populateNetworkResources(ctx context.Context, ep *Endpoint) (
// Populate DNS records.
n := ep.getNetwork()
if !n.getController().isAgent() {
if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
}
if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
}
if err := ep.addDriverInfoToCluster(); err != nil {