Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Prometheus /metrics endpoint #177

Merged
merged 2 commits into from
Aug 24, 2020
Merged

Enable Prometheus /metrics endpoint #177

merged 2 commits into from
Aug 24, 2020

Conversation

JohnStarich
Copy link
Member

Adds prometheus /metrics endpoint and ServiceMonitor configuration, which Prometheus Operator can pick up. Requires RBAC authentication to use it. Details in the kubebuilder handbook. Essentially need to run this to configure access manually:

kubectl create clusterrolebinding metrics --clusterrole=ibmcloud-operators-metrics-reader --serviceaccount=<namespace>:<service-account-name>

After injecting a debug container, I was able to display the raw metrics:

image

Fixes #122

@JohnStarich JohnStarich changed the title Feature/metrics Enable Prometheus /metrics endpoint Aug 22, 2020
@codecov
Copy link

codecov bot commented Aug 22, 2020

Codecov Report

Merging #177 into master will increase coverage by 1.88%.
The diff coverage is 43.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   41.46%   43.34%   +1.88%     
==========================================
  Files          13        5       -8     
  Lines        1423      879     -544     
==========================================
- Hits          590      381     -209     
+ Misses        714      411     -303     
+ Partials      119       87      -32     
Impacted Files Coverage Δ
controllers/configmap.go 0.00% <0.00%> (ø)
controllers/secret.go 25.00% <25.00%> (ø)
controllers/binding_controller.go 37.88% <37.88%> (ø)
controllers/service_controller.go 48.71% <48.71%> (ø)
controllers/token_controller.go 74.13% <74.13%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94d88f3...99cf492. Read the comment docs.

Copy link
Member

@vazirim vazirim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JohnStarich JohnStarich merged commit 297e83f into master Aug 24, 2020
@JohnStarich JohnStarich deleted the feature/metrics branch August 24, 2020 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose internal health metric for cloud-operator
2 participants