From bce39aab7c84daa25dee46646392d197700f9a5e Mon Sep 17 00:00:00 2001 From: Pascal Marzec <134592101+PaMarzec@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:13:43 +0100 Subject: [PATCH] Refactor/helm subcharts (#111) * refactor: deletion of subcharts folder and all its components * docs: updated install.md for ingress deployment with helm Signed-off-by: Pascal Marzec --------- Signed-off-by: Pascal Marzec --- INSTALL.md | 40 ++- charts/puris/charts/backend/.helmignore | 25 -- charts/puris/charts/backend/Chart.yaml | 47 ---- charts/puris/charts/backend/LICENSE | 202 -------------- charts/puris/charts/backend/README.md | 108 -------- charts/puris/charts/backend/README.md.gotmpl | 28 -- .../puris/charts/backend/templates/NOTES.txt | 26 -- .../charts/backend/templates/_helpers.tpl | 62 ----- .../charts/backend/templates/deployment.yaml | 131 --------- .../puris/charts/backend/templates/hpa.yaml | 28 -- .../charts/backend/templates/ingress.yaml | 61 ----- .../charts/backend/templates/service.yaml | 16 -- .../backend/templates/serviceaccount.yaml | 12 - .../templates/tests/test-connection.yaml | 15 -- charts/puris/charts/backend/values.yaml | 255 ------------------ charts/puris/charts/frontend/.helmignore | 25 -- charts/puris/charts/frontend/Chart.yaml | 42 --- charts/puris/charts/frontend/LICENSE | 202 -------------- charts/puris/charts/frontend/README.md | 85 ------ charts/puris/charts/frontend/README.md.gotmpl | 29 -- .../puris/charts/frontend/templates/NOTES.txt | 26 -- .../charts/frontend/templates/_helpers.tpl | 62 ----- .../charts/frontend/templates/deployment.yaml | 80 ------ .../puris/charts/frontend/templates/hpa.yaml | 28 -- .../charts/frontend/templates/ingress.yaml | 61 ----- .../charts/frontend/templates/service.yaml | 16 -- .../frontend/templates/serviceaccount.yaml | 12 - .../templates/tests/test-connection.yaml | 15 -- charts/puris/charts/frontend/values.yaml | 181 ------------- 29 files changed, 36 insertions(+), 1884 deletions(-) delete mode 100644 charts/puris/charts/backend/.helmignore delete mode 100644 charts/puris/charts/backend/Chart.yaml delete mode 100644 charts/puris/charts/backend/LICENSE delete mode 100644 charts/puris/charts/backend/README.md delete mode 100644 charts/puris/charts/backend/README.md.gotmpl delete mode 100644 charts/puris/charts/backend/templates/NOTES.txt delete mode 100644 charts/puris/charts/backend/templates/_helpers.tpl delete mode 100644 charts/puris/charts/backend/templates/deployment.yaml delete mode 100644 charts/puris/charts/backend/templates/hpa.yaml delete mode 100644 charts/puris/charts/backend/templates/ingress.yaml delete mode 100644 charts/puris/charts/backend/templates/service.yaml delete mode 100644 charts/puris/charts/backend/templates/serviceaccount.yaml delete mode 100644 charts/puris/charts/backend/templates/tests/test-connection.yaml delete mode 100644 charts/puris/charts/backend/values.yaml delete mode 100644 charts/puris/charts/frontend/.helmignore delete mode 100644 charts/puris/charts/frontend/Chart.yaml delete mode 100644 charts/puris/charts/frontend/LICENSE delete mode 100644 charts/puris/charts/frontend/README.md delete mode 100644 charts/puris/charts/frontend/README.md.gotmpl delete mode 100644 charts/puris/charts/frontend/templates/NOTES.txt delete mode 100644 charts/puris/charts/frontend/templates/_helpers.tpl delete mode 100644 charts/puris/charts/frontend/templates/deployment.yaml delete mode 100644 charts/puris/charts/frontend/templates/hpa.yaml delete mode 100644 charts/puris/charts/frontend/templates/ingress.yaml delete mode 100644 charts/puris/charts/frontend/templates/service.yaml delete mode 100644 charts/puris/charts/frontend/templates/serviceaccount.yaml delete mode 100644 charts/puris/charts/frontend/templates/tests/test-connection.yaml delete mode 100644 charts/puris/charts/frontend/values.yaml diff --git a/INSTALL.md b/INSTALL.md index 18aacb1d..3fa5a942 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,12 +13,44 @@ See `Install.md` file in folder [local](./local/docker-compose.yaml) for integra - **Current role for demonstrator**, under *backend.puris.demonstrator.role* > **NOTE** Further information on the individual properties can be found in the following [README.md](./charts/puris/README.md). -2. Run the application + +#### Run without Ingress + +2. Run the application: ```shell helm install puris charts/puris \ --namespace puris \ --create-namespace ``` -2. Done! The applications should be available at - - (frontend) `http://YOURIP:30000` - - (backend) `http://CLUSTERIP:30001/catena/swagger-ui/index.html` +3. Forward ports for services: +```shell +kubectl -n puris port-forward svc/frontend 8080:8080 +kubectl -n puris port-forward svc/backend 8081:8081 +``` +4. Done! The applications should be available at `http://localhost:`. + +#### Run with Ingress + +Precondition: please refer to your runtime environment's official documentation on how to enable ingress. +- [minikube](https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/) +- [kind](https://kind.sigs.k8s.io/docs/user/ingress/) + +2. Run the application: +```shell +helm install puris charts/puris \ + --namespace puris \ + --create-namespace \ + --set frontend.ingress.enabled=true \ + --set backend.ingress.enabled=true +``` +3. Edit /etc/hosts: +```shell +# If you are using minikube use minikube ip to get you clusterIp, for kind this is localhost (127.0.0.1) +sudo vim /etc/hosts +>> add entry for frontend " " +>> add entry for backend " " +>> :wq! (save changes) +``` +4. Done! The applications should be available at: + - (frontend) `http://your-frontend-host-address.com` + - (backend) `http://your-backend-host-address.com` diff --git a/charts/puris/charts/backend/.helmignore b/charts/puris/charts/backend/.helmignore deleted file mode 100644 index 526582a4..00000000 --- a/charts/puris/charts/backend/.helmignore +++ /dev/null @@ -1,25 +0,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/ -# Helm depencies -charts/*.tgz diff --git a/charts/puris/charts/backend/Chart.yaml b/charts/puris/charts/backend/Chart.yaml deleted file mode 100644 index e679be58..00000000 --- a/charts/puris/charts/backend/Chart.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# -# 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: backend - -description: A Helm chart for Kubernetes deployment of the PURIS Backend -type: application -home: https://github.com/eclipse-tractusx/puris -sources: - - https://github.com/eclipse-tractusx/puris -dependencies: [] -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: 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/charts/backend/LICENSE b/charts/puris/charts/backend/LICENSE deleted file mode 100644 index 7a4a3ea2..00000000 --- a/charts/puris/charts/backend/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://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. \ No newline at end of file diff --git a/charts/puris/charts/backend/README.md b/charts/puris/charts/backend/README.md deleted file mode 100644 index b8147519..00000000 --- a/charts/puris/charts/backend/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# backend - -![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 - -**Homepage:** - -## Prerequisites -- Kubernetes 1.19+ -- Helm 3.2.0+ - -## TL;DR -```shell -$ helm install backend --namespace puris --create-namespace . -``` - -## Source Code - -* - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| 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 | -| autoscaling.enabled | bool | `false` | Enable or disable the autoscaling of pods | -| fullnameOverride | string | `""` | Possibility to override the fullname | -| image.pullPolicy | string | `"Always"` | THe policy for the image pull process | -| 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 | object | `{"kubernetes.io/ingress.class":"nginx","nginx.ingress.kubernetes.io/backend-protocol":"HTTP","nginx.ingress.kubernetes.io/force-ssl-redirect":"true","nginx.ingress.kubernetes.io/ssl-passthrough":"true"}` | Annotations for the Ingress controller | -| 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 | `false` | Enable the Ingress | -| ingress.hosts | list | `[{"host":"puris-customer-backend.int.demo.catena-x.net","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | Hosts for the Ingress controller | -| ingress.tls | list | `[{"hosts":["puris-customer-backend.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 | -| livenessProbe.failureThreshold | int | `3` | Number of failures (threshold) for a liveness probe | -| livenessProbe.initialDelaySeconds | int | `250` | Delay in seconds after which an initial liveness probe is checked | -| livenessProbe.periodSeconds | int | `25` | Wait time in seconds between liveness probes | -| livenessProbe.successThreshold | int | `1` | Number of trys until a pod is marked alive | -| livenessProbe.timeoutSeconds | int | `1` | Timeout in seconds of the liveness probe | -| nameOverride | string | `""` | Possibility to override the name | -| 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.path | string | `"/api/v1/data"` | Data path of the EDC control plane | -| 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.bpna | string | `"BPNA1234567890AA"` | Own default BPNA of the EDC | -| puris.own.bpnl | string | `"BPNL1234567890ZZ"` | Own BPNL of the EDC | -| puris.own.bpns | string | `"BPNS1234567890ZZ"` | Own default BPNS of the EDC | -| puris.own.country | string | `"Germany"` | Own default country | -| puris.own.edr.deletiontimer | int | `2` | Number of minutes before received authentication data of a consumer pull is removed from memory | -| puris.own.name | string | `"Your application name"` | Own name (self-description) | -| puris.own.site.name | string | `"puris-test"` | Own site name | -| puris.own.streetnumber | string | `"Musterstraße 110A"` | Own street and number | -| puris.own.zipcodeandcity | string | `"12345 Musterhausen"` | Own zipcode and city | -| 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 | -| readinessProbe.periodSeconds | int | `25` | Wait time in seconds between readiness probes | -| readinessProbe.successThreshold | int | `1` | Number of trys until a pod is marked ready | -| readinessProbe.timeoutSeconds | int | `1` | Timeout in seconds of the readiness probe | -| replicaCount | int | `1` | Number of replicas of the Kubernetes deployment | -| resources.limits | object | `{"cpu":"2000m","memory":"2048Mi"}` | Maximum resource limits of CPU und memory | -| resources.requests | object | `{"cpu":"1000m","memory":"2048Mi"}` | Minimum requested resources for CPU und memory | -| 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 | `8081` | The port of the service | -| service.type | string | `"NodePort"` | Type of the service | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | -| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | -| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | -| tolerations | list | `[]` | Constrains for tolerations | - ----------------------------------------------- -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 deleted file mode 100644 index 350fb4dc..00000000 --- a/charts/puris/charts/backend/README.md.gotmpl +++ /dev/null @@ -1,28 +0,0 @@ -{{ template "chart.header" . }} - -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -## Prerequisites -- Kubernetes 1.19+ -- Helm 3.2.0+ - -## TL;DR -```shell -$ helm install backend --namespace puris --create-namespace . -``` - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} - -{{ template "helm-docs.versionFooter" . }} diff --git a/charts/puris/charts/backend/templates/NOTES.txt b/charts/puris/charts/backend/templates/NOTES.txt deleted file mode 100644 index 58b93bf8..00000000 --- a/charts/puris/charts/backend/templates/NOTES.txt +++ /dev/null @@ -1,26 +0,0 @@ -1. Get the application URL by accessing: -{{- if .Values.ingress.enabled }} - - locally reachable: http{{ if $.Values.ingress.tls }}{{ end }}://{{ .Values.puris.edc.controlplane.host }}:30001 -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - - internet reachable: http{{ if $.Values.ingress.tls }}{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "puris-backend.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT - Or - enable ingress by setting it to true while installation e.g.: - "helm install backend --namespace puris --create-namespace . --set ingress.enabled=true" -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "puris-backend.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "puris-backend.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "puris-backend.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/charts/puris/charts/backend/templates/_helpers.tpl b/charts/puris/charts/backend/templates/_helpers.tpl deleted file mode 100644 index ebd19294..00000000 --- a/charts/puris/charts/backend/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "puris-backend.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -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 "puris-backend.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 }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "puris-backend.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "puris-backend.labels" -}} -helm.sh/chart: {{ include "puris-backend.chart" . }} -{{ include "puris-backend.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "puris-backend.selectorLabels" -}} -app.kubernetes.io/name: {{ include "puris-backend.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "puris-backend.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "puris-backend.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/puris/charts/backend/templates/deployment.yaml b/charts/puris/charts/backend/templates/deployment.yaml deleted file mode 100644 index 750459f8..00000000 --- a/charts/puris/charts/backend/templates/deployment.yaml +++ /dev/null @@ -1,131 +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.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_PATH - value: "{{ .Values.puris.edc.controlplane.data.path }}" - - 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_BPNA - value: "{{ .Values.puris.own.bpna }}" - - name: OWN_BPNL - value: "{{ .Values.puris.own.bpnl }}" - - name: OWN_BPNS - value: "{{ .Values.puris.own.bpns }}" - - name: OWN_COUNTRY - value: "{{ .Values.puris.own.country }}" - - name: OWN_EDR_DELETIONTIMER - value: "{{ .Values.puris.own.edr.deletiontimer }}" - - name: OWN_NAME - value: "{{ .Values.puris.own.name }}" - - name: OWN_SITE - value: "{{ .Values.puris.own.site.name }}" - - name: OWN_STREETNUMBER - value: "{{ .Values.puris.own.streetnumber }}" - - name: OWN_ZIPCODEANDCITY - value: "{{ .Values.puris.own.zipcodeandcity }}" - - 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/charts/backend/templates/hpa.yaml b/charts/puris/charts/backend/templates/hpa.yaml deleted file mode 100644 index 4878e330..00000000 --- a/charts/puris/charts/backend/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "puris-backend.fullname" . }} - labels: - {{- include "puris-backend.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "puris-backend.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/charts/puris/charts/backend/templates/ingress.yaml b/charts/puris/charts/backend/templates/ingress.yaml deleted file mode 100644 index dc154ecb..00000000 --- a/charts/puris/charts/backend/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "puris-backend.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "puris-backend.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/puris/charts/backend/templates/service.yaml b/charts/puris/charts/backend/templates/service.yaml deleted file mode 100644 index 6987fbd7..00000000 --- a/charts/puris/charts/backend/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "puris-backend.fullname" . }} - labels: - {{- include "puris-backend.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - nodePort: 30001 - protocol: TCP - name: http - selector: - {{- include "puris-backend.selectorLabels" . | nindent 4 }} diff --git a/charts/puris/charts/backend/templates/serviceaccount.yaml b/charts/puris/charts/backend/templates/serviceaccount.yaml deleted file mode 100644 index a0a5917b..00000000 --- a/charts/puris/charts/backend/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "puris-backend.serviceAccountName" . }} - labels: - {{- include "puris-backend.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/puris/charts/backend/templates/tests/test-connection.yaml b/charts/puris/charts/backend/templates/tests/test-connection.yaml deleted file mode 100644 index d37729ae..00000000 --- a/charts/puris/charts/backend/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "puris-backend.fullname" . }}-test-connection" - labels: - {{- include "puris-backend.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "puris-backend.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/puris/charts/backend/values.yaml b/charts/puris/charts/backend/values.yaml deleted file mode 100644 index 5a58b2dc..00000000 --- a/charts/puris/charts/backend/values.yaml +++ /dev/null @@ -1,255 +0,0 @@ -# -# 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 -# - -# -- 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: Always - # -- 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 for the Ingress controller - 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: "puris-customer-backend.int.demo.catena-x.net" - paths: - - path: / - pathType: ImplementationSpecific - # -- TLS certificates for the Ingress controller - tls: - - secretName: tls-secret - hosts: - - puris-customer-backend.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 - -# APPLICATION SPECIFIC -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 path of the EDC control plane - path: /api/v1/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 default BPNA of the EDC - bpna: BPNA1234567890AA - # -- Own default BPNS of the EDC - bpns: BPNS1234567890ZZ - # -- Own default country - country: Germany - site: - # -- Own site name - name: puris-test - # -- Own street and number - streetnumber: "Musterstraße 110A" - # -- Own zipcode and city - zipcodeandcity: "12345 Musterhausen" - edr: - # -- Number of minutes before received authentication data of a consumer pull is removed from memory - deletiontimer: 2 - # -- Own name (self-description) - name: "Your application name" - # -- 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 deleted file mode 100644 index 526582a4..00000000 --- a/charts/puris/charts/frontend/.helmignore +++ /dev/null @@ -1,25 +0,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/ -# Helm depencies -charts/*.tgz diff --git a/charts/puris/charts/frontend/Chart.yaml b/charts/puris/charts/frontend/Chart.yaml deleted file mode 100644 index d02b8b0b..00000000 --- a/charts/puris/charts/frontend/Chart.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# -# 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: frontend -description: A Helm chart for Kubernetes deployment of the PURIS Frontend -type: application -home: https://github.com/eclipse-tractusx/puris -sources: - - https://github.com/eclipse-tractusx/puris -dependencies: [] -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: 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/charts/frontend/LICENSE b/charts/puris/charts/frontend/LICENSE deleted file mode 100644 index 7a4a3ea2..00000000 --- a/charts/puris/charts/frontend/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://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. \ No newline at end of file diff --git a/charts/puris/charts/frontend/README.md b/charts/puris/charts/frontend/README.md deleted file mode 100644 index c081234f..00000000 --- a/charts/puris/charts/frontend/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# frontend - -![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 - -**Homepage:** - -## Prerequisites -- Kubernetes 1.19+ -- Helm 3.2.0+ -- Running [PURIS backend](https://github.com/eclipse-tractusx/puris) - -## TL;DR -```shell -$ helm install frontend --namespace puris --create-namespace . -``` - -## Source Code - -* - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| 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 | -| 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 | `"Always"` | THe policy for the image pull process | -| 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 | -| ingress.className | string | `"nginx"` | Class name for the Ingress controller | -| ingress.enabled | bool | `false` | Enable the Ingress | -| ingress.hosts | list | `[{"host":"puris-customer-frontend.int.demo.catena-x.net","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | Hosts for the Ingress controller | -| ingress.tls | list | `[]` | TLS certificates for the Ingress controller | -| livenessProbe | object | `{"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Checks whether a pod is alive or not | -| livenessProbe.failureThreshold | int | `3` | Number of failures (threshold) for a liveness probe | -| livenessProbe.initialDelaySeconds | int | `10` | Delay in seconds after which an initial liveness probe is checked | -| livenessProbe.periodSeconds | int | `10` | Wait time in seconds between liveness probes | -| livenessProbe.successThreshold | int | `1` | Number of trys until a pod is marked alive | -| livenessProbe.timeoutSeconds | int | `1` | Timeout in seconds of the liveness probe | -| nameOverride | string | `""` | Possibility to override the name | -| 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://172.17.0.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 | -| readinessProbe.periodSeconds | int | `10` | Wait time in seconds between readiness probes | -| readinessProbe.successThreshold | int | `1` | Number of trys until a pod is marked ready | -| readinessProbe.timeoutSeconds | int | `1` | Timeout in seconds of the readiness probe | -| 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 | `{"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 | -| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | -| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | -| tolerations | list | `[]` | Constrains for tolerations | - ----------------------------------------------- -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/frontend/README.md.gotmpl b/charts/puris/charts/frontend/README.md.gotmpl deleted file mode 100644 index 516c3f8b..00000000 --- a/charts/puris/charts/frontend/README.md.gotmpl +++ /dev/null @@ -1,29 +0,0 @@ -{{ template "chart.header" . }} - -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -## Prerequisites -- Kubernetes 1.19+ -- Helm 3.2.0+ -- Running [PURIS backend](https://github.com/eclipse-tractusx/puris) - -## TL;DR -```shell -$ helm install frontend --namespace puris --create-namespace . -``` - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} - -{{ template "helm-docs.versionFooter" . }} diff --git a/charts/puris/charts/frontend/templates/NOTES.txt b/charts/puris/charts/frontend/templates/NOTES.txt deleted file mode 100644 index b17f93ee..00000000 --- a/charts/puris/charts/frontend/templates/NOTES.txt +++ /dev/null @@ -1,26 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} - - locally reachable: http{{ if $.Values.ingress.tls }}{{ end }}://{{ .Values.global.edc.controlplane }}:30000 -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - - internet reachable: http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "puris-frontend.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT - Or - enable ingress by setting it to true while installation e.g.: - "helm install frontend --namespace puris --create-namespace . --set ingress.enabled=true --values ../../values.yaml" -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "puris-frontend.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "puris-frontend.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "puris-frontend.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/charts/puris/charts/frontend/templates/_helpers.tpl b/charts/puris/charts/frontend/templates/_helpers.tpl deleted file mode 100644 index a829d0c9..00000000 --- a/charts/puris/charts/frontend/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "puris-frontend.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -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 "puris-frontend.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 }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "puris-frontend.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "puris-frontend.labels" -}} -helm.sh/chart: {{ include "puris-frontend.chart" . }} -{{ include "puris-frontend.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "puris-frontend.selectorLabels" -}} -app.kubernetes.io/name: {{ include "puris-frontend.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "puris-frontend.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "puris-frontend.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/puris/charts/frontend/templates/deployment.yaml b/charts/puris/charts/frontend/templates/deployment.yaml deleted file mode 100644 index e2f90a7a..00000000 --- a/charts/puris/charts/frontend/templates/deployment.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "puris-frontend.fullname" . }} - labels: - {{- include "puris-frontend.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "puris-frontend.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "puris-frontend.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "puris-frontend.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: 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 }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - 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/charts/frontend/templates/hpa.yaml b/charts/puris/charts/frontend/templates/hpa.yaml deleted file mode 100644 index 35582eb5..00000000 --- a/charts/puris/charts/frontend/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "puris-frontend.fullname" . }} - labels: - {{- include "puris-frontend.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "puris-frontend.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/charts/puris/charts/frontend/templates/ingress.yaml b/charts/puris/charts/frontend/templates/ingress.yaml deleted file mode 100644 index 31828f8d..00000000 --- a/charts/puris/charts/frontend/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "puris-frontend.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "puris-frontend.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/puris/charts/frontend/templates/service.yaml b/charts/puris/charts/frontend/templates/service.yaml deleted file mode 100644 index beee9a52..00000000 --- a/charts/puris/charts/frontend/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "puris-frontend.fullname" . }} - labels: - {{- include "puris-frontend.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - nodePort: 30000 - protocol: TCP - name: http - selector: - {{- include "puris-frontend.selectorLabels" . | nindent 4 }} diff --git a/charts/puris/charts/frontend/templates/serviceaccount.yaml b/charts/puris/charts/frontend/templates/serviceaccount.yaml deleted file mode 100644 index c29eb5c3..00000000 --- a/charts/puris/charts/frontend/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "puris-frontend.serviceAccountName" . }} - labels: - {{- include "puris-frontend.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/puris/charts/frontend/templates/tests/test-connection.yaml b/charts/puris/charts/frontend/templates/tests/test-connection.yaml deleted file mode 100644 index 1be9605f..00000000 --- a/charts/puris/charts/frontend/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "puris-frontend.fullname" . }}-test-connection" - labels: - {{- include "puris-frontend.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "puris-frontend.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/puris/charts/frontend/values.yaml b/charts/puris/charts/frontend/values.yaml deleted file mode 100644 index 618ae224..00000000 --- a/charts/puris/charts/frontend/values.yaml +++ /dev/null @@ -1,181 +0,0 @@ -# -# 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 -# - -# -- Number of replicas of the Kubernetes deployment -replicaCount: 1 - -image: - # -- Repository of the docker image - repository: tractusx/app-puris-frontend - # -- THe policy for the image pull process - pullPolicy: Always - # -- 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: "nginx" - # -- Annotations for the Ingress controller - annotations: {} - # -- Hosts for the Ingress controller - hosts: - - host: puris-customer-frontend.int.demo.catena-x.net - 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 - -# APPLICATION SPECIFIC -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://172.17.0.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=