Skip to content

Commit a6d9c07

Browse files
feature: create helm chart using the Azure KeyVault variant (eclipse-tractusx#279)
* feat: add Helm chart that utilized Azure KeyVault + Postgres * pr remarks * Update charts/tractusx-connector-azure-vault/README.md.gotmpl Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <florian.rusch.external@zf.com> * use cUrl instead of wget do satisfy SonarCloud --------- Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <florian.rusch.external@zf.com>
1 parent e920691 commit a6d9c07

File tree

43 files changed

+2222
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2222
-28
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ updates:
3636
-
3737
package-ecosystem: "docker"
3838
target-branch: main
39-
directory: ./edc-controlplane/edc-controlplane-postgresql/src/main/docker/
39+
directory: ./edc-controlplane/edc-controlplane-postgresql-azure-vault/src/main/docker/
4040
labels:
4141
- "dependabot"
4242
- "docker"

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
7979
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault },
8080
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
81-
{ dir: edc-controlplane, img: edc-controlplane-postgresql },
81+
{ dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault },
8282
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
8383
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ]
8484
permissions:

.github/workflows/deployment-test.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ concurrency:
4545

4646
jobs:
4747

48+
secret-presence:
49+
runs-on: ubuntu-latest
50+
outputs:
51+
AZURE_KV_CREDS: ${{ steps.secret-presence.outputs.AZURE_KV_CREDS }}
52+
steps:
53+
- name: Check whether secrets exist
54+
id: secret-presence
55+
run: |
56+
[ ! -z "${{ secrets.AZURE_TENANT_ID }}" ] &&
57+
[ ! -z "${{ secrets.AZURE_CLIENT_ID }}" ] &&
58+
[ ! -z "${{ secrets.AZURE_CLIENT_SECRET }}" ] &&
59+
[ ! -z "${{ secrets.AZURE_VAULT_NAME }}" ] &&
60+
echo "AZURE_KV_CREDS=true" >> $GITHUB_OUTPUT
61+
exit 0
62+
4863
test-prepare:
4964
runs-on: ubuntu-latest
5065
steps:
@@ -99,3 +114,33 @@ jobs:
99114
100115
# execute the helm test
101116
helm test tx-prod --logs
117+
118+
test-azure-vault-postgres:
119+
runs-on: ubuntu-latest
120+
needs: [ test-prepare, secret-presence ]
121+
if: |
122+
needs.secret-presence.outputs.AZURE_KV_CREDS
123+
steps:
124+
- name: Checkout
125+
uses: actions/checkout@v3.3.0
126+
- uses: ./.github/actions/run-deployment-test
127+
name: "Run deployment test using KinD and Helm"
128+
with:
129+
imagename: "edc-controlplane-postgresql-azure-vault edc-dataplane-azure-vault"
130+
rootDir: "."
131+
helm_command: |-
132+
helm install tx-prod charts/tractusx-connector-azure-vault \
133+
-f edc-tests/deployment/src/main/resources/helm/tractusx-connector-azure-vault-test.yaml \
134+
--dependency-update \
135+
--set vault.azure.name=${{ secrets.AZURE_VAULT_NAME }} \
136+
--set vault.azure.client=${{ secrets.AZURE_CLIENT_ID }} \
137+
--set vault.azure.secret=${{ secrets.AZURE_CLIENT_SECRET }} \
138+
--set vault.azure.tenant=${{ secrets.AZURE_TENANT_ID }} \
139+
--wait-for-jobs --timeout=120s
140+
141+
# wait for the pod to become ready
142+
kubectl rollout status deployment tx-prod-controlplane
143+
kubectl rollout status deployment tx-prod-dataplane
144+
145+
# execute the helm test
146+
helm test tx-prod --logs

.github/workflows/publish-docker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
4848
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault },
4949
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
50-
{ dir: edc-controlplane, img: edc-controlplane-postgresql },
50+
{ dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault },
5151
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
5252
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ]
5353
permissions:

.github/workflows/publish-new-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
variant: [{dir: edc-controlplane, img: edc-runtime-memory},
8787
{dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault},
8888
{dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault},
89-
{dir: edc-controlplane, img: edc-controlplane-postgresql},
89+
{dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault},
9090
{dir: edc-dataplane, img: edc-dataplane-azure-vault},
9191
{dir: edc-dataplane, img: edc-dataplane-hashicorp-vault}]
9292

.github/workflows/trivy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
image:
6767
- edc-runtime-memory
6868
- edc-controlplane-memory-hashicorp-vault
69-
- edc-controlplane-postgresql
69+
- edc-controlplane-postgresql-azure-vault
7070
- edc-controlplane-postgresql-hashicorp-vault
7171
- edc-dataplane-azure-vault
7272
- edc-dataplane-hashicorp-vault

.github/workflows/veracode.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
variant: [ { dir: edc-controlplane, name: edc-runtime-memory },
4242
{ dir: edc-controlplane, name: edc-controlplane-memory-hashicorp-vault },
4343
{ dir: edc-controlplane, name: edc-controlplane-postgresql-hashicorp-vault },
44-
{ dir: edc-controlplane, name: edc-controlplane-postgresql },
44+
{ dir: edc-controlplane, name: edc-controlplane-postgresql-azure-vault },
4545
{ dir: edc-dataplane, name: edc-dataplane-azure-vault },
4646
{ dir: edc-dataplane, name: edc-dataplane-hashicorp-vault } ]
4747
steps:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The Data-Plane does the heavy lifting of transferring and receiving data streams
3030

3131
Depending on your environment there are different derivatives of the control-plane prepared:
3232

33-
- [edc-controlplane-postgresql](edc-controlplane/edc-controlplane-postgresql) with dependency onto
33+
- [edc-controlplane-postgresql-azure-vault](edc-controlplane/edc-controlplane-postgresql-azure-vault) with dependency onto
3434
- [Azure Key Vault](https://azure.microsoft.com/en-us/services/key-vault/#product-overview)
3535
- [PostgreSQL 8.2 or newer](https://www.postgresql.org/)
3636
- [edc-controlplane-postgresql-hashicorp-vault](edc-controlplane/edc-controlplane-postgresql-hashicorp-vault) with
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#
2+
# Copyright (c) 2023 ZF Friedrichshafen AG
3+
# Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH
4+
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
5+
# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
6+
#
7+
# See the NOTICE file(s) distributed with this work for additional
8+
# information regarding copyright ownership.
9+
#
10+
# This program and the accompanying materials are made available under the
11+
# terms of the Apache License, Version 2.0 which is available at
12+
# https://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17+
# License for the specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
# SPDX-License-Identifier: Apache-2.0
21+
#
22+
23+
---
24+
apiVersion: v2
25+
name: tractusx-connector-azure-vault
26+
description: |
27+
A Helm chart for Tractus-X Eclipse Data Space Connector. The connector deployment consists of two runtime consists of a
28+
Control Plane and a Data Plane. Note that _no_ external dependencies such as a PostgreSQL database and Azure KeyVault are included.
29+
30+
This chart is intended for use with an _existing_ PostgreSQL database and an _existing_ Azure KeyVault.
31+
# A chart can be either an 'application' or a 'library' chart.
32+
#
33+
# Application charts are a collection of templates that can be packaged into versioned archives
34+
# to be deployed.
35+
#
36+
# Library charts provide useful utilities or functions for the chart developer. They're included as
37+
# a dependency of application charts to inject those utilities and functions into the rendering
38+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
39+
type: application
40+
# This is the chart version. This version number should be incremented each time you make changes
41+
# to the chart and its templates, including the app version.
42+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
43+
version: 0.3.3
44+
# This is the version number of the application being deployed. This version number should be
45+
# incremented each time you make changes to the application. Versions are not expected to
46+
# follow Semantic Versioning. They should reflect the version the application is using.
47+
# It is recommended to use it with quotes.
48+
appVersion: "0.3.3"
49+
home: https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector
50+
sources:
51+
- https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector

0 commit comments

Comments
 (0)