diff --git a/internal/controller/operator/factory/build/container.go b/internal/controller/operator/factory/build/container.go index 9f8c933765..4695da578d 100644 --- a/internal/controller/operator/factory/build/container.go +++ b/internal/controller/operator/factory/build/container.go @@ -781,7 +781,7 @@ func AddOTLPGRPCArgsTo(dst []string, grpcSpec *vmv1.OTLPGRPCSpec, tlsServerConfi tlsC := grpcSpec.TLSConfig if tlsC == nil { - return dst + return append(dst, "-otlpGRPC.tls=false") } dst = append(dst, "-otlpGRPC.tls=true") switch { diff --git a/internal/controller/operator/factory/build/container_test.go b/internal/controller/operator/factory/build/container_test.go index 0e2b2649b7..35730015b1 100644 --- a/internal/controller/operator/factory/build/container_test.go +++ b/internal/controller/operator/factory/build/container_test.go @@ -464,6 +464,7 @@ func TestAddOTLPGRPCArgsTo(t *testing.T) { // no tls f(&vmv1.OTLPGRPCSpec{ListenPort: 4317}, []string{ "-otlpGRPCListenAddr=:4317", + "-otlpGRPC.tls=false", }) // with tls, cert/key from files