diff --git a/backend/docker-compose.yaml b/backend/docker-compose.yaml index d953510b..6d6e3b90 100644 --- a/backend/docker-compose.yaml +++ b/backend/docker-compose.yaml @@ -21,16 +21,22 @@ version: '1' services: puris-backend: - image: puris-backend:dev + image: tractusx/app-puris-backend:main container_name: backend ports: - 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 diff --git a/charts/puris-backend/templates/deployment.yaml b/charts/puris-backend/templates/deployment.yaml deleted file mode 100644 index a0cf844e..00000000 --- a/charts/puris-backend/templates/deployment.yaml +++ /dev/null @@ -1,82 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "puris-backend.fullname" . }} - labels: - {{- include "puris-backend.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "puris-backend.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "puris-backend.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "puris-backend.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: SERVER_PORT - value: "{{ .Values.service.port }}" - - name: API_ROOTDIR - value: "{{ .Values.api.rootDir }}" - - name: DATASOURCE_DRIVERCLASSNAME - value: "{{ .Values.datasource.driverClassName }}" - - name: DATASOURCE_URL - value: "{{ .Values.datasource.url }}" - - name: DATASOURCE_USERNAME - value: "{{ .Values.datasource.username }}" - - name: DATASOURCE_PASSWORD - value: "{{ .Values.datasource.password }}" - - name: EDC_CONTROLPLANE_HOST - value: "{{ .Values.edc.controlplane.host }}" - - name: EDC_CONTROLPLANE_DATA_PORT - value: "{{ .Values.edc.controlplane.data.port }}" - - name: EDC_CONTROLPLANE_KEY - value: "{{ .Values.edc.controlplane.key | default (randAlphaNum 16) }}" - - name: EDC_BACKEND_URL - value: "{{ .Values.edc.backend.url }}" - ports: - - name: http - containerPort: {{ .Values.service.port }} - protocol: TCP - livenessProbe: - httpGet: - path: /catena/health/ - port: http - readinessProbe: - httpGet: - path: /catena/health/ - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/puris-backend/.helmignore b/charts/puris/.helmignore similarity index 92% rename from charts/puris-backend/.helmignore rename to charts/puris/.helmignore index 0e8a0eb3..526582a4 100644 --- a/charts/puris-backend/.helmignore +++ b/charts/puris/.helmignore @@ -21,3 +21,5 @@ .idea/ *.tmproj .vscode/ +# Helm depencies +charts/*.tgz diff --git a/charts/puris/Chart.yaml b/charts/puris/Chart.yaml new file mode 100644 index 00000000..4f19ef98 --- /dev/null +++ b/charts/puris/Chart.yaml @@ -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" diff --git a/charts/puris/LICENSE b/charts/puris/LICENSE new file mode 100644 index 00000000..e69de29b diff --git a/charts/puris/README.md b/charts/puris/README.md new file mode 100644 index 00000000..e69de29b diff --git a/charts/puris-backend/README.md.gotmpl b/charts/puris/README.md.gotmpl similarity index 87% rename from charts/puris-backend/README.md.gotmpl rename to charts/puris/README.md.gotmpl index 1b0704bd..eba6b0f9 100644 --- a/charts/puris-backend/README.md.gotmpl +++ b/charts/puris/README.md.gotmpl @@ -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" . }} diff --git a/charts/puris-frontend/.helmignore b/charts/puris/charts/backend/.helmignore similarity index 92% rename from charts/puris-frontend/.helmignore rename to charts/puris/charts/backend/.helmignore index 0e8a0eb3..526582a4 100644 --- a/charts/puris-frontend/.helmignore +++ b/charts/puris/charts/backend/.helmignore @@ -21,3 +21,5 @@ .idea/ *.tmproj .vscode/ +# Helm depencies +charts/*.tgz diff --git a/charts/puris-backend/Chart.yaml b/charts/puris/charts/backend/Chart.yaml similarity index 96% rename from charts/puris-backend/Chart.yaml rename to charts/puris/charts/backend/Chart.yaml index 6f82c1ee..e679be58 100644 --- a/charts/puris-backend/Chart.yaml +++ b/charts/puris/charts/backend/Chart.yaml @@ -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 @@ -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" + diff --git a/charts/puris-backend/LICENSE b/charts/puris/charts/backend/LICENSE similarity index 100% rename from charts/puris-backend/LICENSE rename to charts/puris/charts/backend/LICENSE diff --git a/charts/puris-backend/README.md b/charts/puris/charts/backend/README.md similarity index 63% rename from charts/puris-backend/README.md rename to charts/puris/charts/backend/README.md index f5be20f0..cab16f56 100644 --- a/charts/puris-backend/README.md +++ b/charts/puris/charts/backend/README.md @@ -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 @@ -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 @@ -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 | @@ -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 | @@ -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) diff --git a/charts/puris/charts/backend/README.md.gotmpl b/charts/puris/charts/backend/README.md.gotmpl new file mode 100644 index 00000000..e69de29b diff --git a/charts/puris-backend/templates/NOTES.txt b/charts/puris/charts/backend/templates/NOTES.txt similarity index 100% rename from charts/puris-backend/templates/NOTES.txt rename to charts/puris/charts/backend/templates/NOTES.txt diff --git a/charts/puris-backend/templates/_helpers.tpl b/charts/puris/charts/backend/templates/_helpers.tpl similarity index 100% rename from charts/puris-backend/templates/_helpers.tpl rename to charts/puris/charts/backend/templates/_helpers.tpl diff --git a/charts/puris/charts/backend/templates/deployment.yaml b/charts/puris/charts/backend/templates/deployment.yaml new file mode 100644 index 00000000..7db0ba68 --- /dev/null +++ b/charts/puris/charts/backend/templates/deployment.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "puris-backend.fullname" . }} + labels: + {{- include "puris-backend.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "puris-backend.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "puris-backend.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "puris-backend.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: SERVER_PORT + value: "{{ .Values.service.port }}" + - name: API_ROOTDIR + value: "{{ .Values.puris.api.rootDir }}" + - name: DATASOURCE_DRIVERCLASSNAME + value: "{{ .Values.puris.datasource.driverClassName }}" + - name: DATASOURCE_URL + value: "{{ .Values.puris.datasource.url }}" + - name: DATASOURCE_USERNAME + value: "{{ .Values.puris.datasource.username }}" + - name: DATASOURCE_PASSWORD + value: "{{ .Values.puris.datasource.password }}" + - name: EDC_CONTROLPLANE_HOST + value: "{{ .Values.puris.edc.controlplane.host }}" + - name: EDC_CONTROLPLANE_DATA_PORT + value: "{{ .Values.puris.edc.controlplane.data.port }}" + - name: EDC_CONTROLPLANE_KEY + value: "{{ .Values.puris.edc.controlplane.key | default (randAlphaNum 16) }}" + - name: EDC_BACKEND_URL + value: "{{ .Values.puris.edc.backend.url }}" + - name: EDC_APPLYDATAPLANEWORKAROUND + value: "{{ .Values.puris.edc.applydataplaneworkaround }}" + - name: EDC_DATAPLANE_PUBLIC_PORT + value: "{{ .Values.puris.edc.dataplane.public.port }}" + - name: EDC_IDSURL + value: "{{ .Values.puris.edc.idsurl }}" + - name: MINIKUBE_IP + value: "{{ .Values.puris.minikube.ip }}" + - name: OWN_BPNL + value: "{{ .Values.puris.own.bpnl }}" + - name: OWN_BPNS + value: "{{ .Values.puris.own.bpns }}" + - name: OWN_EDR_DELETIONTIMER + value: "{{ .Values.puris.own.edr.deletiontimer }}" + - name: PURIS_APIVERSION + value: "{{ .Values.puris.apiversion }}" + - name: PURIS_DEMONSTRATOR_ROLE + value: "{{ .Values.puris.demonstrator.role }}" + - name: JPA_HIBERNATE_DDL-AUTO + value: {{ index .Values "puris" "jpa" "hibernate" "ddl-auto" }} #Need to do workaround because of '-' in ddl-auto + - name: JPA_PROPERTIES_HIBERNATE_ENABLE.LAZY.LOAD.NO.TRANS + value: "{{ .Values.puris.jpa.properties.hibernate.enable_lazy_load_no_trans }}" + - name: MY_BASE_URL + value: "{{ .Values.puris.my.base.url }}" + - name: REQUEST_SERVERENDPOINT + value: "{{ .Values.puris.request.serverendpoint }}" + - name: REQUEST_APIASSETID + value: "{{ .Values.puris.request.apiassetid }}" + - name: RESPONSE_SERVERENDPOINT + value: "{{ .Values.puris.response.serverendpoint }}" + - name: RESPONSE_APIASSETID + value: "{{ .Values.puris.response.apiassetid }}" + - name: EDR_ENDPOINT + value: "{{ .Values.puris.edr.endpoint }}" + + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + httpGet: + path: /catena/health/ + port: http + readinessProbe: + httpGet: + path: /catena/health/ + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/puris-backend/templates/hpa.yaml b/charts/puris/charts/backend/templates/hpa.yaml similarity index 100% rename from charts/puris-backend/templates/hpa.yaml rename to charts/puris/charts/backend/templates/hpa.yaml diff --git a/charts/puris-backend/templates/ingress.yaml b/charts/puris/charts/backend/templates/ingress.yaml similarity index 100% rename from charts/puris-backend/templates/ingress.yaml rename to charts/puris/charts/backend/templates/ingress.yaml diff --git a/charts/puris-backend/templates/service.yaml b/charts/puris/charts/backend/templates/service.yaml similarity index 100% rename from charts/puris-backend/templates/service.yaml rename to charts/puris/charts/backend/templates/service.yaml diff --git a/charts/puris-backend/templates/serviceaccount.yaml b/charts/puris/charts/backend/templates/serviceaccount.yaml similarity index 100% rename from charts/puris-backend/templates/serviceaccount.yaml rename to charts/puris/charts/backend/templates/serviceaccount.yaml diff --git a/charts/puris-backend/templates/tests/test-connection.yaml b/charts/puris/charts/backend/templates/tests/test-connection.yaml similarity index 100% rename from charts/puris-backend/templates/tests/test-connection.yaml rename to charts/puris/charts/backend/templates/tests/test-connection.yaml diff --git a/charts/puris-backend/values.yaml b/charts/puris/charts/backend/values.yaml similarity index 67% rename from charts/puris-backend/values.yaml rename to charts/puris/charts/backend/values.yaml index 709de902..0d633395 100644 --- a/charts/puris-backend/values.yaml +++ b/charts/puris/charts/backend/values.yaml @@ -24,11 +24,12 @@ replicaCount: 1 image: # -- Repository of the docker image - repository: ghcr.io/catenax-ng/tx-puris-backend/puris-backend + + repository: tractusx/app-puris-backend # -- THe policy for the image pull process pullPolicy: IfNotPresent # -- Overrides the image tag whose default is the chart appVersion. - tag: ""S + tag: "" # -- List of used secrets imagePullSecrets: [] @@ -89,7 +90,8 @@ autoscaling: ingress: # -- Enable the Ingress - enabled: true + enabled: false + annotations: # -- Kubernetes Ingress class annotation for direct bindings kubernetes.io/ingress.class: nginx @@ -160,31 +162,79 @@ readinessProbe: # -- Timeout in seconds of the readiness probe timeoutSeconds: 1 - # APPLICATION SPECIFIC -api: - # -- The root directory of the API - rootDir: /catena - -datasource: - # -- Driver class name of the database - driverClassName: org.hsqldb.jdbc.JDBCDriver - # -- URL of the database - url: jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1 - # -- Username of the database - username: sa - # -- Password for the database user - password: "" - -edc: - controlplane: - # -- IP address of the EDC control plane - host: 172.17.0.2 - data: - # -- Data port of the EDC control plane - port: 30091 - # -- Key for the EDC control plane - key: "" - backend: - # -- URL of the EDC backend service - url: http://172.17.0.2:32084 +puris: + api: + # -- The root directory of the API + rootDir: /catena + datasource: + # -- Driver class name of the database + driverClassName: org.hsqldb.jdbc.JDBCDriver + # -- URL of the database + url: jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1 + # -- Username of the database + username: sa + # -- Password for the database user. + # Do not set a password! + password: + edc: + controlplane: + # -- IP address of the EDC control plane + host: 172.17.0.2 + data: + # -- Data port of the EDC control plane + port: 30091 + # -- Key for the EDC control plane + key: "" + backend: + # -- URL of the EDC backend service + url: http://172.17.0.2:32084 + applydataplaneworkaround: true + dataplane: + public: + # -- Public port of the EDC data plane + port: 30784 + # -- Own IDS URL of the EDC + idsUrl: http://plato-controlplane:8084/api/v1/ids + minikube: + # -- IP of minikube for the EDC configuration + ip: host.minikube.internal + own: + # -- Own BPNL of the EDC + bpnl: BPNL1234567890ZZ + # -- Own BPNS of the EDC + bpns: BPNS1234567890ZZ + edr: + # -- Number of minutes before received authentication data of a consumer pull is removed from memory + deletiontimer: 2 + # -- Current version of the puris API + apiversion: 1.0.0 + demonstrator: + # -- Current role of the PURIS demonstrator. Default value should be empty. + # Can be set to "customer" or "supplier" to enable demonstration setup + role: + jpa: + hibernate: + # -- Initialises SQL database with Hibernate property "create" to allow Hibernate to first drop all tables and then create new ones + ddl-auto: create + properties: + hibernate: + # -- Enables "Lazy load no trans" property to fetch of each lazy entity to open a temporary session and run inside a separate transaction + enable_lazy_load_no_trans: true + my: + base: + # -- Own base URL + url: http://localhost + request: + # -- Endpoint of server for request + serverendpoint: ${my.base.url}:${server.port}/catena/product-stock/request + # -- Asset ID for request API + apiassetid: product-stock-request-api + response: + # -- Endpoint of server for response + serverendpoint: ${my.base.url}:${server.port}/catena/product-stock/response + # -- Asset ID for response API + apiassetid: product-stock-response-api + edr: + # -- Endpoint for EDR + endpoint: ${my.base.url}:${server.port}/catena/edrendpoint diff --git a/charts/puris/charts/frontend/.helmignore b/charts/puris/charts/frontend/.helmignore new file mode 100644 index 00000000..e69de29b diff --git a/charts/puris-frontend/Chart.yaml b/charts/puris/charts/frontend/Chart.yaml similarity index 96% rename from charts/puris-frontend/Chart.yaml rename to charts/puris/charts/frontend/Chart.yaml index 6519fb22..d02b8b0b 100644 --- a/charts/puris-frontend/Chart.yaml +++ b/charts/puris/charts/frontend/Chart.yaml @@ -20,7 +20,7 @@ # apiVersion: v2 -name: puris-frontend +name: frontend description: A Helm chart for Kubernetes deployment of the PURIS Frontend type: application home: https://github.com/eclipse-tractusx/puris @@ -32,10 +32,11 @@ 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" diff --git a/charts/puris-frontend/LICENSE b/charts/puris/charts/frontend/LICENSE similarity index 100% rename from charts/puris-frontend/LICENSE rename to charts/puris/charts/frontend/LICENSE diff --git a/charts/puris-frontend/README.md b/charts/puris/charts/frontend/README.md similarity index 68% rename from charts/puris-frontend/README.md rename to charts/puris/charts/frontend/README.md index 2cbed39c..59981cf9 100644 --- a/charts/puris-frontend/README.md +++ b/charts/puris/charts/frontend/README.md @@ -1,6 +1,6 @@ -# puris-frontend +# frontend -![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 Frontend @@ -13,7 +13,7 @@ A Helm chart for Kubernetes deployment of the PURIS Frontend ## TL;DR ```shell -$ helm install puris-frontend --namespace puris --create-namespace . +$ helm install frontend --namespace puris --create-namespace . ``` ## Source Code @@ -27,15 +27,13 @@ $ helm install puris-frontend --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 | -| app.viteAppName | string | `"PURIS"` | The name of the app displayed in the frontend | -| app.viteBaseUrl | string | `"http://192.168.49.2:30001/catena"` | The base URL for vite | | autoscaling.enabled | bool | `false` | Enable or disable the autoscaling of pods | | autoscaling.maxReplicas | int | `100` | Number of maximum replica pods for autoscaling | | autoscaling.minReplicas | int | `1` | Number of minimum replica pods for autoscaling | | autoscaling.targetCPUUtilizationPercentage | int | `80` | Value of CPU usage in percentage for autoscaling decisions | | 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-frontend/puris-frontend"` | Repository of the docker image | +| image.repository | string | `"tractusx/app-puris-frontend"` | Repository of the docker image | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | | imagePullSecrets | list | `[]` | List of used secrets | | ingress.annotations | object | `{}` | Annotations for the Ingress controller | @@ -53,6 +51,15 @@ $ helm install puris-frontend --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.appName | string | `"PURIS"` | The name of the app displayed in the frontend | +| puris.baseUrl | string | `"http://192.168.49.2:30001/catena"` | The base URL for the backend base URL without further endpoints | +| puris.endpointCustomer | string | `"stockView/customer?ownMaterialNumber="` | The endpoint for the customers own material number for the stock view | +| puris.endpointMaterialStocks | string | `"stockView/material-stocks"` | The endpoint for material stocks for the stock view | +| puris.endpointMaterials | string | `"stockView/materials"` | The endpoint for materials for the stock view | +| puris.endpointPartnerProductStocks | string | `"stockView/partner-product-stocks?ownMaterialNumber="` | The endpoint for the partners product stocks and their material numbers for the stock view | +| puris.endpointProductStocks | string | `"stockView/product-stocks"` | The endpoint for product stocks for the stock view | +| puris.endpointProducts | string | `"stockView/products"` | The endpoint for products for the stock view | +| puris.endpointUpdatePartnerProductStocks | string | `"stockView/update-partner-product-stock?ownMaterialNumber="` | The endpoint for updating the partners product stocks and their material numbers for the stock view | | readinessProbe | object | `{"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"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 | `10` | Delay in seconds after which an initial readiness probe is checked | @@ -62,7 +69,11 @@ $ helm install puris-frontend --namespace puris --create-namespace . | replicaCount | int | `1` | Number of replicas of the Kubernetes deployment | | resources.limits | object | `{"cpu":"500m","memory":"128Mi"}` | Maximum resource limits of CPU und memory | | resources.requests | object | `{"cpu":"100m","memory":"128Mi"}` | Minimum requested resources for CPU und memory | -| securityContext | object | `{}` | Security configurations | +| securityContext | object | `{"allowPrivilegeEscalation":false,"runAsGroup":3000,"runAsNonRoot":true,"runAsUser":1000}` | Security configurations | +| securityContext.allowPrivilegeEscalation | bool | `false` | Get more privileges than the parent process | +| securityContext.runAsGroup | int | `3000` | Configures the group id of a user for a run | +| securityContext.runAsNonRoot | bool | `true` | Configures the non-root privileges for a run | +| securityContext.runAsUser | int | `1000` | Configures the user id for a run | | service.port | int | `8080` | The port of the service | | service.type | string | `"NodePort"` | Type of the service | | serviceAccount.annotations | object | `{}` | Annotations to add to the service account | @@ -71,4 +82,4 @@ $ helm install puris-frontend --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) diff --git a/charts/puris-frontend/README.md.gotmpl b/charts/puris/charts/frontend/README.md.gotmpl similarity index 88% rename from charts/puris-frontend/README.md.gotmpl rename to charts/puris/charts/frontend/README.md.gotmpl index b1ff9694..516c3f8b 100644 --- a/charts/puris-frontend/README.md.gotmpl +++ b/charts/puris/charts/frontend/README.md.gotmpl @@ -15,7 +15,7 @@ ## TL;DR ```shell -$ helm install puris-frontend --namespace puris --create-namespace . +$ helm install frontend --namespace puris --create-namespace . ``` {{ template "chart.maintainersSection" . }} diff --git a/charts/puris-frontend/templates/NOTES.txt b/charts/puris/charts/frontend/templates/NOTES.txt similarity index 100% rename from charts/puris-frontend/templates/NOTES.txt rename to charts/puris/charts/frontend/templates/NOTES.txt diff --git a/charts/puris-frontend/templates/_helpers.tpl b/charts/puris/charts/frontend/templates/_helpers.tpl similarity index 100% rename from charts/puris-frontend/templates/_helpers.tpl rename to charts/puris/charts/frontend/templates/_helpers.tpl diff --git a/charts/puris-frontend/templates/deployment.yaml b/charts/puris/charts/frontend/templates/deployment.yaml similarity index 66% rename from charts/puris-frontend/templates/deployment.yaml rename to charts/puris/charts/frontend/templates/deployment.yaml index 0aed9bd6..e2f90a7a 100644 --- a/charts/puris-frontend/templates/deployment.yaml +++ b/charts/puris/charts/frontend/templates/deployment.yaml @@ -34,10 +34,24 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: VITE_APP_NAME - value: "{{ .Values.app.viteAppName }}" - - name: VITE_BASE_URL - value: "{{ .Values.app.viteBaseUrl }}" + - name: APP_NAME + value: "{{ .Values.puris.appName }}" + - name: BACKEND_BASE_URL + value: "{{ .Values.puris.baseUrl }}" + - name: ENDPOINT_MATERIALS + value: "{{ .Values.puris.endpointMaterials }}" + - name: ENDPOINT_PRODUCTS + value: "{{ .Values.puris.endpointProducts }}" + - name: ENDPOINT_MATERIAL_STOCKS + value: "{{ .Values.puris.endpointMaterialStocks }}" + - name: ENDPOINT_PRODUCT_STOCKS + value: "{{ .Values.puris.endpointProductStocks }}" + - name: ENDPOINT_CUSTOMER + value: "{{ .Values.puris.endpointCustomer }}" + - name: ENDPOINT_PARTNER_PRODUCT_STOCKS + value: "{{ .Values.puris.endpointPartnerProductStocks }}" + - name: ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK + value: "{{ .Values.puris.endpointUpdatePartnerProductStocks }}" ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/charts/puris-frontend/templates/hpa.yaml b/charts/puris/charts/frontend/templates/hpa.yaml similarity index 100% rename from charts/puris-frontend/templates/hpa.yaml rename to charts/puris/charts/frontend/templates/hpa.yaml diff --git a/charts/puris-frontend/templates/ingress.yaml b/charts/puris/charts/frontend/templates/ingress.yaml similarity index 100% rename from charts/puris-frontend/templates/ingress.yaml rename to charts/puris/charts/frontend/templates/ingress.yaml diff --git a/charts/puris-frontend/templates/service.yaml b/charts/puris/charts/frontend/templates/service.yaml similarity index 100% rename from charts/puris-frontend/templates/service.yaml rename to charts/puris/charts/frontend/templates/service.yaml diff --git a/charts/puris-frontend/templates/serviceaccount.yaml b/charts/puris/charts/frontend/templates/serviceaccount.yaml similarity index 100% rename from charts/puris-frontend/templates/serviceaccount.yaml rename to charts/puris/charts/frontend/templates/serviceaccount.yaml diff --git a/charts/puris-frontend/templates/tests/test-connection.yaml b/charts/puris/charts/frontend/templates/tests/test-connection.yaml similarity index 100% rename from charts/puris-frontend/templates/tests/test-connection.yaml rename to charts/puris/charts/frontend/templates/tests/test-connection.yaml diff --git a/charts/puris-frontend/values.yaml b/charts/puris/charts/frontend/values.yaml similarity index 77% rename from charts/puris-frontend/values.yaml rename to charts/puris/charts/frontend/values.yaml index 85234efa..a688d214 100644 --- a/charts/puris-frontend/values.yaml +++ b/charts/puris/charts/frontend/values.yaml @@ -24,7 +24,7 @@ replicaCount: 1 image: # -- Repository of the docker image - repository: ghcr.io/catenax-ng/tx-puris-frontend/puris-frontend + repository: tractusx/app-puris-frontend # -- THe policy for the image pull process pullPolicy: IfNotPresent # -- Overrides the image tag whose default is the chart appVersion. @@ -55,11 +55,15 @@ podSecurityContext: {} # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ # @url: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod # -- Security configurations -securityContext: {} -# allowPrivilegeEscalation: false -# runAsNonRoot: true -# runAsUser: 1000 -# runAsGroup: 3000 +securityContext: + # -- Get more privileges than the parent process + allowPrivilegeEscalation: false + # -- Configures the non-root privileges for a run + runAsNonRoot: true + # -- Configures the user id for a run + runAsUser: 1000 + # -- Configures the group id of a user for a run + runAsGroup: 3000 service: # -- Type of the service @@ -155,10 +159,23 @@ readinessProbe: # -- Timeout in seconds of the readiness probe timeoutSeconds: 1 - # APPLICATION SPECIFIC -app: - # -- The name of the app displayed in the frontend - viteAppName: PURIS - # -- The base URL for vite - viteBaseUrl: http://192.168.49.2:30001/catena +puris: + # -- The name of the app displayed in the frontend + appName: PURIS + # -- The base URL for the backend base URL without further endpoints + baseUrl: http://192.168.49.2:30001/catena + # -- The endpoint for materials for the stock view + endpointMaterials: stockView/materials + # -- The endpoint for products for the stock view + endpointProducts: stockView/products + # -- The endpoint for material stocks for the stock view + endpointMaterialStocks: stockView/material-stocks + # -- The endpoint for product stocks for the stock view + endpointProductStocks: stockView/product-stocks + # -- The endpoint for the customers own material number for the stock view + endpointCustomer: stockView/customer?ownMaterialNumber= + # -- The endpoint for the partners product stocks and their material numbers for the stock view + endpointPartnerProductStocks: stockView/partner-product-stocks?ownMaterialNumber= + # -- The endpoint for updating the partners product stocks and their material numbers for the stock view + endpointUpdatePartnerProductStocks: stockView/update-partner-product-stock?ownMaterialNumber= diff --git a/charts/puris/values.yaml b/charts/puris/values.yaml new file mode 100644 index 00000000..ebd8e126 --- /dev/null +++ b/charts/puris/values.yaml @@ -0,0 +1,400 @@ +# +# 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 +# + +# FRONTEND ----------- +frontend: + replicaCount: 1 + + image: + # -- Repository of the docker image + repository: tractusx/app-puris-frontend + # -- THe policy for the image pull process + pullPolicy: IfNotPresent + # -- Overrides the image tag whose default is the chart appVersion. + tag: "" + + # -- List of used secrets + imagePullSecrets: [ ] + # -- Possibility to override the name + nameOverride: "" + # -- Possibility to override the fullname + fullnameOverride: "" + + serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Annotations to add to the service account + annotations: { } + # -- The name of the service account to use. If not set and create is true, a name is generated using the fullname template + name: "" + + # -- Annotations added to a running pod + podAnnotations: { } + + # -- Added security contexts for a pod + podSecurityContext: { } + # fsGroup: 2000 + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod + # -- Security configurations + securityContext: + # -- Get more privileges than the parent process + allowPrivilegeEscalation: false + # -- Configures the non-root privileges for a run + runAsNonRoot: true + # -- Configures the user id for a run + runAsUser: 1000 + # -- Configures the group id of a user for a run + runAsGroup: 3000 + + service: + # -- Type of the service + type: NodePort + # -- The port of the service + port: 8080 + + ingress: + # -- Enable the Ingress + enabled: false + # -- Class name for the Ingress controller + className: "" + # -- Annotations for the Ingress controller + annotations: { } + # -- Hosts for the Ingress controller + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + # -- TLS certificates for the Ingress controller + tls: [ ] + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits + resources: + # -- Maximum resource limits of CPU und memory + limits: + cpu: 500m + memory: 128Mi + # -- Minimum requested resources for CPU und memory + requests: + cpu: 100m + memory: 128Mi + + autoscaling: + # -- Enable or disable the autoscaling of pods + enabled: false + # -- Number of minimum replica pods for autoscaling + minReplicas: 1 + # -- Number of maximum replica pods for autoscaling + maxReplicas: 100 + # -- Value of CPU usage in percentage for autoscaling decisions + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + # -- Constrains for the node selector + nodeSelector: { } + + # -- Constrains for tolerations + tolerations: [ ] + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity + affinity: + podAntiAffinity: + # -- Rules for the scheduler to find a pod + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + # -- Matching Expressions as key and operators for the pod affinity + matchExpressions: + - key: app.kubernetes.io/name + operator: DoesNotExist + # -- Topology key of the Kubernetes cluster + topologyKey: kubernetes.io/hostname + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L210 + # -- Checks whether a pod is alive or not + livenessProbe: + # -- Number of failures (threshold) for a liveness probe + failureThreshold: 3 + # -- Delay in seconds after which an initial liveness probe is checked + initialDelaySeconds: 10 + # -- Wait time in seconds between liveness probes + periodSeconds: 10 + # -- Number of trys until a pod is marked alive + successThreshold: 1 + # -- Timeout in seconds of the liveness probe + timeoutSeconds: 1 + # -- Checks if the pod is fully ready to operate + readinessProbe: + # -- Number of failures (threshold) for a readiness probe + failureThreshold: 3 + # -- Delay in seconds after which an initial readiness probe is checked + initialDelaySeconds: 10 + # -- Wait time in seconds between readiness probes + periodSeconds: 10 + # -- Number of trys until a pod is marked ready + successThreshold: 1 + # -- Timeout in seconds of the readiness probe + timeoutSeconds: 1 + + puris: + # -- The name of the app displayed in the frontend + appName: PURIS + # -- The base URL for the backend base URL without further endpoints + baseUrl: http://192.168.49.2:30001/catena + # -- The endpoint for materials for the stock view + endpointMaterials: stockView/materials + # -- The endpoint for products for the stock view + endpointProducts: stockView/products + # -- The endpoint for material stocks for the stock view + endpointMaterialStocks: stockView/material-stocks + # -- The endpoint for product stocks for the stock view + endpointProductStocks: stockView/product-stocks + # -- The endpoint for the customers own material number for the stock view + endpointCustomer: stockView/customer?ownMaterialNumber= + # -- The endpoint for the partners product stocks and their material numbers for the stock view + endpointPartnerProductStocks: stockView/partner-product-stocks?ownMaterialNumber= + # -- The endpoint for updating the partners product stocks and their material numbers for the stock view + endpointUpdatePartnerProductStocks: stockView/update-partner-product-stock?ownMaterialNumber= + +# BACKEND ----------- +backend: + # -- Number of replicas of the Kubernetes deployment + replicaCount: 1 + + image: + # -- Repository of the docker image + repository: tractusx/app-puris-backend + # -- THe policy for the image pull process + pullPolicy: IfNotPresent + # -- Overrides the image tag whose default is the chart appVersion. + tag: "" + + # -- List of used secrets + imagePullSecrets: [ ] + # -- Possibility to override the name + nameOverride: "" + # -- Possibility to override the fullname + fullnameOverride: "" + + serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Annotations to add to the service account + annotations: { } + # -- The name of the service account to use. If not set and create is true, a name is generated using the fullname template + name: "" + + # -- Annotations added to a running pod + podAnnotations: { } + + # -- Added security contexts for a pod + podSecurityContext: { } + # fsGroup: 2000 + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod + # -- Security configurations + securityContext: + # -- Get more privileges than the parent process + allowPrivilegeEscalation: false + # -- Configures the non-root privileges for a run + runAsNonRoot: true + # -- Configures the user id for a run + runAsUser: 1000 + # -- Configures the group id of a user for a run + runAsGroup: 3000 + + service: + # -- Type of the service + type: NodePort + # -- The port of the service + port: 8081 + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits + resources: + # -- Maximum resource limits of CPU und memory + limits: + cpu: 2000m + memory: 2048Mi + # -- Minimum requested resources for CPU und memory + requests: + cpu: 1000m + memory: 2048Mi + + autoscaling: + # -- Enable or disable the autoscaling of pods + enabled: false + + ingress: + # -- Enable the Ingress + enabled: false + annotations: + # -- Kubernetes Ingress class annotation for direct bindings + kubernetes.io/ingress.class: nginx + # -- Force redirects from HTTP to HTTPS + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + # -- Pass SSL traffic to the backend ports + nginx.ingress.kubernetes.io/ssl-passthrough: "true" + # -- The backend protocol type (e.g. HTTP) + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + # -- Hosts for the Ingress controller + hosts: + - host: "home.int.demo.catena-x.net" + paths: + - path: / + pathType: ImplementationSpecific + # -- TLS certificates for the Ingress controller + tls: + - secretName: tls-secret + hosts: + - home.int.demo.catena-x.net + + # -- Constrains for the node selector + nodeSelector: { } + + # -- Constrains for tolerations + tolerations: [ ] + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity + affinity: + podAntiAffinity: + # -- Rules for the scheduler to find a pod + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + # -- Matching Expressions as key and operators for the pod affinity + matchExpressions: + - key: app.kubernetes.io/name + operator: DoesNotExist + # -- Topology key of the Kubernetes cluster + topologyKey: kubernetes.io/hostname + + # Following Catena-X Helm Best Practices @url: https://eclipse-tractusx.github.io/docs/release/trg-5/trg-5-01/ + # @url: https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L210 + # -- Checks whether a pod is alive or not + livenessProbe: + # -- Number of failures (threshold) for a liveness probe + failureThreshold: 3 + # -- Delay in seconds after which an initial liveness probe is checked + initialDelaySeconds: 250 + # -- Wait time in seconds between liveness probes + periodSeconds: 25 + # -- Number of trys until a pod is marked alive + successThreshold: 1 + # -- Timeout in seconds of the liveness probe + timeoutSeconds: 1 + # -- Checks if the pod is fully ready to operate + readinessProbe: + # -- Number of failures (threshold) for a readiness probe + failureThreshold: 3 + # -- Delay in seconds after which an initial readiness probe is checked + initialDelaySeconds: 250 + # -- Wait time in seconds between readiness probes + periodSeconds: 25 + # -- Number of trys until a pod is marked ready + successThreshold: 1 + # -- Timeout in seconds of the readiness probe + timeoutSeconds: 1 + + puris: + api: + # -- The root directory of the API + rootDir: /catena + datasource: + # -- Driver class name of the database + driverClassName: org.hsqldb.jdbc.JDBCDriver + # -- URL of the database + url: jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1 + # -- Username of the database + username: sa + # -- Password for the database user. + # Do not set a password! + password: + edc: + controlplane: + # -- IP address of the EDC control plane + host: 172.17.0.2 + data: + # -- Data port of the EDC control plane + port: 30091 + # -- Key for the EDC control plane + key: "" + backend: + # -- URL of the EDC backend service + url: http://172.17.0.2:32084 + applydataplaneworkaround: true + dataplane: + public: + # -- Public port of the EDC data plane + port: 30784 + # -- Own IDS URL of the EDC + idsUrl: http://plato-controlplane:8084/api/v1/ids + minikube: + # -- IP of minikube for the EDC configuration + ip: host.minikube.internal + own: + # -- Own BPNL of the EDC + bpnl: BPNL1234567890ZZ + # -- Own BPNS of the EDC + bpns: BPNS1234567890ZZ + edr: + # -- Number of minutes before received authentication data of a consumer pull is removed from memory + deletiontimer: 2 + # -- Current version of the puris API + apiversion: 1.0.0 + demonstrator: + # -- Current role of the PURIS demonstrator. Default value should be empty. + # Can be set to "customer" or "supplier" to enable demonstration setup + role: + jpa: + hibernate: + # -- Initialises SQL database with Hibernate property "create" to allow Hibernate to first drop all tables and then create new ones + ddl-auto: create + properties: + hibernate: + # -- Enables "Lazy load no trans" property to fetch of each lazy entity to open a temporary session and run inside a separate transaction + enable_lazy_load_no_trans: true + my: + base: + # -- Own base URL + url: http://localhost + request: + # -- Endpoint of server for request + serverendpoint: ${my.base.url}:${server.port}/catena/product-stock/request + # -- Asset ID for request API + apiassetid: product-stock-request-api + response: + # -- Endpoint of server for response + serverendpoint: ${my.base.url}:${server.port}/catena/product-stock/response + # -- Asset ID for response API + apiassetid: product-stock-response-api + edr: + # -- Endpoint for EDR + endpoint: ${my.base.url}:${server.port}/catena/edrendpoint diff --git a/frontend/.env b/frontend/.env index 5ff918ed..8afd5a5d 100644 --- a/frontend/.env +++ b/frontend/.env @@ -1,10 +1,10 @@ # Local Dev Environment -VITE_APP_NAME=PURIS -VITE_BACKEND_BASE_URL=http://localhost:8081/catena/ -VITE_ENDPOINT_MATERIALS=stockView/materials -VITE_ENDPOINT_PRODUCTS=stockView/products -VITE_ENDPOINT_MATERIAL_STOCKS=stockView/material-stocks -VITE_ENDPOINT_PRODUCT_STOCKS=stockView/product-stocks -VITE_ENDPOINT_CUSTOMER=stockView/customer?ownMaterialNumber= -VITE_ENDPOINT_PARTNER_PRODUCT_STOCKS=stockView/partner-product-stocks?ownMaterialNumber= -VITE_ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK=stockView/update-partner-product-stock?ownMaterialNumber= +APP_NAME=PURIS +BACKEND_BASE_URL=http://localhost:8081/catena/ +ENDPOINT_MATERIALS=stockView/materials +ENDPOINT_PRODUCTS=stockView/products +ENDPOINT_MATERIAL_STOCKS=stockView/material-stocks +ENDPOINT_PRODUCT_STOCKS=stockView/product-stocks +ENDPOINT_CUSTOMER=stockView/customer?ownMaterialNumber= +ENDPOINT_PARTNER_PRODUCT_STOCKS=stockView/partner-product-stocks?ownMaterialNumber= +ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK=stockView/update-partner-product-stock?ownMaterialNumber= diff --git a/frontend/.env.dockerbuild b/frontend/.env.dockerbuild index 86fb9051..01ac8990 100644 --- a/frontend/.env.dockerbuild +++ b/frontend/.env.dockerbuild @@ -1,2 +1,9 @@ VITE_APP_NAME=\$APP_NAME VITE_BACKEND_BASE_URL=\$BACKEND_BASE_URL +VITE_ENDPOINT_MATERIALS=\$ENDPOINT_MATERIAL +VITE_ENDPOINT_PRODUCTS=\$ENDPOINT_PRODUCTS +VITE_ENDPOINT_MATERIAL_STOCKS=\$ENDPOINT_MATERIAL_STOCKS +VITE_ENDPOINT_PRODUCT_STOCKS=\$ENDPOINT_PRODUCT_STOCKS +VITE_ENDPOINT_CUSTOMER=\$ENDPOINT_CUSTOMER +VITE_ENDPOINT_PARTNER_PRODUCT_STOCKS=\$ENDPOINT_PARTNER_PRODUCT_STOCKS +VITE_ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK=\$ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK diff --git a/frontend/src/config.json b/frontend/src/config.json index 8a11fabe..789b0687 100644 --- a/frontend/src/config.json +++ b/frontend/src/config.json @@ -1,4 +1,11 @@ { "APP_NAME": "$APP_NAME", - "BACKEND_BASE_URL": "$BACKEND_BASE_URL" + "BACKEND_BASE_URL": "$BACKEND_BASE_URL", + "ENDPOINT_MATERIALS": "$ENDPOINT_MATERIAL", + "ENDPOINT_PRODUCTS": "$ENDPOINT_PRODUCTS", + "ENDPOINT_MATERIAL_STOCKS": "$ENDPOINT_MATERIAL_STOCKS", + "ENDPOINT_PRODUCT_STOCKS": "$ENDPOINT_PRODUCT_STOCKS", + "ENDPOINT_CUSTOMER": "$ENDPOINT_CUSTOMER", + "ENDPOINT_PARTNER_PRODUCT_STOCKS": "$ENDPOINT_PARTNER_PRODUCT_STOCKS", + "ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK":" $ENDPOINT_UPDATE_PARTNER_PRODUCT_STOCK" }