-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add env var for specifying (or disabling) /metrics endpoint auth #2371
Comments
We do something similar with the autoscaler, for reference:
[1] https://github.com/drone/autoscaler/blob/master/server/metrics.go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the
/metrics
endpoint always requires an auth token for a user that is an admin. This is problematic in that the user being disabled/de-adminned or removed causes metric exporting to break with 403s.Instead, we can set the auth token as an env var,
DRONE_PROMETHEUS_TOKEN
:DRONE_PROMETHEUS_TOKEN
is set to an empty string or not set at all,/metrics
requires no authentication.DRONE_PROMETHEUS_TOKEN
is specified and is not an empty string, requests to/metrics
must contain a token matching the value ofDRONE_PROMETHEUS_TOKEN
.The text was updated successfully, but these errors were encountered: