Skip to content

Commit

Permalink
Merge pull request #150 from catenax-ng/release/v1.4.0-refactor-backe…
Browse files Browse the repository at this point in the history
…nd-configuration

[ 2° ] - Release/v1.4.0 refactor backend configuration: Refactor and configure backend helm chart
  • Loading branch information
saudkhan116 authored Dec 14, 2023
2 parents a1117a4 + 1e380ab commit c16326c
Show file tree
Hide file tree
Showing 10 changed files with 367 additions and 607 deletions.
4 changes: 2 additions & 2 deletions charts/digital-product-pass/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 1.3.1
version: 1.4.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.3.1"
appVersion: "1.4.0"
118 changes: 116 additions & 2 deletions charts/digital-product-pass/templates/configmap-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,119 @@ metadata:
name: backend-config
namespace: {{ .Values.namespace }}
data:
application.yml: |-
{{ .Values.backend.application.yml | nindent 4 }}
application.yaml: |-
spring:
name: "Digital Product Passport Consumer Backend"
main:
allow-bean-definition-overriding: true
devtools:
add-properties: false
jackson:
serialization:
indent_output: true
logging:
level:
# -- general logging level
root: {{ tpl (.Values.backend.logging.level.root | default "INFO") . | quote }}
# -- logging for the util components
utils: {{ tpl (.Values.backend.logging.level.utils | default "INFO") . | quote }}
configuration:
# -- max retries for the backend services
maxRetries: {{ .Values.backend.maxRetries }}
# -- keycloak configuration
keycloak:
realm: {{ .Values.oauth.realm }}
resource: {{ .Values.oauth.appId }}
tokenUri: "https://{{ tpl (.Values.oauth.hostname | default "http://localhost") . }}/auth/realms/{{ .Values.oauth.realm }}/protocol/openid-connect/token"
userInfoUri: "https://{{ tpl (.Values.oauth.hostname | default "http://localhost") . }}/auth/realms/{{ .Values.oauth.realm }}/protocol/openid-connect/userinfo"
# -- edc consumer connection configuration
edc:
endpoint: "https://{{ .Values.backend.edc.endpoint }}"
management: {{ .Values.backend.edc.apis.management }}
catalog: {{ .Values.backend.edc.apis.catalog }}
negotiation: {{ .Values.backend.edc.apis.negotiation }}
transfer: {{ .Values.backend.edc.apis.transfer }}
receiverEndpoint: "https://{{ .Values.backend.hostname }}/endpoint"
delay: {{ .Values.backend.edc.delay }} # -- Negotiation status Delay in milliseconds in between async requests [<= 500]
# -- security configuration
security:
check:
enabled: {{ .Values.backend.securityCheck.enabled }}
bpn: {{ .Values.backend.securityCheck.bpn }}
edc: {{ .Values.backend.securityCheck.edc }}
# -- irs configuration
irs:
enabled: {{ .Values.backend.irs.enabled }} # -- Enable search for children in the requests
endpoint: "https://{{ .Values.backend.irs.hostname }}" # -- IRS endpoint
paths:
job: "/irs/jobs" # -- API path for calling in the IRS endpoints and staring/getting jobs
tree:
fileName: "treeDataModel" # -- Tree dataModel filename created in the processId directory
indent: true # -- Indent tree file
callbackUrl: "https://{{ .Values.backend.hostname }}/api/irs" # -- Backend call back base url for the irs controller
# -- digital twin registry configuration
dtr:
# -- asset type to search for the registry in the edc
assetType: 'data.core.digitalTwinRegistry'
# -- submodel endpoint interface to search
endpointInterface: 'SUBMODEL-3.0'
# -- dsp endpoint key inside submodel body
dspEndpointKey: 'dspEndpoint'
# -- decentral digital twin apis
decentralApis:
search: {{ .Values.backend.digitalTwinRegistry.endpoints.search }}
digitalTwin: {{ .Values.backend.digitalTwinRegistry.endpoints.digitalTwin }}
subModel: {{ .Values.backend.digitalTwinRegistry.endpoints.subModel }}
# -- timeouts for the digital twin registry async negotiation
timeouts:
search: {{ .Values.backend.digitalTwinRegistry.timeouts.search }}
negotiation: {{ .Values.backend.digitalTwinRegistry.timeouts.negotiation }}
transfer: {{ .Values.backend.digitalTwinRegistry.timeouts.transfer }}
digitalTwin: {{ .Values.backend.digitalTwinRegistry.timeouts.digitalTwin }}
# -- temporary storage of dDTRs for optimization
temporaryStorage: {{ .Values.backend.digitalTwinRegistry.temporaryStorage.enabled }}
# -- discovery configuration
discovery:
# -- discovery finder configuration
endpoint: "https://{{ tpl (.Values.backend.discovery.hostname | default "") . }}/api/v1.0/administration/connectors/discovery/search"
# -- bpn discovery configuration
bpn:
key: {{ tpl (.Values.backend.discovery.bpnDiscovery.key | default "manufacturerPartId") . | quote }}
searchPath: {{ tpl (.Values.backend.discovery.bpnDiscovery.path | default "") . | quote }}
# -- edc discovery configuration
edc:
key: {{ tpl (.Values.backend.discovery.edcDiscovery.key | default "bpn") . | quote }}
# -- process configuration
process:
# -- directory for storing the contract negotiation files
dir: "process"
# -- indent the process negotiation files
indent: true
# -- unique sha512 hash key used for the passport encryption
signKey: {{ tpl (.Values.backend.process.encryptionKey | default "") . | quote }}
# -- passport data transfer configuration
passport:
# -- configure the data transfer
dataTransfer:
# -- encrypt the passport when he arrives from the edc data plane
encrypt: true
# -- the indent from the passport
indent: true
# -- directory to store the passport when is not linked to a process
dir: "data/transfer"
# -- passport versions and aspects allowed
aspects: {{- toYaml .Values.backend.passport.aspects | nindent 10 }}
# -- configuration of the spring boot server
server:
# -- configuration of backend errors
error:
include-message: ALWAYS
include-binding-errors: ALWAYS
include-stacktrace: ON_PARAM
include-exception: false
# -- listening port for the backend
port: {{ .Values.backend.serverPort }}
# -- maximum allowed connections
tomcat:
max-connections: 10000
20 changes: 10 additions & 10 deletions charts/digital-product-pass/templates/deployment-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,34 @@ spec:
{{- end }}

- name: "KEYCLOAK_CLIENTID"
value: "{{ .Values.frontend.productpass.keycloak.clientId }}"
value: "{{ .Values.oauth.appId }}"

- name: "KEYCLOAK_REALM"
value: "{{ .Values.frontend.productpass.keycloak.realm }}"
value: "{{ .Values.oauth.realm }}"

- name: "KEYCLOAK_ONLOAD"
value: "{{ .Values.frontend.productpass.keycloak.onLoad }}"
value: "{{ .Values.oauth.onLoad }}"

- name: "BACKEND_URL"
value: "https://{{ .Values.frontend.productpass.backend_url }}"
value: "https://{{ .Values.frontend.backend.hostname }}"

- name: "IDP_URL"
value: "https://{{ .Values.frontend.productpass.idp_url }}"
value: "https://{{ .Values.oauth.hostname }}"

- name: "API_TIMEOUT"
value: "{{ .Values.frontend.productpass.api.timeout }}"
value: "{{ .Values.frontend.api.timeout }}"

- name: "API_MAX_RETRIES"
value: "{{ .Values.frontend.productpass.api.max_retries }}"
value: "{{ .Values.frontend.api.max_retries }}"

- name: "IRS_DELAY"
value: "{{ .Values.frontend.productpass.irs.requestDelay }}"
value: "{{ .Values.frontend.irs.requestDelay }}"

- name: "IRS_MAX_WAITING_TIME"
value: "{{ .Values.frontend.productpass.irs.maxWaitingTime }}"
value: "{{ .Values.frontend.irs.maxWaitingTime }}"

- name: "API_DELAY"
value: "{{ .Values.frontend.productpass.api.delay }}"
value: "{{ .Values.frontend.api.delay }}"

- name: "VERSION"
value: "{{ .Chart.AppVersion }}"
Expand Down
4 changes: 2 additions & 2 deletions charts/digital-product-pass/templates/secret-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ metadata:
namespace: {{ .Values.namespace }}
type: Opaque
stringData:
clientId: {{ .Values.backend.edc.clientId }}
clientSecret: {{ .Values.backend.edc.clientSecret }}
clientId: {{ .Values.oauth.techUser.clientId }}
clientSecret: {{ .Values.oauth.techUser.clientSecret }}
---

apiVersion: v1
Expand Down
Loading

0 comments on commit c16326c

Please sign in to comment.