change-metrics / monocle

Monocle helps teams and individual to better organize daily duties and to detect anomalies in the way changes are produced and reviewed.
https://demo.changemetrics.io/
GNU Affero General Public License v3.0
362 stars 56 forks source link

Monocle k8s deployment, api service throws network error when accessing via load balancer service #1106

Closed CJ619 closed 5 months ago

CJ619 commented 5 months ago

First off, thank you for this awesome tool.

The issue I am having is figuring out how to expose the api component externally with the k8s load balancer service.

Monocle is deployed in AKS. Everything works as expected. I can port forward and access the UI on the browser. Using ingress is not feasible right now so I thought the api could be exposed via a load balancer service.

I am able to get a clean connection if I curl like so: curl -Iv http://:8080/.

However using the same http://:8080/ on the browser consistently shows as a network error even though it appears the connection is not blocked.

I am wondering if there is something I am missing or if it is something within the application itself that prevents access

morucci commented 5 months ago

Hi,

Perhaps see that change added on top of the provided k8s manifests by a user deploying on aws . It seems a LoadBalancer is used. https://github.com/ThinkNear/monocle/commit/a3e5cf3b075c9a86a27ed1e0bf86b7fde52e0ed3

Also note that the WEB UI must be able to contact the API by setting the MONOCLE_PUBLIC_URL env var: https://github.com/ThinkNear/monocle/commit/a3e5cf3b075c9a86a27ed1e0bf86b7fde52e0ed3#diff-6f2b07d16c4e7a1e388c8e575f072e543c0d804fe117ee76f4623245241efcecR32

Hope it helps.

CJ619 commented 5 months ago

surely helped to point me in the right direction. Thank you so much!

Azure has a process for setting external access with static ip. It worked once I set the MONOCLE_PUBLIC_URL env var with a static ip for the load balancer. Thanks again!

CJ619 commented 5 months ago

I will go ahead and mark this as closed