Skip to content

Commit

Permalink
Fix gRPC flags for OpenShift
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Jiro committed Oct 16, 2021
1 parent 2505d69 commit dda35cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/config/tls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ func Update(jaeger *v1.Jaeger, commonSpec *v1.JaegerCommonSpec, options *[]strin
return
}

if len(util.FindItem("--reporter.grpc.host-port=", *options)) != 0 {
return
}

volume := corev1.Volume{
Name: configurationVolumeName(jaeger),
VolumeSource: corev1.VolumeSource{
Expand Down
3 changes: 2 additions & 1 deletion pkg/deployment/all_in_one.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func (a *AllInOne) Get() *appsv1.Deployment {
// even though the agent is in the same process as the collector, they communicate via gRPC, and the collector has TLS enabled,
// as it might receive connections from external agents
if viper.GetString("platform") == v1.FlagPlatformOpenShift {
if len(util.FindItem("--reporter.grpc.tls.enabled=", options)) == 0 {
if len(util.FindItem("--reporter.grpc.host-port=", options)) == 0 &&
len(util.FindItem("--reporter.grpc.tls.enabled=", options)) == 0 {
options = append(options, "--reporter.grpc.tls.enabled=true")
options = append(options, fmt.Sprintf("--reporter.grpc.tls.ca=%s", ca.ServiceCAPath))
options = append(options, fmt.Sprintf("--reporter.grpc.tls.server-name=%s.%s.svc.cluster.local", service.GetNameForHeadlessCollectorService(a.jaeger), a.jaeger.Namespace))
Expand Down

0 comments on commit dda35cd

Please sign in to comment.