Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Jira
serverONAP JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-320

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

...

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

Final Approach:   Approach 2 - Spring Profile

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

  1. configured in thebapplicationthe application.yml in the resources folder 
  2. configured in the application-<profile>.yml in the resources folder
  3. environment variables
  4. system property to JVM using -Dkey=value

...

In this approach, everything will be added in the environment variables which will make it difficult to identify in a running container which spring properties are overridden or added for application. We have to rely on configmap for a large set of environment variables which can make debugging inconvenient. 

Approach 2 - Spring Profiles
Anchor
selectedApproach
selectedApproach

Implementation: https://gerrit.onap.org/r/c/oom/+/120431/6

...