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

Allow exposed metrics port to be overridden #1518

Merged
merged 1 commit into from Jan 16, 2024

Conversation

cmurphy
Copy link
Contributor

@cmurphy cmurphy commented Jan 13, 2024

Rekor uses the same metrics port, so if both services are run with docker-compose they conflict with each other. Add an environment variable to expose the metrics service on a different docker port.

Needed for an update to the cosign e2e tests.

Relates to sigstore/sigstore-probers#105

Summary

Release Note

Enables docker-compose to use an alternate port for metrics with FULCIO_METRICS_PORT.

Documentation

Added in docs/setup.md.

Rekor uses the same metrics port, so if both services are run with
docker-compose they conflict with each other. Add an environment
variable to expose the metrics service on a different docker port.

Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
Copy link

codecov bot commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fc6fafd) 57.74% compared to head (1bc31ce) 57.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1518      +/-   ##
==========================================
- Coverage   57.74%   57.67%   -0.07%     
==========================================
  Files          50       50              
  Lines        3112     3112              
==========================================
- Hits         1797     1795       -2     
- Misses       1156     1158       +2     
  Partials      159      159              

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

@@ -34,7 +34,7 @@ services:
ports:
- "5555:5555"
- "5554:5554"
- "2112:2112"
- "${FULCIO_METRICS_PORT:-2112}:2112"
Copy link
Member

Choose a reason for hiding this comment

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

i would do

Suggested change
- "${FULCIO_METRICS_PORT:-2112}:2112"
- "${FULCIO_METRICS_PORT:-2113}:2112"

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM. You can also use set the metrics-port flag to set a different metrics port for the service.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cpanato I didn't want to change the default since it could be considered a breaking change. Do you think having a better default is worth that breaking change?

@haydentherapper I wanted to run this in docker-compose without editing docker-compose.yml, so it doesn't really matter to me what port metrics is running on in the container, only what external port is exposed.

Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't make the breaking change here, given that we already have a command line flag to change it.

@haydentherapper haydentherapper merged commit ca33c98 into sigstore:main Jan 16, 2024
13 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.

None yet

4 participants