Skip to content

Commit

Permalink
prometheus name from env
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhi.li committed Sep 7, 2023
1 parent 8385948 commit c182d6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/apis/minio.min.io/v2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ const DefaultMonitoringInterval = 3
// PrometheusNamespace is the namespace of the prometheus
const PrometheusNamespace = "PROMETHEUS_NAMESPACE"

// PrometheusName is the name of the prometheus
const PrometheusName = "PROMETHEUS_NAME"

// DefaultPrometheusNamespace is the default namespace for prometheus
const DefaultPrometheusNamespace = "default"

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/minio.min.io/v2/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ func GetPrometheusNamespace() string {
// GetPrometheusName returns namespace of the prometheus managed by prometheus operator
func GetPrometheusName() string {
prometheusNameOnce.Do(func() {
prometheusName = envGet(prometheusName, "")
prometheusName = envGet(PrometheusName, "")
})
return prometheusName
}
Expand Down

0 comments on commit c182d6d

Please sign in to comment.