Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#44 from FraunhoferISST/feat/updat…
Browse files Browse the repository at this point in the history
…e-helm-charts

Feat/update helm charts
  • Loading branch information
tom-rm-meyer-ISST authored Oct 26, 2023
2 parents 0179dcd + acff237 commit d513583
Show file tree
Hide file tree
Showing 39 changed files with 799 additions and 177 deletions.
22 changes: 14 additions & 8 deletions backend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,22 @@
version: '1'
services:
puris-backend:

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Host Namespace is Shared

The hosts process namespace should not be shared by containers

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Memory Not Limited

Memory limits should be defined for each container. This prevents potential resource exhaustion by ensuring that containers consume not more than the designated amount of memory

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Host Namespace is Shared

The hosts process namespace should not be shared by containers

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Memory Not Limited

Memory limits should be defined for each container. This prevents potential resource exhaustion by ensuring that containers consume not more than the designated amount of memory

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Host Namespace is Shared

The hosts process namespace should not be shared by containers

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Memory Not Limited

Memory limits should be defined for each container. This prevents potential resource exhaustion by ensuring that containers consume not more than the designated amount of memory

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Host Namespace is Shared

The hosts process namespace should not be shared by containers

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Memory Not Limited

Memory limits should be defined for each container. This prevents potential resource exhaustion by ensuring that containers consume not more than the designated amount of memory

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Healthcheck Not Set

Check containers periodically to see if they are running properly.

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Host Namespace is Shared

The hosts process namespace should not be shared by containers

Check warning on line 23 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Memory Not Limited

Memory limits should be defined for each container. This prevents potential resource exhaustion by ensuring that containers consume not more than the designated amount of memory
image: puris-backend:dev
image: tractusx/app-puris-backend:main
container_name: backend
ports:

Check warning on line 26 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Container Traffic Not Bound To Host Interface

Incoming container traffic should be bound to a specific host interface

Check warning on line 26 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Container Traffic Not Bound To Host Interface

Incoming container traffic should be bound to a specific host interface

Check warning on line 26 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Container Traffic Not Bound To Host Interface

Incoming container traffic should be bound to a specific host interface

Check warning on line 26 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Container Traffic Not Bound To Host Interface

Incoming container traffic should be bound to a specific host interface

Check warning on line 26 in backend/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Container Traffic Not Bound To Host Interface

Incoming container traffic should be bound to a specific host interface
- 8081:8081
environment:
- server.port=8081
- puris.demonstrator.role= #customer/supplier
- edc.controlplane.host=172.17.0.2
- edc.controlplane.data.port=31605
- edc.dataplane.public.port=31503
- edc.idsUrl=http://plato-controlplane:8084/api/v1/ids
- own.bpnl= #BPNL4444444444XX
- own.bpns= #BPNS4444444444XX
- puris.demonstrator.role=
- edc.controlplane.host=customer-control-plane
- edc.controlplane.data.port=8181
- edc.controlplane.data.path=/api/v1/data
- edc.controlplane.key=password
- edc.dataplane.public.port=8285 # edc-customer-data-plane
- edc.applydataplaneworkaround=false
- edc.idsUrl=http://control-plane:8184/api/v1/ids
- own.bpnl=BPNL4444444444XX
- own.bpns=BPNS4444444444XX
- edr.endpoint=http://backend:8081/catena/edrendpoint
- request.serverendpoint=http://backend:8081/catena/product-stock/request
- response.serverendpoint=http://backend:8081/catena/product-stock/response
82 changes: 0 additions & 82 deletions charts/puris-backend/templates/deployment.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions charts/puris-backend/.helmignore → charts/puris/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
.idea/
*.tmproj
.vscode/
# Helm depencies
charts/*.tgz
46 changes: 46 additions & 0 deletions charts/puris/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# Copyright (c) 2023 Volkswagen AG
# Copyright (c) 2023 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. (represented by Fraunhofer ISST)
# Copyright (c) 2023 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: puris
description: An umbrella Helm chart for Kubernetes deployment of PURIS
type: application
home: https://github.com/eclipse-tractusx/puris
sources:
- https://github.com/eclipse-tractusx/puris
dependencies:
- name: frontend
version: 1.0.0
repository: "file://charts/frontend"
- name: backend
version: 1.0.0
repository: "file://charts/backend"

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.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: "main"
Empty file added charts/puris/LICENSE
Empty file.
Empty file added charts/puris/README.md
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@

## TL;DR
```shell
$ helm install puris-backend --namespace puris --create-namespace .
$ helm install puris --namespace puris --create-namespace .
```


{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
.idea/
*.tmproj
.vscode/
# Helm depencies
charts/*.tgz
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#

apiVersion: v2
name: puris-backend

name: backend

description: A Helm chart for Kubernetes deployment of the PURIS Backend
type: application
home: https://github.com/eclipse-tractusx/puris
Expand All @@ -32,10 +34,14 @@ maintainers: []
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

version: 1.0.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: "0.0.1-snapshot"

appVersion: "main"

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# puris-backend
# backend

![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1-snapshot](https://img.shields.io/badge/AppVersion-0.0.1--snapshot-informational?style=flat-square)
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: main](https://img.shields.io/badge/AppVersion-main-informational?style=flat-square)

A Helm chart for Kubernetes deployment of the PURIS Backend

Expand All @@ -12,7 +12,7 @@ A Helm chart for Kubernetes deployment of the PURIS Backend

## TL;DR
```shell
$ helm install puris-backend --namespace puris --create-namespace .
$ helm install backend --namespace puris --create-namespace .
```

## Source Code
Expand All @@ -26,26 +26,17 @@ $ helm install puris-backend --namespace puris --create-namespace .
| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app.kubernetes.io/name","operator":"DoesNotExist"}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | Rules for the scheduler to find a pod |
| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions | list | `[{"key":"app.kubernetes.io/name","operator":"DoesNotExist"}]` | Matching Expressions as key and operators for the pod affinity |
| affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.topologyKey | string | `"kubernetes.io/hostname"` | Topology key of the Kubernetes cluster |
| api.rootDir | string | `"/catena"` | The root directory of the API |
| autoscaling.enabled | bool | `false` | Enable or disable the autoscaling of pods |
| datasource.driverClassName | string | `"org.hsqldb.jdbc.JDBCDriver"` | Driver class name of the database |
| datasource.password | string | `""` | Password for the database user |
| datasource.url | string | `"jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1"` | URL of the database |
| datasource.username | string | `"sa"` | Username of the database |
| edc.backend.url | string | `"http://172.17.0.2:32084"` | URL of the EDC backend service |
| edc.controlplane.data.port | int | `30091` | Data port of the EDC control plane |
| edc.controlplane.host | string | `"172.17.0.2"` | IP address of the EDC control plane |
| edc.controlplane.key | string | `""` | Key for the EDC control plane |
| fullnameOverride | string | `""` | Possibility to override the fullname |
| image.pullPolicy | string | `"IfNotPresent"` | THe policy for the image pull process |
| image.repository | string | `"ghcr.io/catenax-ng/tx-puris-backend/puris-backend"` | Repository of the docker image |
| image.repository | string | `"tractusx/app-puris-backend"` | |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | List of used secrets |
| ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | Kubernetes Ingress class annotation for direct bindings |
| ingress.annotations."nginx.ingress.kubernetes.io/backend-protocol" | string | `"HTTP"` | The backend protocol type (e.g. HTTP) |
| ingress.annotations."nginx.ingress.kubernetes.io/force-ssl-redirect" | string | `"true"` | Force redirects from HTTP to HTTPS |
| ingress.annotations."nginx.ingress.kubernetes.io/ssl-passthrough" | string | `"true"` | Pass SSL traffic to the backend ports |
| ingress.enabled | bool | `true` | Enable the Ingress |
| ingress.enabled | bool | `false` | Enable the Ingress |
| ingress.hosts | list | `[{"host":"home.int.demo.catena-x.net","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | Hosts for the Ingress controller |
| ingress.tls | list | `[{"hosts":["home.int.demo.catena-x.net"],"secretName":"tls-secret"}]` | TLS certificates for the Ingress controller |
| livenessProbe | object | `{"failureThreshold":3,"initialDelaySeconds":250,"periodSeconds":25,"successThreshold":1,"timeoutSeconds":1}` | Checks whether a pod is alive or not |
Expand All @@ -58,6 +49,32 @@ $ helm install puris-backend --namespace puris --create-namespace .
| nodeSelector | object | `{}` | Constrains for the node selector |
| podAnnotations | object | `{}` | Annotations added to a running pod |
| podSecurityContext | object | `{}` | Added security contexts for a pod |
| puris.api.rootDir | string | `"/catena"` | The root directory of the API |
| puris.apiversion | string | `"1.0.0"` | Current version of the puris API |
| puris.datasource.driverClassName | string | `"org.hsqldb.jdbc.JDBCDriver"` | Driver class name of the database |
| puris.datasource.password | string | `nil` | Password for the database user. Do not set a password! |
| puris.datasource.url | string | `"jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1"` | URL of the database |
| puris.datasource.username | string | `"sa"` | Username of the database |
| puris.demonstrator.role | string | `nil` | Current role of the PURIS demonstrator. Default value should be empty. Can be set to "customer" or "supplier" to enable demonstration setup |
| puris.edc.applydataplaneworkaround | bool | `true` | |
| puris.edc.backend.url | string | `"http://172.17.0.2:32084"` | URL of the EDC backend service |
| puris.edc.controlplane.data.port | int | `30091` | Data port of the EDC control plane |
| puris.edc.controlplane.host | string | `"172.17.0.2"` | IP address of the EDC control plane |
| puris.edc.controlplane.key | string | `""` | Key for the EDC control plane |
| puris.edc.dataplane.public.port | int | `30784` | Public port of the EDC data plane |
| puris.edc.idsUrl | string | `"http://plato-controlplane:8084/api/v1/ids"` | Own IDS URL of the EDC |
| puris.edr.endpoint | string | `"${my.base.url}:${server.port}/catena/edrendpoint"` | Endpoint for EDR |
| puris.jpa.hibernate.ddl-auto | string | `"create"` | Initialises SQL database with Hibernate property "create" to allow Hibernate to first drop all tables and then create new ones |
| puris.jpa.properties.hibernate.enable_lazy_load_no_trans | bool | `true` | Enables "Lazy load no trans" property to fetch of each lazy entity to open a temporary session and run inside a separate transaction |
| puris.minikube.ip | string | `"host.minikube.internal"` | IP of minikube for the EDC configuration |
| puris.my.base.url | string | `"http://localhost"` | Own base URL |
| puris.own.bpnl | string | `"BPNL1234567890ZZ"` | Own BPNL of the EDC |
| puris.own.bpns | string | `"BPNS1234567890ZZ"` | Own BPNS of the EDC |
| puris.own.edr.deletiontimer | int | `2` | Number of minutes before received authentication data of a consumer pull is removed from memory |
| puris.request.apiassetid | string | `"product-stock-request-api"` | Asset ID for request API |
| puris.request.serverendpoint | string | `"${my.base.url}:${server.port}/catena/product-stock/request"` | Endpoint of server for request |
| puris.response.apiassetid | string | `"product-stock-response-api"` | Asset ID for response API |
| puris.response.serverendpoint | string | `"${my.base.url}:${server.port}/catena/product-stock/response"` | Endpoint of server for response |
| readinessProbe | object | `{"failureThreshold":3,"initialDelaySeconds":250,"periodSeconds":25,"successThreshold":1,"timeoutSeconds":1}` | Checks if the pod is fully ready to operate |
| readinessProbe.failureThreshold | int | `3` | Number of failures (threshold) for a readiness probe |
| readinessProbe.initialDelaySeconds | int | `250` | Delay in seconds after which an initial readiness probe is checked |
Expand All @@ -80,4 +97,4 @@ $ helm install puris-backend --namespace puris --create-namespace .
| tolerations | list | `[]` | Constrains for tolerations |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
Empty file.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d513583

Please sign in to comment.