Skip to content

Commit

Permalink
Merge pull request #4889 from hashicorp/f-service-meta
Browse files Browse the repository at this point in the history
Pass service metadata "external-source" for consul UI integration
  • Loading branch information
preetapan committed Nov 16, 2018
2 parents fff2d6f + 3cf22d2 commit 5003f51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions command/agent/consul/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,10 @@ func (c *ServiceClient) RegisterAgent(role string, services []*structs.Service)
Tags: service.Tags,
Address: host,
Port: port,
// This enables the consul UI to show that Nomad registered this service
Meta: map[string]string{
"external-source": "nomad",
},
}
ops.regServices = append(ops.regServices, serviceReg)

Expand Down Expand Up @@ -660,6 +664,10 @@ func (c *ServiceClient) serviceRegs(ops *operations, service *structs.Service, t
Tags: tags,
Address: ip,
Port: port,
// This enables the consul UI to show that Nomad registered this service
Meta: map[string]string{
"external-source": "nomad",
},
}
ops.regServices = append(ops.regServices, serviceReg)

Expand Down

0 comments on commit 5003f51

Please sign in to comment.