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

mediamtx: Publish deployed version if runtime args are present #3285

Merged
merged 3 commits into from
Nov 30, 2024

Conversation

hjpotter92
Copy link
Member

preparing the image so that container can optionally inject version metrics to prometheus/victoriametrics at runtime.

@hjpotter92 hjpotter92 self-assigned this Nov 29, 2024
@github-actions github-actions bot added docker Pull requests that update Docker code github_actions Pull requests that update GitHub Actions code labels Nov 29, 2024
set -euo pipefail

if [ -v LP_PUBLISH_MEDIAMTX_METRICS ]; then
if [ -z "$LP_PUBLISH_MEDIAMTX_METRICS_ENDPOINT" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we exit if the endpoint is not specified?

if [ -z "$LP_PUBLISH_MEDIAMTX_METRICS_ENDPOINT" ]; then
    echo >&2 "No endpoint specified for publishing mediamtx metrics."
    exit 1
fi

Copy link
Member Author

Choose a reason for hiding this comment

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

i was thinking it more as a warning than a fail condition.

Copy link
Contributor

Choose a reason for hiding this comment

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

if LP_PUBLISH_MEDIAMTX_METRICS_ENDPOINT is missing then curl would fail few lines below.

But yeah warning is fine... I think we'd catch it missing anyway as not having mediamtx version on grafana

docker/Dockerfile.mediamtx Outdated Show resolved Hide resolved
@hjpotter92 hjpotter92 merged commit 1d55e9b into master Nov 30, 2024
19 checks passed
@hjpotter92 hjpotter92 deleted the hjp/mediamtx branch November 30, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants