-
Notifications
You must be signed in to change notification settings - Fork 667
Optional proxy of Prometheus from outside the cluster #2527
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
Optional proxy of Prometheus from outside the cluster #2527
Conversation
|
@dtaylor113 Hi, [1] #2497 |
|
@rawagner @suomiy @mareklibra @vojtechszocs @spadgett Hi, Is there a way to get data from Promethean/AlertManger in devel mode ? what am I missing ? |
|
/test e2e-aws |
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should recommend people set this even for development. It's too easy to forget you have this disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 removed, we now use proxy to get the data, no CORS 🎉
cmd/bridge/main.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have an off-cluster prometheus URL and proxy to that instead of the service? That more closely mirrors a real environment and avoids the same origin problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the proxy now 🎂 🍻 🍰
|
/hold |
893f363 to
81f3106
Compare
|
/test e2e-aws-console-olm |
|
/test e2e-aws-console-olm |
cmd/bridge/main.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: Prmetheus -> Prometheus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
cmd/bridge/main.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: clusters -> cluster's (and same in the line below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should wait with fixing :-)
|
@spadgett hi, removed the need to use un secure browser, now using proxy, please re-review. |
spadgett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for making this work
contrib/oc-environment.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid the jq requirement with
| export BRIDGE_K8S_MODE_OFF_CLUSTER_PROMETHEUS=$(oc -n openshift-monitoring get configmap sharing-config -o json | jq .data.prometheusURL | tr -d '"') | |
| export BRIDGE_K8S_MODE_OFF_CLUSTER_PROMETHEUS=$(oc -n openshift-monitoring get configmap sharing-config -o jsonpath='{.data.prometheusURL}') |
(same for below)
pkg/server/server.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the proxy config still set? Is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my bad ... fixing 👍
|
lgtm, just need to squash. thanks! |
3724d04 to
ab163e2
Compare
spadgett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: spadgett, yaacov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@spadgett do-not-merge/hold label ? |
|
/hold cancel |
|
/retest |
|
/test e2e-aws-console |
|
/test e2e-aws-console |
|
/test e2e-aws-console-olm |
Description:
It will be nice to have an option to proxy prometheus from outside the cluster for devel.
This PR adds the option to proxy Prometheus and AlertManager when running outside the
cluster.
It adds new CLI options:
Usage:
Already integrated when running dev scripts:
And
Ref:
https://docs.google.com/document/d/1epyQuj0AqL77zCLuea6T6WUKq-v47NbT9v24pOBFS1A/edit
https://jira.coreos.com/browse/CONSOLE-737