- CPS-1031Getting issue details... STATUS
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).
CPS applications configuration capabilities are provided by leveraging Spring Boot application properties provided by String Boot:
- https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto.properties-and-configuration
- https://www.baeldung.com/properties-with-spring#boot
The properties that are available for configuration include both:
- Custom CPS properties specific to the application
- Spring Boot defined properties: https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties
Current Implementation (Jakarta)
CPS configuration properties are implemented at different level
1. Application Level
Following are the properties that are 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:
- Kafka configuration at application level is a Plain Text basic configuration ready to be used and tested easily on a local dev environment.
For example see CPS Core:
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:
- https://github.com/onap/oom/blob/jakarta/kubernetes/cps/components/cps-core/templates/deployment.yaml#L92
- https://github.com/onap/oom/blob/jakarta/kubernetes/cps/components/cps-core/values.yaml#L177
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
contains following properties:
- ...
For example see CPS Core:
3. Helm Values Level
...