diff --git a/internal/metrics/logfilemetricexporter/factory.go b/internal/metrics/logfilemetricexporter/factory.go index 914652415..908915603 100644 --- a/internal/metrics/logfilemetricexporter/factory.go +++ b/internal/metrics/logfilemetricexporter/factory.go @@ -112,11 +112,18 @@ func newLogMetricsExporterContainer(exporter loggingv1a1.LogFileMetricExporter, Protocol: v1.ProtocolTCP, }, } - exporterContainer.Command = []string{"/bin/bash"} - exporterContainer.Args = []string{"-c", - "/usr/local/bin/log-file-metric-exporter -verbosity=2 -dir=/var/log/pods -http=:2112 -keyFile=/etc/logfilemetricexporter/metrics/tls.key -crtFile=/etc/logfilemetricexporter/metrics/tls.crt -secureMetrics -tlsMinVersion=" + - tls.MinTLSVersion(tlsProfileSpec) + " -cipherSuites=" + strings.Join(tls.TLSCiphers(tlsProfileSpec), ",") + - " -groups=" + strings.Join(tls.TLSGroups(tlsProfileSpec), ",")} + exporterContainer.Command = []string{"/usr/local/bin/log-file-metric-exporter"} + exporterContainer.Args = []string{ + "-verbosity=2", + "-dir=/var/log/pods", + "-http=:2112", + "-keyFile=/etc/logfilemetricexporter/metrics/tls.key", + "-crtFile=/etc/logfilemetricexporter/metrics/tls.crt", + "-secureMetrics", + "-tlsMinVersion=" + tls.MinTLSVersion(tlsProfileSpec), + "-cipherSuites=" + strings.Join(tls.TLSCiphers(tlsProfileSpec), ","), + "-groups=" + strings.Join(tls.TLSGroups(tlsProfileSpec), ","), + } exporterContainer.VolumeMounts = []v1.VolumeMount{ {Name: logContainers, ReadOnly: true, MountPath: logContainersValue},