Skip to content

Commit

Permalink
Fix getPrometheusExporterPorts incorrectly matching to prometheusremo…
Browse files Browse the repository at this point in the history
…tewrite exporter
  • Loading branch information
hzhhong committed Aug 16, 2023
1 parent 4558192 commit 838d536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/manifests/collector/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ func getPrometheusExporterPorts(c map[interface{}]interface{}) ([]corev1.Contain
if exporters, ok := c["exporters"]; ok && exporters != nil {
for e, exporterConfig := range exporters.(map[interface{}]interface{}) {
exporterName := e.(string)
if strings.Contains(exporterName, "prometheus") {
// Note that receivers, processors, exporters and/or pipelines are defined via component identifiers in type[/name] format (e.g. otlp or otlp/2). Components of a given type can be defined more than once as long as the identifiers are unique.
if strings.Split(exporterName, "/")[0] == "prometheus" {
containerPort, err := getPrometheusExporterPort(exporterConfig.(map[interface{}]interface{}))
if err != nil {
errors = append(errors,
Expand Down

0 comments on commit 838d536

Please sign in to comment.