trento-project / trento

An open cloud-native web console improving on the work day of SAP Applications administrators.
https://www.trento-project.io
Apache License 2.0
33 stars 25 forks source link

Make the Trento Server ingress port customizable #316

Open lee-martin opened 2 years ago

lee-martin commented 2 years ago

Port 80: Since port 80 is very commonly used, we need to make the http port for Trento configurable. (the same will also be true when we offer https). During testing we ran into a port collision with SUMA, just as an example.

This should be a user editable configuration file (i.e. not case in stone during install).

Other Backend Trento Ports: In general all Trento ports should be customizable to allow users to avoid port conflicts with other applications, so not just the web port.

arbulu89 commented 2 years ago

@lee-martin The web port is already configurable using the -p or --port flag Edit: I guess the issue comes with the helm chart, as this will default the port to 80

lee-martin commented 2 years ago

@arbulu89 I assume the -p option applies to the Trento binary itself? In which case, yes, you are likely correct that the issue comes from the helm chart/containerization.

What about the port(s) that the Agent uses to connect to the Trento server? Which port is it, and it it configurable?

stefanotorresi commented 2 years ago

What about the port(s) that the Agent uses to connect to the Trento server? Which port is it, and it it configurable?

The Trento Agent doesn't connect directly to the Server right now, it passes through Consul locally (which listens on port 8500). The upcoming refactoring, which will remove Consul from the architecture, will likely have the Agent connecting to the Server on its current default listening port (8080).

Bear in mind that the Server runs within a K3S cluster, though, which means that to connect to it we configure dedicated Kubernetes resources (an Ingress and a Service), which are independently configurable from the actual Trento Server process.

The default listening port of the Kubernetes Ingress is 80, but the Helm chart can be highly customizable so, to fix this, I think we just need to document how to change it.

Diego argued for not using 80 as an Kubernetes Ingress port default, which I initially agreed on; that said, given the fact that users are trying to run Trento on servers shared with other software, I think we should draw a line and clearly define requirements, as in: run Trento on a dedicated host, or at least be sure that there are no network port clashes.