Versions Compared

Key

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

Jira Legacy
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyCPS-1031

...

1. Introduction

To fulfill various usage needs it is important that all CPS applications can be configured when they are deployed without requiring any change in the application artifacts (docker images).

...

2. Current Implementation (Jakarta)

CPS configuration properties are implemented at different level

2.1.

...

Application Level

Following are the properties that should be defined at application level in the default application.yml file from the application repository:

  • Application custom properties for any value that should not be hard-coded in the application code source. A default value is provided in the properties file. When deploying the application any user has the option to use the default value provided by the application or change the value to run with a different one.
  • Spring Boot defined properties that need to be set for the application (either because Spring default value does not fit or is not set).

Detailed configuration:

  • All application configuration
  • Database connectivity configuration
  • Kafka connectivity configuration at application level is a Plain Text basic configuration ready to be used and tested easily on a local dev environment.

...

2.2. Helm Chart Level

When CPS applications are deployed in a Kubernetes environment, they are configured to run with a specific helm Spring profile specified by SPRING_PROFILES_ACTIVE environment variable. For example, see CPS Core:

...

Any value property set in application application.yaml file and not re-defined in Helm profile is still loaded and kept unchanged. There is no need to duplicate the properties in Helm profile.

Detailed configuration:(warning) ...

  • Database connectivity configuration for with Helm defined database service values
  • Kafka connectivity configuration if ONAP Strimzy Kafka is used

For example see CPS Core:

2.3. Helm Values Level

Finally, still when deploying CPS application in a specific user environment, the user can to provide its own custom helm overrides values to customize the application in any specific target environment.

...

Detailed configuration:(warning) ...

  • Any application configuration (custom application or default Spring Boot to be overridden or added)
  • Kafka connectivity configuration if Kafka server is provisioned independently from ONAP

For example, see CPS Core:

The values above are specified in the OOM CPS values file, but the user is still able to also create and provide its own overrides values file to be used when deploying.

3. Improvements & Cleanup

3.1. Remove Unused Properties

At application level, properties that are not used can be removed:

  • spring.liquibase.labels ?
  • Any other ?

3.2. Remove Duplicated Properties

At Helm chart level, considering that Helm profile is an add-on to the default profile, useless duplicates can be removed:

  • spring.liquibase.* 
  • spring.kafka.producer.client-id
  • security.* 
  • logging.*  (and also remove logging.*  values from values files if not used anywhere else)
  • dmi.* 


3.3. Rename path for properties dynamically redefined

In Jakarta release, following are the properties that are dynamically redifined from helm values:

  • config.eventPublisher.* (for Kafka connectivity configuration)
  • config.additional (for any other value)

Considering that all values provided at this level are overriding properties already defined or specified (either by the application itself or by Spring), it is suggested here to use only one more generic name to dynamically set these values:

  • config.ovverrides.*