Skip to content

Commit 5cfd167

Browse files
joelanfordlilic
andauthored
Update doc/user/metrics/README.md
Co-Authored-By: LiliC <cosiclili@gmail.com>
1 parent 28dd07c commit 5cfd167

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/user/metrics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
The `func ExposeMetricsPort(ctx context.Context, port int32) (*v1.Service, error)` is a helper function that exposes general metrics about the running program. These metrics are inherited from controller-runtime. The metrics are by default served on `:8383/metrics`. A [Service][service] object is created with the metrics port exposed, which can be then accessed by Prometheus. The Service object is [garbage collected][gc] by the owner, which is determined based on the pods owner in which the leader is running in.
88

9-
To modify the port the metrics are exposed on, change the variable `metricsHost string = ":8383"` variable in the `cmd/manager/main.go` file of the generated operator.
9+
By default, the metrics are served on `0.0.0.0:8383/metrics`. To modify the port the metrics are exposed on, change the `var metricsPort int32 = 8383` variable in the `cmd/manager/main.go` file of the generated operator.
1010

1111
### Usage:
1212

0 commit comments

Comments
 (0)