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

Issue-581 Make metrics exposable based on helm variables #582

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

joshsouza
Copy link
Contributor

Resolves: #581

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (88b9307) 85.12% compared to head (794565c) 85.91%.
Report is 1 commits behind head on master.

Files Patch % Lines
controllers/zookeepercluster_controller.go 70.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #582      +/-   ##
==========================================
+ Coverage   85.12%   85.91%   +0.79%     
==========================================
  Files          12       12              
  Lines        1613     1633      +20     
==========================================
+ Hits         1373     1403      +30     
+ Misses        155      145      -10     
  Partials       85       85              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jkhalack
Copy link
Contributor

Has there been any testing done to prove that the modified chart allows exposing metrics for Prometheus?

args:
- -metrics-bind-address={{ .Values.metricsBindAddress }}:{{ int .Values.metricsPort }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it have to be -metrics-bind-address or --metrics-bind-address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on:

flag.StringVar(&metricsAddr, "metrics-bind-address", "127.0.0.1:6000", "The address the metric endpoint binds to.")

And flag's documentation: https://pkg.go.dev/flag#hdr-Command_line_flag_syntax
My understanding is that it can be either. If there is a preference for double dashes, that's easy to adjust, but as -disableFinalizer below is a single dash, I went with single dash for consistency.

@joshsouza
Copy link
Contributor Author

Has there been any testing done to prove that the modified chart allows exposing metrics for Prometheus?

I utilized helm template when writing the code to ensure the appropriate adjustments to the k8s resources, and deploying it to a local kind cluster before/after with a second curl pod deployed to test connectivity validates that without these changes I am unable to curl <pod_ip>:6000/metrics (connection refused) beforehand, and with --set metricsBindAddress=0.0.0.0 in my helm update/install parameters, I am able to successfully reach the metrics endpoint from my curl pod afterwards.

While I didn't explicitly test that Prometheus itself was working, this should be a sufficient test to verify that the changes are functioning as intended, and should allow metrics gathering by other pods in the cluster.

Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

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

LGTM

@anishakj anishakj merged commit 2c8bfec into pravega:master Dec 14, 2023
5 checks passed
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.

Helm chart deployment does not expose metrics for collection
3 participants