Skip to content

Commit

Permalink
Enabled DNS as the service discovery mechanism for agent => collector…
Browse files Browse the repository at this point in the history
… communication

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling committed Mar 19, 2019
1 parent ca44c74 commit ff3856e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/deployment/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (a *Agent) Get() *appsv1.DaemonSet {

args := append(a.jaeger.Spec.Agent.Options.ToArgs(),
"--reporter.type=grpc",
fmt.Sprintf("--reporter.grpc.host-port=%s:14250", service.GetNameForCollectorService(a.jaeger)))
fmt.Sprintf("--reporter.grpc.host-port=dns:///%s:14250", service.GetNameForCollectorService(a.jaeger)))
trueVar := true
labels := a.labels()

Expand Down
5 changes: 4 additions & 1 deletion pkg/inject/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func Select(target *appsv1.Deployment, availableJaegerPods *v1.JaegerList) *v1.J
}

func container(jaeger *v1.Jaeger) corev1.Container {
args := append(jaeger.Spec.Agent.Options.ToArgs(), fmt.Sprintf("--collector.host-port=%s.%s:14267", service.GetNameForCollectorService(jaeger), jaeger.Namespace))
args := append(jaeger.Spec.Agent.Options.ToArgs(),
"--reporter.type=grpc",
fmt.Sprintf("--reporter.grpc.host-port=dns:///%s.%s:14250", service.GetNameForCollectorService(jaeger), jaeger.Namespace),
)
return corev1.Container{
Image: jaeger.Spec.Agent.Image,
Name: "jaeger-agent",
Expand Down

0 comments on commit ff3856e

Please sign in to comment.