Project Configuration
Introduction
The settings made in the project configuration are used for the Helm deployment of all solutions in a k5-project as long as there is no solution-specific configuration found. This configuration has to be done for each new k5-project.
The configuration of k5-projects and built solutions is done via a REST API called Configuration Management API inside the section Solution Configuration. This API provides a Swagger UI for ease-of-use but you can use the tool of your choice for calling APIs (e.g. cURL, Postman).
https://ssob-config.<domain>
The exact URL can be found
within the route named k5-configuration-management
. It can be
easily retrieved by executing
oc get route k5-configuration -n <namespace>
, whereby
<namespace>
points to the namespace, where the Solution Hub
is installed. Get Project Configurations
These operations will list either all solutions that have a Solution Configuration, all Project Configurations or list a specific Project Configuration.
Get all solutions that have a Solution Configuration
GET
method Get all solutions that have a Solution
Configuration in the Swagger UI
orcurl -X GET "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/" -H "accept: application/json" -H "Authorization: Bearer {Bearer Token}"
Get all Project Configurations
GET
method Get all Project Configurations in the Swagger
UI
orcurl -X GET "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations" -H "accept: application/json" -H "Authorization: Bearer {Bearer Token}"
Get a specific Project Configuration
GET
method Get a specific Project Configuration in the
Swagger UI
orcurl -X GET "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/configurationName" -H "accept: text/plain" -H "Authorization: Bearer {Bearer Token}"
Parameter | Type | Description |
---|---|---|
configurationName |
path parameter (String) | The name of the configuration:
ssob-sdo-values-yaml |
runtimeName |
path parameter (String) | The name of the specific k5-project, e.g.
cpd-runtime-default |
Create or Edit Project Configurations
Each new k5-project needs a project configuration. These settings can be edited later, but the changes will only affect new solutions or existing solutions without solution-specific configuration after they have been re-deployed.
POST
method Create project configurationin the Swagger UI
orcurl -x POST "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName}" -H "accept: text/plain" -H "Authorization: Bearer {BearerToken}" -H "Content-Type: text/plain" -d ""
Parameter | Type | Description |
---|---|---|
configurationName |
path parameter (String) | The name of the configuration:
ssob-sdo-values-yaml |
runtimeName |
path parameter (String) | The name of the specific k5-project, e.g.
cpd-runtime-default |
data |
body parameter (YAML) | The configuration values (body parameters) |
Parameter | Description | Default Value |
---|---|---|
|
Hostname of the specific k5-project (e.g.
cpd-runtime-default.apps.openshift-cluster.mydomain.cloud ) |
required - no default value available |
|
Secret of the OIDC configuration for the event manager. | event-manager-oauth-client-secret |
|
Defines if cross-origin resource sharing is enabled or not. If
set to true , CORS policy where the value is set to
'*' (any origin is allowed) is enabled. |
false |
|
Defines if solutions shall send events to a k5-project namespace-wide topic. | false |
|
Defines that solutions use DEV bindings, that are defined in the
Solution Designer if no service binding is deployed in the
Kubernetes cluster. This feature flag will be set automatically
(true for DEV projects) if
spec.configuration.configurationManagement.
autoConfiguration.enabled is set in the k5-project crd
instance (see Create a
k5project) |
false |
|
Defines if the internal APIs of a solution are exposed to the provided Swagger UI. | false |
|
Defines if Kafka will be available in the deployed solution. If
Kafka events are enabled, sent business events (see
Managing Events) are sent to the Kafka service and then
handled and executed by the solution. If Kafka events are not
enabled, sent business events are directly handled and executed by
the solutions without using a Kafka service (event-streaming). The
revision logging (audit) and data events are also not sent to a
Kafka service and just written to the log output without Kafka being
enabled. The logger names are audit-event for the
revision logging and data-event for the data
events. Ensure that a Kafka service is available and enabled in the
k5project if it should be used by solutions. This feature flag will
be set automatically if
spec.configuration.configurationManagement.
autoConfiguration.enabled is set in the k5project crd
instance (see Create a
k5project) |
true |
|
Defines if an additional API for testing is available. This
feature flag will be set automatically to true if
spec.configuration.configurationManagement.
autoConfiguration.enabled is set in the k5project crd
instance (see Create a
k5project) |
false |
|
Specifies the image registry for the solution. | image-registry.openshift-image-registry.svc:5000 |
|
The secret used to pull images for solution deployment (not needed for OpenShift registry). | nil |
|
Service binding name for the MongoDB service (created by the k5-project-operator). | k5-default-document-storage-service-binding |
|
Service binding name for the message hub service (created by the k5-project-operator). | k5-default-message-service-binding |
|
The name of the secret holding the OIDC configuration for the solution. | k5-default-iam-service-binding |
|
Use self-created default service account, role and role binding. If true the specific service account names are not used. | false |
|
Set existing service account name for the solution deployment, only used if rbac.useSelfCreated is false. | cpd-viewer-sa |
|
Set existing service account name for the deployment jobs, only used if rbac.useSelfCreated is false. | cpd-editor-sa |
|
Adjust the log level configuration for low-code solutions. The configured log config.json will be used in the solution's Helm deployment and the information will be saved in the deployment of the solution. For more information about the log level configuration see How to change the default log level for a Low-Code-Solution | see example below |
Example of parameter solution.logging:
solution:
logging: {
"/src-impl/api/apitest/operations/*" : "trace",
"/src-impl/api/apitest/operations/addDate.test" : "info",
"/src-impl/api/apitest/operations/addNumber" : "error",
"/sdk/v1/*" : "info",
"/sdk/v1/handler/*" : "trace"
}
Delete Project Configurations
DELETE
method Delete a specific Project Configuration in
the Swagger UI
orcurl -X DELETE "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName}" -H "accept: text/plain" -H "Authorization: Bearer
Parameter | Type | Description |
---|---|---|
configurationName |
path parameter (String) | The name of the configuration:
ssob-sdo-values-yaml |
runtimeName |
path parameter (String) | The name of the specific k5-project, e.g.
cpd-runtime-default |
Auto-Configuration of Project Configuration:
spec.configuration.configurationManagement.autoConfiguration.enabled: false
(part of the k5project crd, default value: true
). The following
solution default configuration will be created automatically: environment:
host: "<configured in the k5project crd (spec.hostname)>
"
feature:
apiBinding: true for k5-projects with type DEV, otherwise false
testSupport: true
Examples
Example body parameter for a typical development stage (data):
environment:
host: "cpd-runtime-default.apps.openshift-cluster.mydomain.cloud"
feature:
corsPolicy: true
devBinding: true
testSupport: true
Example body parameter for a typical production stage (data):
environment:
host: "prod.apps.openshift-cluster.mydomain.cloud"
feature:
corsPolicy: true