Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
be0daf6
feat: configured helm charts for edc, dtr, and submodel server deploy…
matbmoser Feb 28, 2025
388683c
chore: added new edc
matbmoser Feb 28, 2025
d563564
chore: fixed some bugs
matbmoser Feb 28, 2025
23ed2b4
chore: updated chart
matbmoser Feb 28, 2025
415bce5
chore: added vault service account
matbmoser Feb 28, 2025
df1860c
chore: removed vault pre-install
matbmoser Feb 28, 2025
c002265
chore: added new registry ingress
matbmoser Feb 28, 2025
03651d5
chore: added name override
matbmoser Feb 28, 2025
6e4f032
chore: added the vault to true
matbmoser Feb 28, 2025
4fe1ebc
chore: added client secret
matbmoser Feb 28, 2025
39e40f4
feat: added override for vault
matbmoser Feb 28, 2025
9a30bb8
feat: added override for vault
matbmoser Feb 28, 2025
d1b8f9d
feat: added override for vault
matbmoser Feb 28, 2025
f960e7b
feat: added override for vault
matbmoser Feb 28, 2025
cc3da62
feat: added override for vault
matbmoser Feb 28, 2025
32b09ba
feat: added override for vault
matbmoser Feb 28, 2025
22d7120
chore: added new charts values
matbmoser Mar 4, 2025
98a5717
feaT: added new target prefix
matbmoser Mar 4, 2025
a77fa0b
feaT: added new target prefix
matbmoser Mar 4, 2025
ba766fc
feaT: added new target prefix
matbmoser Mar 4, 2025
3f76146
feaT: added new target prefix
matbmoser Mar 4, 2025
27f7d82
feaT: added new target prefix
matbmoser Mar 4, 2025
2af13a3
feaT: added new target prefix
matbmoser Mar 4, 2025
f66879f
feaT: added new target prefix
matbmoser Mar 4, 2025
94dc942
feaT: added new target prefix
matbmoser Mar 4, 2025
5d0a71d
feaT: added new target prefix
matbmoser Mar 4, 2025
4d3d0e5
feaT: added new target prefix
matbmoser Mar 4, 2025
5f0eb23
feat: added edc consumer
matbmoser Mar 4, 2025
0e7ff44
feat: added edc consumer
matbmoser Mar 4, 2025
f424389
feat: added edc consumer
matbmoser Mar 4, 2025
b936e11
feat: added edc consumer
matbmoser Mar 4, 2025
52ce84d
chore: added new configuration
matbmoser Mar 18, 2025
049df07
chore: updated config
matbmoser Mar 18, 2025
a0c8165
Update values-int.yaml
matbmoser Mar 18, 2025
59a6f8f
chore: splitted dataplane from controlplane
matbmoser Mar 18, 2025
20e0989
chore: updated edcs to 0.9.0
matbmoser Mar 18, 2025
60bb1c7
chore: reduced to 0.7.6
matbmoser Mar 18, 2025
054beee
chore: added edcs again to 0.9.0
matbmoser Mar 18, 2025
33d56f1
chore: added same client id and secret
matbmoser Mar 18, 2025
00749e8
chore: returned to conditions from beginning
matbmoser Mar 18, 2025
0217dba
chore: added new edc version
matbmoser Mar 18, 2025
8046229
chore: added old edc
matbmoser Mar 18, 2025
ee42043
Update deployment/data-consumer/README.md
matbmoser Mar 19, 2025
a4b7d43
chore: added licence headers
matbmoser Mar 19, 2025
eebba8c
chore: added licence headers
matbmoser Mar 19, 2025
97dcc9c
Update deployment/data-provider/README.md
matbmoser Mar 21, 2025
a2975c1
Update deployment/data-consumer/README.md
matbmoser Mar 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions deployment/data-consumer/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# #############################################################################
# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

# Ignore ENV specific values at release
values?*.yaml
values?*.yml
37 changes: 37 additions & 0 deletions deployment/data-consumer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# #############################################################################
# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
apiVersion: v2
name: tx-data-provider
description: A Helm chart for Kubernetes

type: application
version: 0.1.3
appVersion: 0.0.1

dependencies:
- name: tractusx-connector
repository: https://eclipse-tractusx.github.io/charts/dev
version: 0.8.0
condition: tractusx-connector.enabled
- name: vault
version: 0.20.0
repository: https://helm.releases.hashicorp.com
condition: vault.enabled
49 changes: 49 additions & 0 deletions deployment/data-consumer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Dataprovider Helm Chart

This chart includes EDC, Digital Twin Registry and a Submodel Server.
The Submodel Server images is based on an older Catena-X demo (catenax at home) since this is what we were using in our
testing environments.


-> values-int.yaml -> in

## Prerequisites

- Running Kubernetes cluster
- Helm is installed

Example for local usage:

- [Minikube](https://minikube.sigs.k8s.io/docs/start/)
- [Minikube ingress addon](https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/)

## Installing

Run the Chart with

```shell
helm dependency update
helm install dataprovider . --timeout 10m0s
```

Remove the chart by running

```shell
helm uninstall dataprovider
```
## Configuration

For Configuration of digital twin registry see [sldt-digital-twin-registry/tree/main/charts/registry](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/tree/main/charts/registry)

Configuration of EDC see [tractusx-edc/tree/main/charts/tractusx-connecto](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector)

EDC requires connection to HashiCorp Vault and Manage Identity Wallet. These have to be configured for the dataprovider to be operative.

The Chart can be used as dataprovider by setting `simple-data-backend.enabled`, `digital-twin-registry.enabled` and `seedTestdata` to `false`.

## Testdata seeding

After the installation, a Post-Install Helm Hook will be started which initiates the seeding of testdata. The Hook executes a python script which uploads a provided test dataset to the dataprovider. Documentation to the python script can be found here [README](https://github.com/eclipse-tractusx/item-relationship-service/blob/main/local/testing/testdata/README.md)

Test data set and upload script are stored in [resources/](resources) and provided to the hook as config map.
A custom config map can be used to provided e.g. `testdataConfigMap: my-custom-testdata-configmap`.
133 changes: 133 additions & 0 deletions deployment/data-consumer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{{/*
*******************************************************************************
* Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************
*/}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "dataprovider.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Submodel URL helpers
*/}}
{{- define "simple-data-backend.host" -}}
{{- if .Values.backendUrl }}
{{- tpl .Values.backendUrl . }}
{{- else if (index .Values "simple-data-backend" "ingress" "enabled") }}
{{- with (first (index .Values "simple-data-backend" "ingress" "hosts")) }}
{{- printf "https://%s" .host }}
{{- end }}
{{- else }}
{{- printf "http://%s%s:8080" .Release.Name "-simple-data-backend" }}
{{- end }}
{{- end }}

{{/*
Registry URL helpers
*/}}
{{- define "registry.host" -}}
{{- if index .Values "digital-twin-registry" "registry" "ingress" "enabled" }}
{{- printf "https://%s" (index .Values "digital-twin-registry" "registry" "host") }}
{{- else }}
{{- printf "http://%s-%s:8080" .Release.Name "digital-twin-registry" }}
{{- end }}
{{- end }}
{{- define "registry.path" -}}
{{- if index .Values "digital-twin-registry" "registry" "ingress" "enabled" }}
{{- index .Values "digital-twin-registry" "registry" "ingress" "urlPrefix" }}
{{- else }}
{{- print "" }}
{{- end }}
{{- end }}
{{- define "registry.url" -}}
{{- if .Values.registryUrl }}
{{- tpl .Values.registryUrl . }}
{{ else }}
{{- printf "%s%s%s" (include "registry.host" .) (include "registry.path" .) "/api/v3" }}
{{- end }}
{{- end }}

{{/*
EDC URL helpers
*/}}

{{- define "edc.controlplane.host" -}}
{{- if .Values.controlplanePublicUrl }}
{{- tpl .Values.controlplanePublicUrl . }}
{{ else }}
{{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }}
{{- if .enabled }}
{{- printf "https://%s" .hostname }}
{{- else }}
{{- printf "http://%s-%s:8084" $.Release.Name "tractusx-connector-controlplane" }}
{{- end }}
{{- end }}
{{ end }}
{{- end }}

{{- define "edc.controlplane.management.host" -}}
{{- if .Values.controlplaneManagementUrl }}
{{- tpl .Values.controlplaneManagementUrl . }}
{{ else }}
{{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }}
{{- if .enabled }}
{{- printf "https://%s" .hostname }}
{{- else }}
{{- printf "http://%s-%s:8081" $.Release.Name "tractusx-connector-controlplane" }}
{{- end }}
{{- end }}
{{ end }}
{{- end }}

{{- define "edc.dataplane.host" -}}
{{- if .Values.dataplaneUrl }}
{{- tpl .Values.dataplaneUrl . }}
{{ else }}
{{- with (first (index .Values "tractusx-connector" "dataplane" "ingresses")) }}
{{- if .enabled }}
{{- printf "https://%s" .hostname }}
{{- else }}
{{- printf "http://%s-%s:8081" $.Release.Name "tractusx-connector-dataplane" }}
{{- end }}
{{- end }}
{{ end }}
{{- end }}

{{- define "edc.key" -}}
{{- index .Values "tractusx-connector" "controlplane" "endpoints" "management" "authKey" }}
{{- end }}

{{- define "edc.bpn" -}}
{{- index .Values "tractusx-connector" "participant" "id" }}
{{- end }}

79 changes: 79 additions & 0 deletions deployment/data-consumer/templates/post-install-vault-setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# #############################################################################
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
{{ if .Values.vault.enabled }}
{{- $vaultToken := index .Values "tractusx-connector" "vault" "hashicorp" "token" -}}
{{- $vaultUrl := tpl (index .Values "tractusx-connector" "vault" "hashicorp" "url") . -}}
{{- $fullName := include "dataprovider.fullname" . -}}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ $fullName }}-post-install-vault-setup
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
metadata:
name: "{{ .Release.Name }}"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
restartPolicy: Never
containers:
- name: post-install-job
image: "alpine:3.19"
imagePullPolicy: "IfNotPresent"
command:
- "/bin/sh"
- "-c"
- |
sleep 10
{{- range $key, $value := .Values.secrets }}
wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \
--post-data '{"data": {"content": "{{ $value }}"}}' "{{ $vaultUrl }}/v1/secret/data/{{ $key }}"
{{- end }}

wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \
--post-file=/opt/config/cert.json "{{ $vaultUrl }}/v1/secret/data/tokenSignerPublicKey"

wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \
--post-file=/opt/config/key.json "{{ $vaultUrl }}/v1/secret/data/tokenSignerPrivateKey"

wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \
--post-file=/opt/config/aes-secret.json "{{ $vaultUrl }}/v1/secret/data/tokenEncryptionAesKey"
volumeMounts:
- name: config-volume
mountPath: /opt/config
volumes:
- name: config-volume
configMap:
name: {{ $fullName }}-vault-edc-configmap
defaultMode: 0777
{{ end }}
44 changes: 44 additions & 0 deletions deployment/data-consumer/templates/vault-edc-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# #############################################################################
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
{{ $fullName := include "dataprovider.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $fullName }}-vault-edc-configmap
data:
cert.json: |-
{
"data": {
"content": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsP1Wl50viKzVqw8HGFWP\nis+M8Im4daTFMned5Qr2z90FNgkj1EVhip0mOdD6kDg3bW4RxyL6z3jWi19JKBHZ\n68UTgZNdPbhhPNLEGcQpu8uwgFcWKL4P/IOykEeE8ResGOVg/HzNE7HkTgiBdr2C\nMTEXL3zTmdr0vbFGMbOTPyOvKMoy/2FaJaJAPXo3poGqfRvr6Gu6top2ktRd/z8N\nhBpuzx9QypIsE62ooLNPpqzjezfvzJbc3tko/cXNOyGoZWuEKMTfKwYq3ZjsTZKk\nbjVNgdoEFSWpd6Tqk76B1Cboxv1CD8xw0cQ149eW0IuLkAk3eF5eZR4iQ5YAOZqA\nUQIDAQAB\n-----END PUBLIC KEY-----\n"
}
}

key.json: |-
{
"data": {
"content": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCw/VaXnS+IrNWr\nDwcYVY+Kz4z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