jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.6k stars 4.03k forks source link

Add `manual` option for service discovery #21012

Open egvimo opened 1 year ago

egvimo commented 1 year ago
Overview of the feature request

Add an option to generate the code related to gateway and micro services without the need for service discovery.

Motivation for or Use Case

Our application is deployed to Kubernetes, so we generate our gateway and micro services with serviceDiscoveryType no. But we still use Spring Gateway as a proxy for the micro services.

There is however useful code which could be also generated in this case. For example the gateway overview or the Open API page in the UI and other related code.

Related issues or PR

20999

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days

egvimo commented 1 year ago

Keep open, please.

mshima commented 10 months ago

It’s doable like we do for microfrontends.

Tcharl commented 7 months ago

Hi,

Definitely not fan of introducing antipatterns: gateway should be a must and support kubernetes (I thought that a consul deployment or a jhipster-registry one would would on kube transparently).

Theoritically, Gateway should call kubernetes service and be the only thing exposed to Ingress. What's missing in the generator to act like this? Let us try to fix it properly

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days

egvimo commented 1 month ago

Definitely not fan of introducing antipatterns: gateway should be a must and support kubernetes (I thought that a consul deployment or a jhipster-registry one would would on kube transparently).

There is no need for Consul or Jhipster-Registry in a Kubernetes environment, because Kubernetes takes care of it. That's my point in this request.

Theoritically, Gateway should call kubernetes service and be the only thing exposed to Ingress.

Exactly. No need for extra service discovery.

What's missing in the generator to act like this? Let us try to fix it properly

The missing piece in this case is the (manual) configuration of the gateway to ensure proper routing without included service discovery. Spring gateway support this and we use it in our setup, but we have to do it manually for each service. This setup also works locally by simply re-routing to localhost and the respective port of the service.