Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

Currently, the default application configuration is present inside the docker images and it gets overridden when it is deployed using the helm. The issue with this approach is

  • maintaining same values at two places
  • the possibility of missing a few configurations in the OOM
  • having obsolete values in OOM

To avoid it, we can keep only those properties in the OOM which needs to be changed based on deployment and provide an ability for overriding any property if required.

Possible Solutions

In any spring application, application properties can be provided in multiple ways, which are mentioned below in ascending order of priority.

  1. application.yml in the resources folderĀ 
  2. application-<profile>.yml in the resources folder
  3. environment variables
  4. system property to JVM using -Dkey=value
Approach 1 - Using Environment variablesĀ 
Approach 2 - Spring Profiles
Approach 3 - Keeping application.yml next to spring jar





  • No labels