Skip to content

Commit 9348e8b

Browse files
Merge pull request #271 from vyzigold/default_prometheu_port
Add default prometheus port to consts
2 parents a822bb6 + d944e12 commit 9348e8b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

controllers/autoscaling_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (r *AutoscalingReconciler) reconcileNormal(
408408
instance.Status.PrometheusHost = instance.Spec.PrometheusHost
409409
}
410410
if instance.Spec.PrometheusPort == 0 {
411-
instance.Status.PrometheusPort = 9090
411+
instance.Status.PrometheusPort = metricstorage.DefaultPrometheusPort
412412
} else {
413413
instance.Status.PrometheusPort = instance.Spec.PrometheusPort
414414
}

pkg/metricstorage/const.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const (
2222
DefaultServiceName = "metric-storage"
2323
// DefaultPvcStorageRequest -
2424
DefaultPvcStorageRequest = "20G"
25+
// DefaultPrometheusPort -
26+
DefaultPrometheusPort = 9090
2527
// DefaultNodeExporterPort -
2628
DefaultNodeExporterPort = 9100
2729
// DefaultScrapeInterval -

0 commit comments

Comments
 (0)