Skip to content

Commit c0c2fec

Browse files
committed
Running prom endpoint test in tools pod
1 parent 8c587e4 commit c0c2fec

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

api/v1/search/mongodbsearch_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ func (s *MongoDBSearch) GetMongotMetricsPort() int32 {
234234
return MongotDefaultPrometheusPort
235235
}
236236

237+
//nolint:gosec
237238
return int32(s.Spec.Prometheus.Port)
238239
}
239240

controllers/searchcontroller/mongodbsearch_reconcile_helper.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ func createMongotConfig(search *searchv1.MongoDBSearch, db SearchSourceDBResourc
391391
if prometheus := search.GetPrometheus(); prometheus != nil {
392392
port := search.GetMongotMetricsPort()
393393
if prometheus.Port != 0 {
394+
//nolint:gosec
394395
port = int32(prometheus.Port)
395396
}
396397
config.Metrics = mongot.ConfigMetrics{

0 commit comments

Comments
 (0)