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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

volumes:
- ~/.config/gcloud:/root/.config/gcloud/:z # for GCP authentication
- ./config/config.jsn:/etc/fulcio-config/config.json:z
Expand Down
8 changes: 8 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ Simply run:
docker-compose up
```

If you need to change the docker port on which the metrics port is bound, use
the `FULCIO_METRICS_PORT` variable:

```
export FULCIO_METRICS_PORT=2113
docker-compose up
```

The other way is running the Fulcio binary:

```
Expand Down