kubernetesmicroservicesjhipsterjhipster-registry

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


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?


Solution

  • 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