...
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 Legacy |
---|
server | System Jira |
---|
serverId | 4733707d-2057-3a0f-ae5e-4fd8aff50176 |
---|
key | CPS-1121 |
---|
|
3.1. Remove Unused Properties
...
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
...
(optional)
Current | Proposition | Description |
---|
config.eventPublisher.* | config.kafkaConnectivity.* |
...
| for Kafka connectivity configuration |
...
...
.* | 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 |
---|
language | yml |
---|
title | application.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 |
---|
language | yml |
---|
title | application-helm.yaml |
---|
|
my-cps:
property-2: my-other-value-2
spring:
main:
banner-mode: off
log-startup-info: false |
Code Block |
---|
language | yml |
---|
title | overrides-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 |
---|
|
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 |
---|
|
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 |
---|
|
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 |