This PR adds a command-line flag to boostrapper for setting its metrics port, and configures its controller-manager to host a metrics exporter at that port.
Run make build local-dev. Then port-forward to the bootstrapper's metrics port, and curl it:
branden@crateria managed-control-planes % k -n upbound-system port-forward pod/upbound-bootstrapper-76898f57c7-bc42w 8085:8085 2>&1 >/dev/null &
[1] 15261
branden@crateria managed-control-planes % curl -s localhost:8085/metrics | head
# HELP certwatcher_read_certificate_errors_total Total number of certificate read errors
# TYPE certwatcher_read_certificate_errors_total counter
certwatcher_read_certificate_errors_total 0
# HELP certwatcher_read_certificate_total Total number of certificate reads
# TYPE certwatcher_read_certificate_total counter
certwatcher_read_certificate_total 0
# HELP controller_runtime_active_workers Number of currently used workers per controller
# TYPE controller_runtime_active_workers gauge
controller_runtime_active_workers{controller="aws-marketplace"} 0
# HELP controller_runtime_max_concurrent_reconciles Maximum number of concurrent reconciles per controller
branden@crateria managed-control-planes %
Description of your changes
This PR adds a command-line flag to boostrapper for setting its metrics port, and configures its controller-manager to host a metrics exporter at that port.
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
Apply the following values overrides:
Run
make build local-dev
. Then port-forward to the bootstrapper's metrics port, and curl it: