Skip to content

Commit

Permalink
fix: exporter panic on malformed endpoint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter0195 committed Feb 21, 2024
1 parent d9e1d16 commit 3bb5fdf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ func (o *PrometheusExporterParser) Ports() ([]corev1.ServicePort, error) {
},
)
} else {
ports = append(
ports, *singlePortFromConfigEndpoint(o.logger, o.name, o.config),
)
if port := singlePortFromConfigEndpoint(o.logger, o.name, o.config); port != nil {
ports = append(ports, *port)
}
}

return ports, nil
Expand Down

0 comments on commit 3bb5fdf

Please sign in to comment.