From 7a9d44682b8fd68dea7935dbcddf1ded06c9eba0 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Thu, 3 Aug 2023 12:00:06 +0200 Subject: [PATCH 01/10] https://jira.catena-x.net/browse/KA-327 cyclone leads to wrong original jars, skill distribution warnings should show asset name, urlencoded parameters which have been parsed should be allowed and reencoded in delegation. --- agent-plane/agent-plane-protocol/pom.xml | 16 ++++++++++++++-- .../agents/edc/http/DelegationService.java | 2 +- .../agents/edc/http/transfer/AgentSource.java | 4 ++-- agent-plane/agentplane-azure-vault/pom.xml | 8 ++++++-- agent-plane/agentplane-hashicorp/pom.xml | 8 ++++++-- common/auth-jwt/pom.xml | 4 ++-- pom.xml | 5 +++-- 7 files changed, 34 insertions(+), 13 deletions(-) diff --git a/agent-plane/agent-plane-protocol/pom.xml b/agent-plane/agent-plane-protocol/pom.xml index 58d3d9f..ce078dd 100644 --- a/agent-plane/agent-plane-protocol/pom.xml +++ b/agent-plane/agent-plane-protocol/pom.xml @@ -103,10 +103,10 @@ com.diffplug.spotless spotless-maven-plugin - + @@ -167,6 +167,13 @@ ${com.nimbusds.version} + + + com.squareup.okio + okio + ${okio.version} + + javax.servlet @@ -277,8 +284,13 @@ org.jetbrains annotations + + com.squareup.okio + okio + + org.slf4j slf4j-api diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java index a3e15b0..26da17b 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java @@ -165,7 +165,7 @@ public void sendPOSTRequest(EndpointDataReference dataReference, String subUrl, } protected static Pattern PARAMETER_KEY_ALLOW = Pattern.compile("^(?!asset$)[^&?=]+$"); - protected static Pattern PARAMETER_VALUE_ALLOW = Pattern.compile("^[^&=]+$"); + protected static Pattern PARAMETER_VALUE_ALLOW = Pattern.compile("^.+$"); /** * computes the url to target the given data plane diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java index 035db75..e35e042 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/transfer/AgentSource.java @@ -107,11 +107,11 @@ protected StreamResult> openMatchmaking() { } if(runMode==SkillDistribution.CONSUMER) { if(distribution==SkillDistribution.PROVIDER) { - return StreamResult.error(String.format("Run distribution of skill %s should be consumer, but was set to provider only.", skill)); + return StreamResult.error(String.format("Run distribution of skill %s should be consumer, but was set to provider only.", asset)); } return StreamResult.success(Stream.of(new AgentPart("application/sparql-query",skillText.get().getBytes()))); } else if(runMode==SkillDistribution.PROVIDER && distribution==SkillDistribution.CONSUMER) { - return StreamResult.error(String.format("Run distribution of skill %s should be provider, but was set to consumer only.", skill)); + return StreamResult.error(String.format("Run distribution of skill %s should be provider, but was set to consumer only.", asset)); } skill=skillText.get(); } diff --git a/agent-plane/agentplane-azure-vault/pom.xml b/agent-plane/agentplane-azure-vault/pom.xml index 54cd9dc..a95f538 100644 --- a/agent-plane/agentplane-azure-vault/pom.xml +++ b/agent-plane/agentplane-azure-vault/pom.xml @@ -99,10 +99,10 @@ org.apache.maven.plugins maven-surefire-plugin - + @@ -133,6 +133,10 @@ org.apache.httpcomponents httpcore + + com.squareup.okio + okio + diff --git a/agent-plane/agentplane-hashicorp/pom.xml b/agent-plane/agentplane-hashicorp/pom.xml index da76541..7d1c2ae 100644 --- a/agent-plane/agentplane-hashicorp/pom.xml +++ b/agent-plane/agentplane-hashicorp/pom.xml @@ -99,10 +99,10 @@ org.apache.maven.plugins maven-surefire-plugin - + @@ -138,6 +138,10 @@ org.jetbrains.kotlin kotlin-stdlib-jdk8 + + com.squareup.okio + okio + diff --git a/common/auth-jwt/pom.xml b/common/auth-jwt/pom.xml index d3ccb0b..e197a36 100644 --- a/common/auth-jwt/pom.xml +++ b/common/auth-jwt/pom.xml @@ -76,10 +76,10 @@ com.diffplug.spotless spotless-maven-plugin - + diff --git a/pom.xml b/pom.xml index ea090ef..3ec9207 100644 --- a/pom.xml +++ b/pom.xml @@ -43,6 +43,7 @@ 0.1.3 3.3.2 4.11.0 + 3.4.0 2.0.7 3.1.0 3.0.2 @@ -201,7 +202,7 @@ - + From 88d340bea71b447fbe6a2cec05e58d5ef96c86b3 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Fri, 4 Aug 2023 12:27:03 +0200 Subject: [PATCH 02/10] https://jira.catena-x.net/browse/KA-327 delegated ingress/proxy may lower-case content-length header which would commit/close the response body before being written. --- .../org/eclipse/tractusx/agents/edc/http/DelegationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java index 26da17b..c22ae7e 100644 --- a/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java +++ b/agent-plane/agent-plane-protocol/src/main/java/org/eclipse/tractusx/agents/edc/http/DelegationService.java @@ -231,7 +231,7 @@ protected void sendRequest(okhttp3.Request request, HttpServletResponse response for(String value : myResponse.headers().values(header)) { if(header.equals("cx_warnings")) { warnings=Optional.of(typeManager.getMapper().readValue(value,warningTypeReference )); - } else if(!header.equals("Content-Length")) { + } else if(!header.toLowerCase().equals("content-length")) { response.addHeader(header, value); } } From 03d797e3f9c69edd5740a62e2bd6bc6a2f4dcfdf Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Mon, 21 Aug 2023 12:58:42 +0200 Subject: [PATCH 03/10] https://jira.catena-x.net/browse/KA-328 TRG 1-4 --- .tractusx | 23 +++++++++++++++++-- README.md | 5 +++- agent-plane/agentplane-azure-vault/README.md | 18 +++++++++++++++ agent-plane/agentplane-hashicorp/README.md | 18 +++++++++++++++ charts/README.md | 6 +++++ .../templates/deployment-dataplane.yaml | 4 ++-- docs/README.md | 12 ++++++---- 7 files changed, 77 insertions(+), 9 deletions(-) diff --git a/.tractusx b/.tractusx index bce6040..b56ebcf 100644 --- a/.tractusx +++ b/.tractusx @@ -1,3 +1,22 @@ -product: "Tractus-X Knowledge Agents EDC Extensions" +############################################################### +# Copyright (c) 2022, 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 +############################################################### + +product: "Tractus-X Knowledge Agents EDC Extensions (KA-EDC)" leadingRepository: "https://github.com/eclipse-tractusx/knowledge-agents-edc" -repositories: []‚ +repositories: [] diff --git a/README.md b/README.md index 71c06a8..478841c 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,12 @@ mvn -s settings.xml publish Deployment can be done * via [JAR libraries](https://github.com/orgs/eclipse-tractusx/packages?repo_name=knowledge-agents-edc&ecosystem=maven) copied into your Java runtime -* via [Docker images](https://github.com/orgs/eclipse-tractusx/packages?repo_name=knowledge-agents-edc&ecosystem=docker) +* via [Docker images](https://hub.docker.com/r/tractusx) * via [Helm Charts (Stable Versions)](https://eclipse-tractusx.github.io/charts/stable) or [Helm Charts (Dev Versions)](https://eclipse-tractusx.github.io/charts/stable) See the [user documentation](docs/README.md) for more detailed deployment information. +### Notice for Docker Images +* [Notice for Agent Data Plane Running Against Hashicorp Vault](agent-plane/agentplane-hashicorp/README.md#notice-for-docker-images) +* [Notice for Agent Data Plane Running Against Azure Vault](agent-plane/agentplane-azure-vault/README.md#notice-for-docker-images) diff --git a/agent-plane/agentplane-azure-vault/README.md b/agent-plane/agentplane-azure-vault/README.md index 4a89573..4085c81 100644 --- a/agent-plane/agentplane-azure-vault/README.md +++ b/agent-plane/agentplane-azure-vault/README.md @@ -76,3 +76,21 @@ the browser or by directly invoking a query curl --request GET 'http://localhost/api/agent?asset=urn:graph:cx:Dataspace&query=SELECT ?senseOfLife WHERE { VALUES (?senseOfLife) { ("42"^^xsd:int) } }' \ --header 'X-Api-Key: foo' ``` + +### Notice for Docker Image + +DockerHub: https://hub.docker.com/r/tractusx/agentplane-azure-vault + +Eclipse Tractus-X product(s) installed within the image: +GitHub: https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/agent-plane/agentplane-azure-vault +Project home: https://projects.eclipse.org/projects/automotive.tractusx +Dockerfile: https://github.com/eclipse-tractusx/knowledge-agents-edc/blob/main/agent-plane/agentplane-azure-vault/src/main/docker/Dockerfile +Project license: Apache License, Version 2.0 + +Used base image + +[eclipse-temurin:17-jre-alpine](https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=17-jre-alpine) + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. \ No newline at end of file diff --git a/agent-plane/agentplane-hashicorp/README.md b/agent-plane/agentplane-hashicorp/README.md index f9fa383..7e19251 100644 --- a/agent-plane/agentplane-hashicorp/README.md +++ b/agent-plane/agentplane-hashicorp/README.md @@ -76,3 +76,21 @@ the browser or by directly invoking a query curl --request GET 'http://localhost/api/agent?asset=urn:graph:cx:Dataspace&query=SELECT ?senseOfLife WHERE { VALUES (?senseOfLife) { ("42"^^xsd:int) } }' \ --header 'X-Api-Key: foo' ``` + +### Notice for Docker Image + +DockerHub: https://hub.docker.com/r/tractusx/agentplane-hashicorp + +Eclipse Tractus-X product(s) installed within the image: +GitHub: https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/agent-plane/agentplane-hashicorp +Project home: https://projects.eclipse.org/projects/automotive.tractusx +Dockerfile: https://github.com/eclipse-tractusx/knowledge-agents-edc/blob/main/agent-plane/agentplane-hashicorp/src/main/docker/Dockerfile +Project license: Apache License, Version 2.0 + +Used base image + +[eclipse-temurin:17-jre-alpine](https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=17-jre-alpine) + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. \ No newline at end of file diff --git a/charts/README.md b/charts/README.md index 6f88ca9..bac9da9 100644 --- a/charts/README.md +++ b/charts/README.md @@ -20,6 +20,12 @@ # Helm Charts +This folder contains ready-made charts for the following variants of the Agent-Enabled EDC + +- [Agent-Enabled EDC based on Hashicorp Vault and PostgreSQL persistence](agent-connector) +- [Agent-Enabled EDC based on Azure Vault and PostgreSQL persistence](agent-connector-azure-vault) +- [Agent-Enabled EDC based on Hashicorp Vault and in-memory persistence](agent-connector-memory) + ## Chart Linting Chart linting is performed using [helm's CT tool](https://github.com/helm/chart-testing). diff --git a/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml b/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml index f73c677..55228fa 100644 --- a/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml @@ -64,9 +64,9 @@ spec: {{- if $dataplane.image.repository }} image: "{{ $dataplane.image.repository }}:{{ $dataplane.image.tag | default "0.5.0" }}" {{- else if $dataplane.agent }} - image: "tractusx/agentplane-hashicorp:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" + image: "tractusx/agentplane-azure-vault:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" {{- else }} - image: "tractusx/edc-dataplane-hashicorp-vault:{{ .Values.dataplane.image.tag | default "0.5.0" }}" + image: "tractusx/edc-dataplane-azure-vault:{{ .Values.dataplane.image.tag | default "0.5.0" }}" {{- end }} imagePullPolicy: {{ $dataplane.image.pullPolicy }} ports: diff --git a/docs/README.md b/docs/README.md index 679e840..4cc728e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,11 +17,15 @@ * SPDX-License-Identifier: Apache-2.0 --> -# Tractus-X Knowledge Agents EDC Extensions (KA-EDC) +# Tractus-X Knowledge Agents EDC Extensions (KA-EDC) Documentation -The Tractus-X Knowledge Agents EDC Extensions (KA-EDC) repository creates runnable applications out of EDC extensions from -the [Eclipse DataSpace Connector](https://github.com/eclipse-edc/Connector) and [Tractus-X EDC](https://github.com/eclipse-tractusx/tractusx-edc) -repositories. +In the Knowledge Agent Architecture, an Agent is any component which speaks and/or enacts a Semantic Web protocol, such as SPARQL. + +The Tractus-X Knowledge Agents EDC Extensions (KA-EDC) introduces support for these protocols (and runnable applications) into the [Eclipse DataSpace Connector](https://github.com/eclipse-edc/Connector) and [Tractus-X EDC](https://github.com/eclipse-tractusx/tractusx-edc). + +In particular, KA-EDC implements the so-called Matchmaking Agent endpoint that is able to discover and delegate to business data & functions provided by Binding Agents such as provided by [Knowledge Agents Reference Implementations (KA-RI)](https://github.com/eclipse-tractusx/knowledge-agents). + +In contrast to the Binding Agents which are restricted to a subset of the full SPARQL protocol called the KA-BIND profile, KA-EDC implements the KA-MATCH and KA-TRANSFER profiles. The data upon which KA-EDC operates however consists of ontology information and the data catalogue of the respective dataspace tenant. ## How it works From 93a6fdcc1782373027cf195e6372eb9ecf8ab3b3 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 22 Aug 2023 14:51:05 +0200 Subject: [PATCH 04/10] https://jira.catena-x.net/browse/KA-328 TRG 1-7 as far as possible adopted --- .github/workflows/build.yml | 10 - .github/workflows/helm-chart-lint.yml | 28 +-- .../agent-connector-azure-vault/.helmignore | 45 ++++ charts/agent-connector-azure-vault/Chart.yaml | 6 +- charts/agent-connector-azure-vault/LICENSE | 202 ++++++++++++++++++ .../templates/configmap-controlplane.yaml | 3 +- .../templates/configmap-dataplane.yaml | 6 +- .../templates/deployment-controlplane.yaml | 3 +- .../templates/deployment-dataplane.yaml | 10 +- .../templates/hpa-controlplane.yaml | 5 +- .../templates/hpa-dataplane.yaml | 8 +- .../templates/ingress-controlplane.yaml | 23 +- .../templates/ingress-dataplane.yaml | 27 ++- .../templates/networkpolicy.yaml | 8 +- .../templates/service-controlplane.yaml | 3 +- .../templates/service-dataplane.yaml | 7 +- .../templates/serviceaccount.yaml | 5 +- .../agent-connector-azure-vault/values.yaml | 5 +- charts/agent-connector-memory/.helmignore | 45 ++++ charts/agent-connector-memory/Chart.yaml | 6 +- charts/agent-connector-memory/LICENSE | 202 ++++++++++++++++++ .../templates/configmap-controlplane.yaml | 3 +- .../templates/configmap-dataplane.yaml | 6 +- .../templates/deployment-controlplane.yaml | 3 +- .../templates/deployment-dataplane.yaml | 10 +- .../templates/hpa-controlplane.yaml | 5 +- .../templates/hpa-dataplane.yaml | 8 +- .../templates/ingress-controlplane.yaml | 23 +- .../templates/ingress-dataplane.yaml | 27 ++- .../templates/networkpolicy.yaml | 8 +- .../templates/service-controlplane.yaml | 3 +- .../templates/service-dataplane.yaml | 7 +- .../templates/serviceaccount.yaml | 5 +- charts/agent-connector-memory/values.yaml | 4 +- charts/agent-connector/.helmignore | 45 ++++ charts/agent-connector/Chart.yaml | 9 +- charts/agent-connector/LICENSE | 202 ++++++++++++++++++ .../templates/configmap-controlplane.yaml | 3 +- .../templates/configmap-dataplane.yaml | 6 +- .../templates/deployment-controlplane.yaml | 3 +- .../templates/deployment-dataplane.yaml | 10 +- .../templates/hpa-controlplane.yaml | 5 +- .../templates/hpa-dataplane.yaml | 8 +- .../templates/ingress-controlplane.yaml | 23 +- .../templates/ingress-dataplane.yaml | 27 ++- .../templates/networkpolicy.yaml | 8 +- .../templates/service-controlplane.yaml | 3 +- .../templates/service-dataplane.yaml | 7 +- .../templates/serviceaccount.yaml | 5 +- charts/agent-connector/values.yaml | 8 +- charts/config/chart-testing-config.yaml | 5 +- 51 files changed, 932 insertions(+), 214 deletions(-) create mode 100644 charts/agent-connector-azure-vault/.helmignore create mode 100644 charts/agent-connector-azure-vault/LICENSE create mode 100644 charts/agent-connector-memory/.helmignore create mode 100644 charts/agent-connector-memory/LICENSE create mode 100644 charts/agent-connector/.helmignore create mode 100644 charts/agent-connector/LICENSE diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3456f1..eb0af14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,13 +160,3 @@ jobs: push: ${{ (github.repository == 'catenax-ng/product-agents' || github.repository == 'eclipse-tractusx/knowledge-agents') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-azr.outputs.tags }} labels: ${{ steps.meta-azr.outputs.labels }} - - - # Report unit test output to github job - - if: success() || failure() - name: Java Test Report - uses: dorny/test-reporter@v1 - with: - name: Test Report Java - path: '**/surefire-reports/TEST-*.xml' - reporter: java-junit diff --git a/.github/workflows/helm-chart-lint.yml b/.github/workflows/helm-chart-lint.yml index ed8ae43..78637e6 100644 --- a/.github/workflows/helm-chart-lint.yml +++ b/.github/workflows/helm-chart-lint.yml @@ -32,6 +32,20 @@ on: paths: - .github/workflows/** - charts/** + workflow_dispatch: + inputs: + node_image: + description: 'kindest/node image for k8s kind cluster' + # k8s version from 3.1 release as default + default: 'kindest/node:v1.24.6' + required: false + type: string + upgrade_from: + description: 'chart version to upgrade from' + # chart version from 3.2 release as default + default: 'x.x.x' + required: false + type: string jobs: lint-test: @@ -47,10 +61,9 @@ jobs: with: version: v3.10.3 - # Setup python as a prerequisite for chart linting - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.9 - name: Set up chart-testing uses: helm/chart-testing-action@v2.3.1 @@ -66,14 +79,3 @@ jobs: # run chart linting - name: Run chart-testing (lint) run: ct lint --target-branch ${{ github.event.repository.default_branch }} --config charts/config/chart-testing-config.yaml - - # Preparing a kind cluster to install and test charts on - - name: Create kind cluster - uses: helm/kind-action@v1.4.0 - if: ${{ env.CHART_CHANGED == 'true' }} - - # install the chart to the kind cluster and run helm test - # define charts to test with the --charts parameter - - name: Run chart-testing (install) - run: ct install --charts charts/agent-connector,charts/agent-connector-azure-vault,charts/agent-connector-memory --config charts/config/chart-testing-config.yaml - if: ${{ env.CHART_CHANGED == 'true' }} diff --git a/charts/agent-connector-azure-vault/.helmignore b/charts/agent-connector-azure-vault/.helmignore new file mode 100644 index 0000000..9a12504 --- /dev/null +++ b/charts/agent-connector-azure-vault/.helmignore @@ -0,0 +1,45 @@ +# Copyright (c) 2022,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 + +# 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/ +# Doc Templates +README.md.gotmpl +# Accept only values.yaml +values?*.yaml +values?*.yml \ No newline at end of file diff --git a/charts/agent-connector-azure-vault/Chart.yaml b/charts/agent-connector-azure-vault/Chart.yaml index 6d7bb93..81a6f43 100644 --- a/charts/agent-connector-azure-vault/Chart.yaml +++ b/charts/agent-connector-azure-vault/Chart.yaml @@ -41,13 +41,13 @@ type: application # 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.9.5-SNAPSHOT +version: 1.9.6-SNAPSHOT # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "1.9.5-SNAPSHOT" -home: https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector +home: https://github.com/eclipse-tractusx/knowledge-agents-edc/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector dependencies: @@ -57,3 +57,5 @@ dependencies: version: 12.1.6 repository: https://charts.bitnami.com/bitnami condition: install.postgresql +maintainers: + - name: 'Tractus-X Knowledge Agents Team' diff --git a/charts/agent-connector-azure-vault/LICENSE b/charts/agent-connector-azure-vault/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/charts/agent-connector-azure-vault/LICENSE @@ -0,0 +1,202 @@ + + 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. diff --git a/charts/agent-connector-azure-vault/templates/configmap-controlplane.yaml b/charts/agent-connector-azure-vault/templates/configmap-controlplane.yaml index 42f2a49..d69e0de 100644 --- a/charts/agent-connector-azure-vault/templates/configmap-controlplane.yaml +++ b/charts/agent-connector-azure-vault/templates/configmap-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,8 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/agent-connector-azure-vault/templates/configmap-dataplane.yaml b/charts/agent-connector-azure-vault/templates/configmap-dataplane.yaml index 62257d7..b5dda6e 100644 --- a/charts/agent-connector-azure-vault/templates/configmap-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/configmap-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/agent-connector-azure-vault/templates/deployment-controlplane.yaml b/charts/agent-connector-azure-vault/templates/deployment-controlplane.yaml index 5f2220a..59487db 100644 --- a/charts/agent-connector-azure-vault/templates/deployment-controlplane.yaml +++ b/charts/agent-connector-azure-vault/templates/deployment-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,8 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml b/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml index 55228fa..316d3fd 100644 --- a/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/deployment-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -64,9 +64,9 @@ spec: {{- if $dataplane.image.repository }} image: "{{ $dataplane.image.repository }}:{{ $dataplane.image.tag | default "0.5.0" }}" {{- else if $dataplane.agent }} - image: "tractusx/agentplane-azure-vault:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" + image: "{{ $root.Values.imageRegistry }}tractusx/agentplane-azure-vault:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" {{- else }} - image: "tractusx/edc-dataplane-azure-vault:{{ .Values.dataplane.image.tag | default "0.5.0" }}" + image: "tractusx/edc-dataplane-azure-vault:{{ $dataplane.image.tag | default "0.5.0" }}" {{- end }} imagePullPolicy: {{ $dataplane.image.pullPolicy }} ports: diff --git a/charts/agent-connector-azure-vault/templates/hpa-controlplane.yaml b/charts/agent-connector-azure-vault/templates/hpa-controlplane.yaml index c52ed91..50c1dbb 100644 --- a/charts/agent-connector-azure-vault/templates/hpa-controlplane.yaml +++ b/charts/agent-connector-azure-vault/templates/hpa-controlplane.yaml @@ -1,3 +1,5 @@ +{{- if .Values.controlplane.autoscaling.enabled }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if .Values.controlplane.autoscaling.enabled }} ---- apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/agent-connector-azure-vault/templates/hpa-dataplane.yaml b/charts/agent-connector-azure-vault/templates/hpa-dataplane.yaml index 7ca3d45..d9c0f6c 100644 --- a/charts/agent-connector-azure-vault/templates/hpa-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/hpa-dataplane.yaml @@ -1,3 +1,7 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +{{- if $dataplane.autoscaling.enabled }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,10 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} -{{- if $dataplane.autoscaling.enabled }} ---- apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/agent-connector-azure-vault/templates/ingress-controlplane.yaml b/charts/agent-connector-azure-vault/templates/ingress-controlplane.yaml index abc9010..47806a8 100644 --- a/charts/agent-connector-azure-vault/templates/ingress-controlplane.yaml +++ b/charts/agent-connector-azure-vault/templates/ingress-controlplane.yaml @@ -1,3 +1,14 @@ +{{- $fullName := include "txdc.fullname" . }} +{{- $controlLabels := include "txdc.controlplane.labels" . }} +{{- $controlEdcEndpoints := .Values.controlplane.endpoints }} +{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} +{{- $namespace := .Release.Namespace }} + +{{- range .Values.controlplane.ingresses }} +{{- if and .enabled .endpoints }} +{{- $controlIngressName := printf "%s-controlplane-%s" $fullName .hostname }} +{{- $annotations := .annotations | default dict }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,18 +30,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- $fullName := include "txdc.fullname" . }} -{{- $controlLabels := include "txdc.controlplane.labels" . }} -{{- $controlEdcEndpoints := .Values.controlplane.endpoints }} -{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} -{{- $namespace := .Release.Namespace }} - -{{- range .Values.controlplane.ingresses }} -{{- if and .enabled .endpoints }} -{{- $controlIngressName := printf "%s-controlplane-%s" $fullName .hostname }} -{{- $annotations := .annotations | default dict }} ---- {{- if semverCompare ">=1.19-0" $gitVersion }} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" $gitVersion }} diff --git a/charts/agent-connector-azure-vault/templates/ingress-dataplane.yaml b/charts/agent-connector-azure-vault/templates/ingress-dataplane.yaml index 6af7d9c..7d03fbf 100644 --- a/charts/agent-connector-azure-vault/templates/ingress-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/ingress-dataplane.yaml @@ -1,3 +1,16 @@ +{{- $fullName := include "txdc.fullname" . }} +{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} +{{- $namespace := .Release.Namespace }} +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +{{- $dataEdcEndpoints := $dataplane.endpoints }} +{{- $dataLabels := include "txdc.dataplane.labels" (dict "dataplane" $dataplane "root" $root) | nindent 4 }} + +{{- range $dataplane.ingresses }} +{{- if and .enabled .endpoints }} +{{- $dataIngressName := printf "%s-%s-%s" $fullName $dataplane.name .hostname }} +{{- $annotations := .annotations | default dict }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,20 +33,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- $fullName := include "txdc.fullname" . }} -{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} -{{- $namespace := .Release.Namespace }} -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} -{{- $dataEdcEndpoints := $dataplane.endpoints }} -{{- $dataLabels := include "txdc.dataplane.labels" (dict "dataplane" $dataplane "root" $root) | nindent 4 }} - -{{- range $dataplane.ingresses }} -{{- if and .enabled .endpoints }} -{{- $dataIngressName := printf "%s-%s-%s" $fullName $dataplane.name .hostname }} -{{- $annotations := .annotations | default dict }} ---- {{- if semverCompare ">=1.19-0" $gitVersion }} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" $gitVersion }} diff --git a/charts/agent-connector-azure-vault/templates/networkpolicy.yaml b/charts/agent-connector-azure-vault/templates/networkpolicy.yaml index 7a40cb6..05b5902 100644 --- a/charts/agent-connector-azure-vault/templates/networkpolicy.yaml +++ b/charts/agent-connector-azure-vault/templates/networkpolicy.yaml @@ -1,3 +1,7 @@ +{{- if eq (.Values.networkPolicy.enabled | toString) "true" }} +{{- range tuple "controlplane" "dataplane" }} +{{- $name := . }} +--- # # Copyright (c) 2023 Contributors to the Eclipse Foundation # @@ -16,10 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if eq (.Values.networkPolicy.enabled | toString) "true" }} -{{- range tuple "controlplane" "dataplane" }} -{{- $name := . }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: diff --git a/charts/agent-connector-azure-vault/templates/service-controlplane.yaml b/charts/agent-connector-azure-vault/templates/service-controlplane.yaml index 277e9d7..e993b46 100644 --- a/charts/agent-connector-azure-vault/templates/service-controlplane.yaml +++ b/charts/agent-connector-azure-vault/templates/service-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,8 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/agent-connector-azure-vault/templates/service-dataplane.yaml b/charts/agent-connector-azure-vault/templates/service-dataplane.yaml index c3a636d..71619f8 100644 --- a/charts/agent-connector-azure-vault/templates/service-dataplane.yaml +++ b/charts/agent-connector-azure-vault/templates/service-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,10 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/agent-connector-azure-vault/templates/serviceaccount.yaml b/charts/agent-connector-azure-vault/templates/serviceaccount.yaml index 4a6e1ac..f94ad14 100644 --- a/charts/agent-connector-azure-vault/templates/serviceaccount.yaml +++ b/charts/agent-connector-azure-vault/templates/serviceaccount.yaml @@ -1,3 +1,5 @@ +{{- if .Values.serviceAccount.create -}} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if .Values.serviceAccount.create -}} ---- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/agent-connector-azure-vault/values.yaml b/charts/agent-connector-azure-vault/values.yaml index 98aeebd..8c3fc83 100644 --- a/charts/agent-connector-azure-vault/values.yaml +++ b/charts/agent-connector-azure-vault/values.yaml @@ -31,7 +31,8 @@ install: postgresql: true fullnameOverride: "" nameOverride: "" - +# -- Image registry to use +imageRegistry: docker.io/ # -- Existing image pull secret to use to [obtain the container image from private registries](https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry) imagePullSecrets: [] # -- To add some custom labels @@ -433,7 +434,7 @@ dataplanes: # -- The hostname to be used to precisely map incoming traffic onto the underlying network service hostname: "edc-data.local" # -- Additional ingress annotations to add, for example when supporting more demanding use cases you may set { nginx.org/proxy-connect-timeout: "30s", nginx.org/proxy-read-timeout: "360s", nginx.org/client-max-body-size: "10m"} - annotations: + annotations: # Sample settings for more demanding use cases # nginx.org/proxy-connect-timeout: "30s" # nginx.org/proxy-read-timeout: "360s" diff --git a/charts/agent-connector-memory/.helmignore b/charts/agent-connector-memory/.helmignore new file mode 100644 index 0000000..9a12504 --- /dev/null +++ b/charts/agent-connector-memory/.helmignore @@ -0,0 +1,45 @@ +# Copyright (c) 2022,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 + +# 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/ +# Doc Templates +README.md.gotmpl +# Accept only values.yaml +values?*.yaml +values?*.yml \ No newline at end of file diff --git a/charts/agent-connector-memory/Chart.yaml b/charts/agent-connector-memory/Chart.yaml index 32e705a..2ba48e2 100644 --- a/charts/agent-connector-memory/Chart.yaml +++ b/charts/agent-connector-memory/Chart.yaml @@ -41,13 +41,13 @@ type: application # 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.9.5-SNAPSHOT +version: 1.9.6-SNAPSHOT # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "1.9.5-SNAPSHOT" -home: https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector +home: https://github.com/eclipse-tractusx/knowledge-agents-edc/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector dependencies: @@ -57,3 +57,5 @@ dependencies: version: 0.20.0 repository: https://helm.releases.hashicorp.com condition: install.vault +maintainers: + - name: 'Tractus-X Knowledge Agents Team' diff --git a/charts/agent-connector-memory/LICENSE b/charts/agent-connector-memory/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/charts/agent-connector-memory/LICENSE @@ -0,0 +1,202 @@ + + 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. diff --git a/charts/agent-connector-memory/templates/configmap-controlplane.yaml b/charts/agent-connector-memory/templates/configmap-controlplane.yaml index 42f2a49..d69e0de 100644 --- a/charts/agent-connector-memory/templates/configmap-controlplane.yaml +++ b/charts/agent-connector-memory/templates/configmap-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,8 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/agent-connector-memory/templates/configmap-dataplane.yaml b/charts/agent-connector-memory/templates/configmap-dataplane.yaml index 62257d7..b5dda6e 100644 --- a/charts/agent-connector-memory/templates/configmap-dataplane.yaml +++ b/charts/agent-connector-memory/templates/configmap-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/agent-connector-memory/templates/deployment-controlplane.yaml b/charts/agent-connector-memory/templates/deployment-controlplane.yaml index 8861442..49b1f41 100644 --- a/charts/agent-connector-memory/templates/deployment-controlplane.yaml +++ b/charts/agent-connector-memory/templates/deployment-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,8 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/agent-connector-memory/templates/deployment-dataplane.yaml b/charts/agent-connector-memory/templates/deployment-dataplane.yaml index 3d1713f..1022b80 100644 --- a/charts/agent-connector-memory/templates/deployment-dataplane.yaml +++ b/charts/agent-connector-memory/templates/deployment-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -64,9 +64,9 @@ spec: {{- if $dataplane.image.repository }} image: "{{ $dataplane.image.repository }}:{{ $dataplane.image.tag | default "0.5.0" }}" {{- else if $dataplane.agent }} - image: "tractusx/agentplane-hashicorp:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" + image: "{{ $root.Values.imageRegistry }}tractusx/agentplane-hashicorp:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" {{- else }} - image: "tractusx/edc-dataplane-hashicorp-vault:{{ .Values.dataplane.image.tag | default "0.5.0" }}" + image: "tractusx/edc-dataplane-hashicorp-vault:{{ $dataplane.image.tag | default "0.5.0" }}" {{- end }} imagePullPolicy: {{ $dataplane.image.pullPolicy }} ports: diff --git a/charts/agent-connector-memory/templates/hpa-controlplane.yaml b/charts/agent-connector-memory/templates/hpa-controlplane.yaml index c52ed91..50c1dbb 100644 --- a/charts/agent-connector-memory/templates/hpa-controlplane.yaml +++ b/charts/agent-connector-memory/templates/hpa-controlplane.yaml @@ -1,3 +1,5 @@ +{{- if .Values.controlplane.autoscaling.enabled }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if .Values.controlplane.autoscaling.enabled }} ---- apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/agent-connector-memory/templates/hpa-dataplane.yaml b/charts/agent-connector-memory/templates/hpa-dataplane.yaml index 7ca3d45..d9c0f6c 100644 --- a/charts/agent-connector-memory/templates/hpa-dataplane.yaml +++ b/charts/agent-connector-memory/templates/hpa-dataplane.yaml @@ -1,3 +1,7 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +{{- if $dataplane.autoscaling.enabled }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,10 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} -{{- if $dataplane.autoscaling.enabled }} ---- apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/agent-connector-memory/templates/ingress-controlplane.yaml b/charts/agent-connector-memory/templates/ingress-controlplane.yaml index abc9010..47806a8 100644 --- a/charts/agent-connector-memory/templates/ingress-controlplane.yaml +++ b/charts/agent-connector-memory/templates/ingress-controlplane.yaml @@ -1,3 +1,14 @@ +{{- $fullName := include "txdc.fullname" . }} +{{- $controlLabels := include "txdc.controlplane.labels" . }} +{{- $controlEdcEndpoints := .Values.controlplane.endpoints }} +{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} +{{- $namespace := .Release.Namespace }} + +{{- range .Values.controlplane.ingresses }} +{{- if and .enabled .endpoints }} +{{- $controlIngressName := printf "%s-controlplane-%s" $fullName .hostname }} +{{- $annotations := .annotations | default dict }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,18 +30,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- $fullName := include "txdc.fullname" . }} -{{- $controlLabels := include "txdc.controlplane.labels" . }} -{{- $controlEdcEndpoints := .Values.controlplane.endpoints }} -{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} -{{- $namespace := .Release.Namespace }} - -{{- range .Values.controlplane.ingresses }} -{{- if and .enabled .endpoints }} -{{- $controlIngressName := printf "%s-controlplane-%s" $fullName .hostname }} -{{- $annotations := .annotations | default dict }} ---- {{- if semverCompare ">=1.19-0" $gitVersion }} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" $gitVersion }} diff --git a/charts/agent-connector-memory/templates/ingress-dataplane.yaml b/charts/agent-connector-memory/templates/ingress-dataplane.yaml index 6af7d9c..7d03fbf 100644 --- a/charts/agent-connector-memory/templates/ingress-dataplane.yaml +++ b/charts/agent-connector-memory/templates/ingress-dataplane.yaml @@ -1,3 +1,16 @@ +{{- $fullName := include "txdc.fullname" . }} +{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} +{{- $namespace := .Release.Namespace }} +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +{{- $dataEdcEndpoints := $dataplane.endpoints }} +{{- $dataLabels := include "txdc.dataplane.labels" (dict "dataplane" $dataplane "root" $root) | nindent 4 }} + +{{- range $dataplane.ingresses }} +{{- if and .enabled .endpoints }} +{{- $dataIngressName := printf "%s-%s-%s" $fullName $dataplane.name .hostname }} +{{- $annotations := .annotations | default dict }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,20 +33,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- $fullName := include "txdc.fullname" . }} -{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} -{{- $namespace := .Release.Namespace }} -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} -{{- $dataEdcEndpoints := $dataplane.endpoints }} -{{- $dataLabels := include "txdc.dataplane.labels" (dict "dataplane" $dataplane "root" $root) | nindent 4 }} - -{{- range $dataplane.ingresses }} -{{- if and .enabled .endpoints }} -{{- $dataIngressName := printf "%s-%s-%s" $fullName $dataplane.name .hostname }} -{{- $annotations := .annotations | default dict }} ---- {{- if semverCompare ">=1.19-0" $gitVersion }} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" $gitVersion }} diff --git a/charts/agent-connector-memory/templates/networkpolicy.yaml b/charts/agent-connector-memory/templates/networkpolicy.yaml index 7a40cb6..05b5902 100644 --- a/charts/agent-connector-memory/templates/networkpolicy.yaml +++ b/charts/agent-connector-memory/templates/networkpolicy.yaml @@ -1,3 +1,7 @@ +{{- if eq (.Values.networkPolicy.enabled | toString) "true" }} +{{- range tuple "controlplane" "dataplane" }} +{{- $name := . }} +--- # # Copyright (c) 2023 Contributors to the Eclipse Foundation # @@ -16,10 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if eq (.Values.networkPolicy.enabled | toString) "true" }} -{{- range tuple "controlplane" "dataplane" }} -{{- $name := . }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: diff --git a/charts/agent-connector-memory/templates/service-controlplane.yaml b/charts/agent-connector-memory/templates/service-controlplane.yaml index 277e9d7..e993b46 100644 --- a/charts/agent-connector-memory/templates/service-controlplane.yaml +++ b/charts/agent-connector-memory/templates/service-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,8 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/agent-connector-memory/templates/service-dataplane.yaml b/charts/agent-connector-memory/templates/service-dataplane.yaml index c3a636d..71619f8 100644 --- a/charts/agent-connector-memory/templates/service-dataplane.yaml +++ b/charts/agent-connector-memory/templates/service-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,10 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/agent-connector-memory/templates/serviceaccount.yaml b/charts/agent-connector-memory/templates/serviceaccount.yaml index 4a6e1ac..f94ad14 100644 --- a/charts/agent-connector-memory/templates/serviceaccount.yaml +++ b/charts/agent-connector-memory/templates/serviceaccount.yaml @@ -1,3 +1,5 @@ +{{- if .Values.serviceAccount.create -}} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if .Values.serviceAccount.create -}} ---- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/agent-connector-memory/values.yaml b/charts/agent-connector-memory/values.yaml index 63a41bb..f112af8 100644 --- a/charts/agent-connector-memory/values.yaml +++ b/charts/agent-connector-memory/values.yaml @@ -31,6 +31,8 @@ install: vault: false fullnameOverride: "" nameOverride: "" +# -- Image registry to use +imageRegistry: docker.io/ # -- Existing image pull secret to use to [obtain the container image from private registries](https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry) imagePullSecrets: [] # -- To add some custom labels @@ -429,7 +431,7 @@ dataplanes: # -- The hostname to be used to precisely map incoming traffic onto the underlying network service hostname: "edc-data.local" # -- Additional ingress annotations to add, for example when supporting more demanding use cases you may set { nginx.org/proxy-connect-timeout: "30s", nginx.org/proxy-read-timeout: "360s", nginx.org/client-max-body-size: "10m"} - annotations: + annotations: # Sample settings for more demanding use cases # nginx.org/proxy-connect-timeout: "30s" # nginx.org/proxy-read-timeout: "360s" diff --git a/charts/agent-connector/.helmignore b/charts/agent-connector/.helmignore new file mode 100644 index 0000000..9a12504 --- /dev/null +++ b/charts/agent-connector/.helmignore @@ -0,0 +1,45 @@ +# Copyright (c) 2022,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 + +# 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/ +# Doc Templates +README.md.gotmpl +# Accept only values.yaml +values?*.yaml +values?*.yml \ No newline at end of file diff --git a/charts/agent-connector/Chart.yaml b/charts/agent-connector/Chart.yaml index d1472f9..0cab008 100644 --- a/charts/agent-connector/Chart.yaml +++ b/charts/agent-connector/Chart.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,8 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v2 name: agent-connector description: | @@ -41,13 +40,13 @@ type: application # 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.9.5-SNAPSHOT +version: 1.9.6-SNAPSHOT # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "1.9.5-SNAPSHOT" -home: https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector +home: https://github.com/eclipse-tractusx/knowledge-agents-edc/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-edc/tree/main/charts/agent-connector dependencies: @@ -63,3 +62,5 @@ dependencies: version: 12.1.6 repository: https://charts.bitnami.com/bitnami condition: install.postgresql +maintainers: + - name: 'Tractus-X Knowledge Agents Team' diff --git a/charts/agent-connector/LICENSE b/charts/agent-connector/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/charts/agent-connector/LICENSE @@ -0,0 +1,202 @@ + + 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. diff --git a/charts/agent-connector/templates/configmap-controlplane.yaml b/charts/agent-connector/templates/configmap-controlplane.yaml index 42f2a49..d69e0de 100644 --- a/charts/agent-connector/templates/configmap-controlplane.yaml +++ b/charts/agent-connector/templates/configmap-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,8 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/agent-connector/templates/configmap-dataplane.yaml b/charts/agent-connector/templates/configmap-dataplane.yaml index 62257d7..b5dda6e 100644 --- a/charts/agent-connector/templates/configmap-dataplane.yaml +++ b/charts/agent-connector/templates/configmap-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/agent-connector/templates/deployment-controlplane.yaml b/charts/agent-connector/templates/deployment-controlplane.yaml index 404f14a..903bfb0 100644 --- a/charts/agent-connector/templates/deployment-controlplane.yaml +++ b/charts/agent-connector/templates/deployment-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,8 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/agent-connector/templates/deployment-dataplane.yaml b/charts/agent-connector/templates/deployment-dataplane.yaml index c2e4077..e16d855 100644 --- a/charts/agent-connector/templates/deployment-dataplane.yaml +++ b/charts/agent-connector/templates/deployment-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -64,9 +64,9 @@ spec: {{- if $dataplane.image.repository }} image: "{{ $dataplane.image.repository }}:{{ $dataplane.image.tag | default "0.5.0" }}" {{- else if $dataplane.agent }} - image: "tractusx/agentplane-hashicorp:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" + image: "{{ $root.Values.imageRegistry }}tractusx/agentplane-hashicorp:{{ $dataplane.image.tag | default $root.Chart.AppVersion }}" {{- else }} - image: "tractusx/edc-dataplane-hashicorp-vault:{{ .Values.dataplane.image.tag | default "0.5.0" }}" + image: "tractusx/edc-dataplane-hashicorp-vault:{{ $dataplane.image.tag | default "0.5.0" }}" {{- end }} imagePullPolicy: {{ $dataplane.image.pullPolicy }} ports: diff --git a/charts/agent-connector/templates/hpa-controlplane.yaml b/charts/agent-connector/templates/hpa-controlplane.yaml index c52ed91..50c1dbb 100644 --- a/charts/agent-connector/templates/hpa-controlplane.yaml +++ b/charts/agent-connector/templates/hpa-controlplane.yaml @@ -1,3 +1,5 @@ +{{- if .Values.controlplane.autoscaling.enabled }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if .Values.controlplane.autoscaling.enabled }} ---- apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/agent-connector/templates/hpa-dataplane.yaml b/charts/agent-connector/templates/hpa-dataplane.yaml index 7ca3d45..d9c0f6c 100644 --- a/charts/agent-connector/templates/hpa-dataplane.yaml +++ b/charts/agent-connector/templates/hpa-dataplane.yaml @@ -1,3 +1,7 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +{{- if $dataplane.autoscaling.enabled }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,10 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} -{{- if $dataplane.autoscaling.enabled }} ---- apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/agent-connector/templates/ingress-controlplane.yaml b/charts/agent-connector/templates/ingress-controlplane.yaml index abc9010..47806a8 100644 --- a/charts/agent-connector/templates/ingress-controlplane.yaml +++ b/charts/agent-connector/templates/ingress-controlplane.yaml @@ -1,3 +1,14 @@ +{{- $fullName := include "txdc.fullname" . }} +{{- $controlLabels := include "txdc.controlplane.labels" . }} +{{- $controlEdcEndpoints := .Values.controlplane.endpoints }} +{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} +{{- $namespace := .Release.Namespace }} + +{{- range .Values.controlplane.ingresses }} +{{- if and .enabled .endpoints }} +{{- $controlIngressName := printf "%s-controlplane-%s" $fullName .hostname }} +{{- $annotations := .annotations | default dict }} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,18 +30,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- $fullName := include "txdc.fullname" . }} -{{- $controlLabels := include "txdc.controlplane.labels" . }} -{{- $controlEdcEndpoints := .Values.controlplane.endpoints }} -{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} -{{- $namespace := .Release.Namespace }} - -{{- range .Values.controlplane.ingresses }} -{{- if and .enabled .endpoints }} -{{- $controlIngressName := printf "%s-controlplane-%s" $fullName .hostname }} -{{- $annotations := .annotations | default dict }} ---- {{- if semverCompare ">=1.19-0" $gitVersion }} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" $gitVersion }} diff --git a/charts/agent-connector/templates/ingress-dataplane.yaml b/charts/agent-connector/templates/ingress-dataplane.yaml index 6af7d9c..7d03fbf 100644 --- a/charts/agent-connector/templates/ingress-dataplane.yaml +++ b/charts/agent-connector/templates/ingress-dataplane.yaml @@ -1,3 +1,16 @@ +{{- $fullName := include "txdc.fullname" . }} +{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} +{{- $namespace := .Release.Namespace }} +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +{{- $dataEdcEndpoints := $dataplane.endpoints }} +{{- $dataLabels := include "txdc.dataplane.labels" (dict "dataplane" $dataplane "root" $root) | nindent 4 }} + +{{- range $dataplane.ingresses }} +{{- if and .enabled .endpoints }} +{{- $dataIngressName := printf "%s-%s-%s" $fullName $dataplane.name .hostname }} +{{- $annotations := .annotations | default dict }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,20 +33,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- $fullName := include "txdc.fullname" . }} -{{- $gitVersion := .Capabilities.KubeVersion.GitVersion }} -{{- $namespace := .Release.Namespace }} -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} -{{- $dataEdcEndpoints := $dataplane.endpoints }} -{{- $dataLabels := include "txdc.dataplane.labels" (dict "dataplane" $dataplane "root" $root) | nindent 4 }} - -{{- range $dataplane.ingresses }} -{{- if and .enabled .endpoints }} -{{- $dataIngressName := printf "%s-%s-%s" $fullName $dataplane.name .hostname }} -{{- $annotations := .annotations | default dict }} ---- {{- if semverCompare ">=1.19-0" $gitVersion }} apiVersion: networking.k8s.io/v1 {{- else if semverCompare ">=1.14-0" $gitVersion }} diff --git a/charts/agent-connector/templates/networkpolicy.yaml b/charts/agent-connector/templates/networkpolicy.yaml index 7a40cb6..05b5902 100644 --- a/charts/agent-connector/templates/networkpolicy.yaml +++ b/charts/agent-connector/templates/networkpolicy.yaml @@ -1,3 +1,7 @@ +{{- if eq (.Values.networkPolicy.enabled | toString) "true" }} +{{- range tuple "controlplane" "dataplane" }} +{{- $name := . }} +--- # # Copyright (c) 2023 Contributors to the Eclipse Foundation # @@ -16,10 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if eq (.Values.networkPolicy.enabled | toString) "true" }} -{{- range tuple "controlplane" "dataplane" }} -{{- $name := . }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: diff --git a/charts/agent-connector/templates/service-controlplane.yaml b/charts/agent-connector/templates/service-controlplane.yaml index 277e9d7..e993b46 100644 --- a/charts/agent-connector/templates/service-controlplane.yaml +++ b/charts/agent-connector/templates/service-controlplane.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,8 +20,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/agent-connector/templates/service-dataplane.yaml b/charts/agent-connector/templates/service-dataplane.yaml index c3a636d..71619f8 100644 --- a/charts/agent-connector/templates/service-dataplane.yaml +++ b/charts/agent-connector/templates/service-dataplane.yaml @@ -1,3 +1,6 @@ +{{ $root := . }} +{{- range $dataplane_name, $dataplane := .Values.dataplanes }} +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,10 +23,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{ $root := . }} -{{- range $dataplane_name, $dataplane := .Values.dataplanes }} ---- apiVersion: v1 kind: Service metadata: diff --git a/charts/agent-connector/templates/serviceaccount.yaml b/charts/agent-connector/templates/serviceaccount.yaml index 4a6e1ac..f94ad14 100644 --- a/charts/agent-connector/templates/serviceaccount.yaml +++ b/charts/agent-connector/templates/serviceaccount.yaml @@ -1,3 +1,5 @@ +{{- if .Values.serviceAccount.create -}} +--- # # Copyright (c) 2023 ZF Friedrichshafen AG # Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH @@ -19,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - -{{- if .Values.serviceAccount.create -}} ---- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/agent-connector/values.yaml b/charts/agent-connector/values.yaml index 8ecf7e2..0d577e3 100644 --- a/charts/agent-connector/values.yaml +++ b/charts/agent-connector/values.yaml @@ -1,3 +1,4 @@ +--- # # Copyright (c) 2023 T-Systems International GmbH # Copyright (c) 2023 ZF Friedrichshafen AG @@ -20,9 +21,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - - ---- # Default values for agent-connector. # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -32,6 +30,8 @@ install: vault: false fullnameOverride: "" nameOverride: "" +# -- Image registry to use +imageRegistry: docker.io/ # -- Existing image pull secret to use to [obtain the container image from private registries](https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry) imagePullSecrets: [] # -- To add some custom labels @@ -431,7 +431,7 @@ dataplanes: # -- The hostname to be used to precisely map incoming traffic onto the underlying network service hostname: "edc-data.local" # -- Additional ingress annotations to add, for example when supporting more demanding use cases you may set { nginx.org/proxy-connect-timeout: "30s", nginx.org/proxy-read-timeout: "360s", nginx.org/client-max-body-size: "10m"} - annotations: + annotations: # Sample settings for more demanding use cases # nginx.org/proxy-connect-timeout: "30s" # nginx.org/proxy-read-timeout: "360s" diff --git a/charts/config/chart-testing-config.yaml b/charts/config/chart-testing-config.yaml index 0839561..05780af 100644 --- a/charts/config/chart-testing-config.yaml +++ b/charts/config/chart-testing-config.yaml @@ -18,6 +18,7 @@ --- # Config for testing charts validate-maintainers: false +helm-extra-set-args: "--set=imageRegistry=kind-registry:5000/" chart-repos: - - https://helm.releases.hashicorp.com - - https://charts.bitnami.com/bitnami + - helm=https://helm.releases.hashicorp.com + - bitnami=https://charts.bitnami.com/bitnami From 3c4970923db353bd002345ca4c34d44c18c66150 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 22 Aug 2023 15:55:57 +0200 Subject: [PATCH 05/10] https://jira.catena-x.net/browse/KA-328 push logic and folders debugged --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb0af14..a5cf14c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -129,9 +129,9 @@ jobs: uses: docker/build-push-action@v3 with: context: agent-plane-hashicorp - file: agent-plane/agent-plane-hashcorp/src/main/docker/Dockerfile + file: agent-plane/agent-plane-hashicorp/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR - push: ${{ ( github.repository != 'catenax-ng/product-agents-edc' && github.repository != 'eclipse-tractusx/knowledge-agents-edc') || ( github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/v')) }} + push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-hash.outputs.tags }} labels: ${{ steps.meta-hash.outputs.labels }} @@ -157,6 +157,6 @@ jobs: context: agent-plane/agent-plane-azure-vault/. file: agent-plane/agent-plane-azure-vault/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR - push: ${{ (github.repository == 'catenax-ng/product-agents' || github.repository == 'eclipse-tractusx/knowledge-agents') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} + push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-azr.outputs.tags }} labels: ${{ steps.meta-azr.outputs.labels }} From e915f0c9620326d1e7ceb6eb5a44722f612d7d00 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 22 Aug 2023 16:00:47 +0200 Subject: [PATCH 06/10] https://jira.catena-x.net/browse/KA-328 push folders debugged --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5cf14c..d7c78fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,7 +128,7 @@ jobs: - name: Agent Plane Hashicorp Container Build and push uses: docker/build-push-action@v3 with: - context: agent-plane-hashicorp + context: agent-plane/agent-plane-hashicorp file: agent-plane/agent-plane-hashicorp/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} From 59ab4d1563c327da13da64d29e0b9d70fc978b4d Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 22 Aug 2023 16:05:56 +0200 Subject: [PATCH 07/10] https://jira.catena-x.net/browse/KA-328 push folders debugged --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7c78fc..ccb6b81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,7 +115,7 @@ jobs: uses: docker/metadata-action@v4 with: images: | - ${{ env.IMAGE_NAMESPACE }}/agent-plane-hashicorp + ${{ env.IMAGE_NAMESPACE }}/agentplane-hashicorp # Automatically prepare image tags; See action docs for more examples. # semver patter will generate tags like these for example :1 :1.2 :1.2.3 tags: | @@ -128,8 +128,8 @@ jobs: - name: Agent Plane Hashicorp Container Build and push uses: docker/build-push-action@v3 with: - context: agent-plane/agent-plane-hashicorp - file: agent-plane/agent-plane-hashicorp/src/main/docker/Dockerfile + context: agent-plane/agentplane-hashicorp + file: agent-plane/agentplane-hashicorp/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-hash.outputs.tags }} @@ -141,7 +141,7 @@ jobs: uses: docker/metadata-action@v4 with: images: | - ${{ env.IMAGE_NAMESPACE }}/agent-plane-azure-vault + ${{ env.IMAGE_NAMESPACE }}/agentplane-azure-vault # Automatically prepare image tags; See action docs for more examples. # semver patter will generate tags like these for example :1 :1.2 :1.2.3 tags: | @@ -154,8 +154,8 @@ jobs: - name: Agent Plane Azure Vault Container Build and push uses: docker/build-push-action@v3 with: - context: agent-plane/agent-plane-azure-vault/. - file: agent-plane/agent-plane-azure-vault/src/main/docker/Dockerfile + context: agent-plane/agentplane-azure-vault/. + file: agent-plane/agentplane-azure-vault/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-azr.outputs.tags }} From ea1c15e79d093d644dfdafc4f1463b19065b202f Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Wed, 23 Aug 2023 09:34:46 +0200 Subject: [PATCH 08/10] https://jira.catena-x.net/browse/KA-328 release is done for main/snapshot and vx.x.x tags --- .github/workflows/build.yml | 73 +++++++++++------------- .github/workflows/helm-chart-lint.yml | 7 ++- .github/workflows/helm-chart-release.yml | 6 ++ .github/workflows/kics.yml | 10 +++- .github/workflows/trivy.yml | 13 ++--- 5 files changed, 57 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ccb6b81..c0aa713 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,91 +18,82 @@ # SPDX-License-Identifier: Apache-2.0 # ---- name: "Build" on: + # Runs automatically on main and release branches push: branches: - main - - releases - tags: - - 'v*.*.*' - - 'v*.*.*-*' - release: - types: - - published + - 'releases/**' + # Runs automatically on all code-related PRs to main and release branches pull_request: + branches: + - main + - 'releases/**' paths-ignore: - 'charts/**' - 'docs/**' - '**/*.md' - branches: - - '*' + # Can be scheduled on all branches and version tags workflow_dispatch: + tags: + - 'v*.*.*' + - 'v*.*.*-*' branches: - - 'releases/**' + - '*' +# the docker registry and namespace env: IMAGE_NAMESPACE: "tractusx" +# If build is triggered several times, e.g., through subsequent pushes +# into the same PR, cancel the previous runs, see below concurrency: # cancel only running jobs on pull requests group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +# Actual build/deploy logic jobs: - pre_job: - # continue-on-error: true # Uncomment once integration is finished - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 - with: - # All of these options are optional, so you can remove them if you are happy with the defaults - concurrent_skipping: 'same_content' - skip_after_successful_duplicate: 'true' - do_not_skip: '["push", "pull_request", "workflow_dispatch", "schedule"]' - - build_java: - name: Build Java + # Build maven stuff + build: + name: Build/Deploy Maven & Docker Artifacts runs-on: ubuntu-latest permissions: write-all - needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} strategy: fail-fast: false - steps: + # Get the Code - name: Checkout repository uses: actions/checkout@v3 with: submodules: recursive - # We need to manually instruct maven + # Setup build environment - uses: ./.github/actions/setup-java + # Enabled deployment access (if either running on main or a version tag on eclipse-tractusx) - name: Login to GitHub Container Registry - if: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} + if: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} uses: docker/login-action@v2 with: # Use existing DockerHub credentials present as secrets username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} + # Run Maven Deploy (if either running on main or a version tag on eclipse-tractusx) - name: Deploy Java via Maven - if: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} + if: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} run: | ./mvnw -s settings.xml deploy env: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Run Maven Install (otherwise) - name: Build Java via Maven - if: ${{ ( github.repository != 'catenax-ng/product-agents-edc' && github.repository != 'eclipse-tractusx/knowledge-agents-edc') || ( github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/v')) }} + if: ${{ github.repository != 'eclipse-tractusx/knowledge-agents-edc' || ( github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/v')) }} run: | ./mvnw -s settings.xml install env: @@ -119,8 +110,8 @@ jobs: # Automatically prepare image tags; See action docs for more examples. # semver patter will generate tags like these for example :1 :1.2 :1.2.3 tags: | - type=ref,event=branch - type=ref,event=pr + type=sha,event=branch + type=sha,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} @@ -131,7 +122,7 @@ jobs: context: agent-plane/agentplane-hashicorp file: agent-plane/agentplane-hashicorp/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR - push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} + push: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-hash.outputs.tags }} labels: ${{ steps.meta-hash.outputs.labels }} @@ -145,8 +136,8 @@ jobs: # Automatically prepare image tags; See action docs for more examples. # semver patter will generate tags like these for example :1 :1.2 :1.2.3 tags: | - type=ref,event=branch - type=ref,event=pr + type=sha,event=branch + type=sha,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} @@ -157,6 +148,6 @@ jobs: context: agent-plane/agentplane-azure-vault/. file: agent-plane/agentplane-azure-vault/src/main/docker/Dockerfile # Build image for verification purposes on every trigger event. Only push if event is not a PR - push: ${{ (github.repository == 'catenax-ng/product-agents-edc' || github.repository == 'eclipse-tractusx/knowledge-agents-edc') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} + push: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-azr.outputs.tags }} labels: ${{ steps.meta-azr.outputs.labels }} diff --git a/.github/workflows/helm-chart-lint.yml b/.github/workflows/helm-chart-lint.yml index 78637e6..386a0f0 100644 --- a/.github/workflows/helm-chart-lint.yml +++ b/.github/workflows/helm-chart-lint.yml @@ -21,17 +21,22 @@ name: Lint and Test Charts # Run chart linting and tests on each pull request on: + # Runs automatically on pushes and PRs into main and release branches, if changes to the chart have been performed push: branches: - main - - releases + - 'releases/**' paths: - .github/workflows/** - charts/** pull_request: + branches: + - main + - 'releases/**' paths: - .github/workflows/** - charts/** + # Can be triggered to investigate upgrades workflow_dispatch: inputs: node_image: diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml index 3b77f1a..807af4d 100644 --- a/.github/workflows/helm-chart-release.yml +++ b/.github/workflows/helm-chart-release.yml @@ -20,13 +20,19 @@ name: Release Charts on: + # May be invoked manually workflow_dispatch: + branches: + - main + - 'releases/**' + # Or by pushing to the chart dir of some dev/ release branch push: # prevent unnecessary GH action runs for files outside of charts folder paths: - 'charts/**' branches: - main + - 'releases/**' jobs: release: diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index ce1da1a..1f1f837 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -22,11 +22,17 @@ name: "KICS" on: push: - branches: [main, releases] + branches: + - main + - 'releases/**' pull_request: - branches: [main, releases] + branches: + - main + - 'releases/**' + workflow_dispatch: + # Since rules may change should run regularily schedule: - cron: "0 0 * * *" diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 2622df9..bf65e68 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -28,11 +28,9 @@ on: workflows: [ "Build" ] branches: - main - - releases - - release/* - - hotfix/* tags: - - '[0-9]+.[0-9]+.[0-9]+' + - 'v*.*.*' + - 'v*.*.*-*' types: - completed @@ -46,8 +44,7 @@ jobs: - name: Resolve git 7-chars sha id: git-sha7 run: | - echo "SHA7=1.9.5-SNAPSHOT" >> $GITHUB_OUTPUT -# echo "SHA7=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT + echo "SHA7=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT trivy-analyze-config: runs-on: ubuntu-latest @@ -93,7 +90,7 @@ jobs: - name: "Check if image exists" id: imageCheck run: | - docker manifest inspect tractusx/knowledge-agents-edc/${{ matrix.image }}:${{ needs.git-sha7.outputs.value }} + docker manifest inspect tractusx/${{ matrix.image }}:${{ needs.git-sha7.outputs.value }} continue-on-error: true ## the next two steps will only execute if the image exists check was successful @@ -101,7 +98,7 @@ jobs: if: success() && steps.imageCheck.outcome != 'failure' uses: aquasecurity/trivy-action@master with: - image-ref: "tractusx/knowledge-agents-edc/${{ matrix.image }}:${{ needs.git-sha7.outputs.value }}" + image-ref: "tractusx/${{ matrix.image }}:${{ needs.git-sha7.outputs.value }}" format: "sarif" output: "trivy-results-${{ matrix.image }}.sarif" exit-code: "1" From f920257d23c29fe1b33886d01c46220769bef131 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Wed, 23 Aug 2023 13:04:40 +0200 Subject: [PATCH 09/10] doc: more detailed base image information --- agent-plane/agentplane-azure-vault/README.md | 8 ++++++-- agent-plane/agentplane-hashicorp/README.md | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/agent-plane/agentplane-azure-vault/README.md b/agent-plane/agentplane-azure-vault/README.md index 4085c81..6e101a2 100644 --- a/agent-plane/agentplane-azure-vault/README.md +++ b/agent-plane/agentplane-azure-vault/README.md @@ -87,9 +87,13 @@ Project home: https://projects.eclipse.org/projects/automotive.tractusx Dockerfile: https://github.com/eclipse-tractusx/knowledge-agents-edc/blob/main/agent-plane/agentplane-azure-vault/src/main/docker/Dockerfile Project license: Apache License, Version 2.0 -Used base image -[eclipse-temurin:17-jre-alpine](https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=17-jre-alpine) +**Used base image** + +- [eclipse-temurin:17-jre-alpine](https://github.com/adoptium/containers) +- Official Eclipse Temurin DockerHub page: https://hub.docker.com/_/eclipse-temurin +- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin +- Additional information about the Eclipse Temurin images: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). diff --git a/agent-plane/agentplane-hashicorp/README.md b/agent-plane/agentplane-hashicorp/README.md index 7e19251..e783ebb 100644 --- a/agent-plane/agentplane-hashicorp/README.md +++ b/agent-plane/agentplane-hashicorp/README.md @@ -87,9 +87,13 @@ Project home: https://projects.eclipse.org/projects/automotive.tractusx Dockerfile: https://github.com/eclipse-tractusx/knowledge-agents-edc/blob/main/agent-plane/agentplane-hashicorp/src/main/docker/Dockerfile Project license: Apache License, Version 2.0 -Used base image -[eclipse-temurin:17-jre-alpine](https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=17-jre-alpine) +**Used base image** + +- [eclipse-temurin:17-jre-alpine](https://github.com/adoptium/containers) +- Official Eclipse Temurin DockerHub page: https://hub.docker.com/_/eclipse-temurin +- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin +- Additional information about the Eclipse Temurin images: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). From 1cc9e5c2143521f010d3d07bdc5f27d13e807fd5 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Thu, 24 Aug 2023 08:26:25 +0200 Subject: [PATCH 10/10] docs: #18 license is there, but update dockerhub descriptions is missing. --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0aa713..28ed874 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,6 +126,16 @@ jobs: tags: ${{ steps.meta-hash.outputs.tags }} labels: ${{ steps.meta-hash.outputs.labels }} + # Important step to push image description to DockerHub - since this is version independent, we always take it from main + - name: Update Docker Hub description for Agent Plane Hashicorp + if: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && github.ref == 'refs/heads/main' }} + uses: peter-evans/dockerhub-description@v3 + with: + readme-filepath: agent-plane/agentplane-hashicorp/README.md + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/agentplane-hashicorp + # Create SemVer or ref tags dependent of trigger event - name: Docker Meta Agent Plane Azure Vault id: meta-azr @@ -151,3 +161,13 @@ jobs: push: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} tags: ${{ steps.meta-azr.outputs.tags }} labels: ${{ steps.meta-azr.outputs.labels }} + + # Important step to push image description to DockerHub - since this is version independent, we always take it from main + - name: Update Docker Hub description for Agent Plane Azure Vault + if: ${{ github.repository == 'eclipse-tractusx/knowledge-agents-edc' && github.ref == 'refs/heads/main' }} + uses: peter-evans/dockerhub-description@v3 + with: + readme-filepath: agent-plane/agentplane-azure-vault/README.md + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + repository: ${{ env.IMAGE_NAMESPACE }}/agentplane-azure-vault \ No newline at end of file