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

Add flag to send request to another endpoint instead of the FQDN #102

Conversation

pcallewaert
Copy link

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.

$ kubectl get svc -n prometheus
NAME                                    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)            AGE
prometheus-kube-prometheus-prometheus   ClusterIP   10.43.107.104   <none>        9090/TCP           3h49m
prometheus-prometheus-node-exporter     ClusterIP   10.43.181.180   <none>        9100/TCP           3h49m
prometheus-kube-prometheus-operator     ClusterIP   10.43.162.81    <none>        8080/TCP,443/TCP   3h49m
prometheus-operated                     ClusterIP   None            <none>        9090/TCP           3h49m

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 to my-cool-fqdn and forward the requests to my-kubernetes-svc by setting the internal-endpoint flag.

I'm not sure if the name is good, i'm open for name changes. Naming things is hard.

Signed-off-by: Pieter Callewaert <[email protected]>
@pcallewaert pcallewaert force-pushed the add-internal-endpoint branch from e945335 to 2747f92 Compare February 5, 2021 13:12
@hansmi
Copy link
Contributor

hansmi commented Feb 7, 2021

@pcallewaert Maybe I misunderstand, but isn't this similar or equal to #80?

@pcallewaert
Copy link
Author

Lol, it is, my bad. Closing this!

@pcallewaert pcallewaert closed this Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants