Versions Compared

Key

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

...

Then, OOM chart application-helm.yml is mounted in the application container to provide helm  profile configuration values. For example see CPS Core:

OOM chart application-helm.yml should contain following properties:

...

3. Improvements & Cleanup

Jira for below work:  

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1121

3.1. Remove Unused Properties

...

3.3. Rename path for properties dynamically redefined (optional)

CurrentPropositionDescription
config.eventPublisher.* config.kafkaConnectivity.* for Kafka connectivity configuration
config.additional.*

config.overrides.* 

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

4. Example

Considering following configuration files for default application properties, helm profile properties and helm overrides values:

Code Block
languageyml
titleapplication.yaml
my-cps:
  property-1: my-value-1
  property-2: my-value-2
  property-3: my-value-3

spring:
  application:
    name: my-application-name
  main:
    banner-mode: console


Code Block
languageyml
titleapplication-helm.yaml
my-cps:
  property-2: my-other-value-2

spring:
  main:
    banner-mode: off
    log-startup-info: false


Code Block
languageyml
titleoverrides-helm..yaml
config:
  overrides:
    my-cps.property-3: my-other-value-3
    spring.datasource.hikari.maximum-pool-size: 20


Then resulting configuration are:

  • Default application running:
Code Block
languageyml
my-cps:
  property-1: my-value-1
  property-2: my-value-2
  property-3: my-value-3

spring:
  application:
    name: my-application-name
  main:
    banner-mode: console
    log-startup-info: true				# Default Spring value
  datasource:
    hikari:
      maximum-pool-size: 10				# Default Spring value
  • K8s helm deployment without overrides provided:
Code Block
languageyml
my-cps:
  property-1: my-value-1
  property-2: my-other-value-2			# From Spring Helm profile
  property-3: my-value-3

spring:
  application:
    name: my-application-name
  main:
    banner-mode: off					# From Spring Helm profile
    log-startup-info: false				# From Spring Helm profile
  datasource:
    hikari:
      maximum-pool-size: 10				# Default Spring value
  • K8s helm deployment with overrides provided:
Code Block
languageyml
my-cps:
  property-1: my-value-1
  property-2: my-other-value-2			# From Spring Helm profile
  property-3: my-other-value-3			# From Helm overrides

spring:
  application:
    name: my-application-name
  main:
    banner-mode: off				 	# From Spring Helm profile
    log-startup-info: false				# From Spring Helm profile
  datasource:
    hikari:
      maximum-pool-size: 20				# From Helm overrides