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.56k stars 4.02k forks source link

Kubernetes subgenerator can't select gateway #4150

Closed ruddell closed 8 years ago

ruddell commented 8 years ago
Overview of the issue

When running the kubernetes subgenerator, if you select microservices for the first answer, you can't choose a gateway to deploy as it only looks for either microservice apps.

Reproduce the error

Run yo jhipster:kubernetes and select a directory for your apps containing a gateway and microservice Only the microservices will appear in the list of apps

Related issues

Related to the change in #4044, the exact line that needs fixing is in this if statement

Suggest a Fix

I added || (applicationType === 'microservice') && ('gateway' === fileData['generator-jhipster'].applicationType)) { to the if-statement that checks for the selected app type. This allows gateways to appear when the user chooses a microservice architecture for the Kubernetes prompt.

Another option is to get rid of the prompt for App Type and just let the user choose any apps in the folder they input. The only other place use of kubernetesApplicationType is when displaying the docker-compose prompt in this section

Pinging @pascalgrimaud as he wrote this section.

JHipster Version(s)

3.7.0, Only tested on master

JHipster configuration, a .yo-rc.json file generated in the root folder

You need any gateway and any microservice.

pascalgrimaud commented 8 years ago

My bad! Thanks @ruddell !