Add flag to send request to another endpoint instead of the FQDN #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I'll first explain my use case so you better understand why I'm creating this PR.
We are running several edge devices, which have k3s installed and the kube-prometheus-stack. But we have also a prometheus server in the cloud that we want to have a global view of our edge devices, so we want to call the federate call of those prometheus-operators. These devices are not reachable from the internet, that's why we want to use PushProx. (We already use it for other use cases, with great succes)
Currently we can define our
fqdn
, which we want to use the kubernetes cluster name. However, the client will use this FQDN also to forward the scrape calls to. In our kubernetes cluster this should be the service name/ip of the operator.eg.
Currently we have 2 options, set the fqdn flag to
prometheus-kube-prometheus-prometheus
which would not be unique for multiple edge devices.Or create a second Kubernetes svc that matches the fqdn you set and has the same selector as the one with the default install.
However, it would be nice that we can set the fqdn and the actual endpoint as different values for pushprox. For this reason I open this PR.
Now you can configure
fqdn
tomy-cool-fqdn
and forward the requests tomy-kubernetes-svc
by setting theinternal-endpoint
flag.I'm not sure if the name is good, i'm open for name changes. Naming things is hard.