Skip to content

Commit 740242f

Browse files
committed
Merge branch 'lili/metrics-docs' of github.com:LiliC/operator-sdk into lili/metrics-docs
2 parents ae3f38b + 07da028 commit 740242f

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
@@ -4,7 +4,7 @@
44

55
## Metrics in operator-sdk
66

7-
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.
7+
The `func ExposeMetricsPort(ctx context.Context, port int32) (*v1.Service, error)` function exposes general metrics about the running program. These metrics are inherited from controller-runtime. This helper function creates a [Service][service] object with the metrics port exposed, which can then be accessed by Prometheus. The Service object is [garbage collected][gc] when the leader pod's root owner is deleted.
88

99
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

0 commit comments

Comments
 (0)