How can I switch the active profile to "Dev" in JHipster micro-service app deployed to Kubernetes?

9/16/2019

I have a micro-services based JHipster app and have generated a Kubernetes deployment script using the kubernetes sub-generator.

I have deployed the app to Azure AKS and have it running smoothly. The current profile it is running with is 'prod'. How can I change the active profile the 'dev' in order to view swagger documentation?

-- Omtara
jhipster
jhipster-registry
kubernetes
microservices

2 Answers

4/17/2020

For everyone who is here because want to google out why the swagger isn't enabled on prod in heroku installation despite of setting it into application-prod.yml, application-heroku.yml, SPRING_PROFILES_ACTIVE env variable, mvn start-up parameters in MAVEN_CUSTOM_OPTS env variable in heroku:config custom env variables...

It looks like the actual profile that will be used by the heroku prod run is in Procfile.

-- Ilya Yevlampiev
Source: StackOverflow

9/16/2019

I managed to get the swagger API functional by adding swagger to the SPRING_PROFILES_ACTIVE environment variable for all containers' deployment file.

spec:
  ...
  containers:
    - name: core-app
      image: myrepo.azurecr.io/core
      env:
        - name: SPRING_PROFILES_ACTIVE
          value: prod,swagger
-- Omtara
Source: StackOverflow