From 09d3e278d7bab8ae6dfd6164e301493a631fbff0 Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Fri, 13 Sep 2024 10:15:17 +0200 Subject: [PATCH] chore: add config maps for test seeding data Refs: #205 --- .../templates/job-issuer-migrations.yaml | 10 +- charts/ssi-credential-issuer/values.yaml | 10 +- .../argocd-app-templates/appsetup-int.yaml | 42 ++++++++ .../argocd-app-templates/appsetup-dev.yaml | 41 -------- .../argocd-app-templates/appsetup-int.yaml | 38 ------- .../argocd-app-templates/appsetup-rc.yaml | 38 ------- .../consortia/helm-values/values-dev.yaml | 99 ------------------- .../consortia/helm-values/values-int.yaml | 87 ---------------- .../consortia/helm-values/values-rc.yaml | 99 ------------------- 9 files changed, 56 insertions(+), 408 deletions(-) delete mode 100644 environments/consortia/argocd-app-templates/appsetup-dev.yaml delete mode 100644 environments/consortia/argocd-app-templates/appsetup-int.yaml delete mode 100644 environments/consortia/argocd-app-templates/appsetup-rc.yaml delete mode 100644 environments/consortia/helm-values/values-dev.yaml delete mode 100644 environments/consortia/helm-values/values-int.yaml delete mode 100644 environments/consortia/helm-values/values-rc.yaml diff --git a/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml b/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml index b8a062ea..f134b9d0 100644 --- a/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml +++ b/charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml @@ -66,11 +66,17 @@ spec: - name: "SEEDING__TESTDATAENVIRONMENTS__0" value: "{{ .Values.migrations.seeding.testDataEnvironments }}" - name: "SEEDING__DATAPATHS__0" - value: "{{ .Values.migrations.seeding.testDataPaths }}" + value: "Seeder/Data" + {{- if and (.Values.migrations.seeding.testData.configMap) (.Values.migrations.seeding.testData.filename) }} + - name: "SEEDING__DATAPATHS__1" + value: "Seeder/Data/import" + - name: "SEEDING__TESTDATAENVIRONMENTS__1" + value: "{{ .Values.migrations.seeding.testData.filename }}" + {{- end }} - name: "SERILOG__MINIMUMLEVEL__Default" value: "{{ .Values.migrations.logging.default }}" - name: "PROCESSIDENTITY__IDENTITYID" - value: "{{ .Values.migrations.processIdentity.identityId }}" + value: "ac1cf001-7fbc-1f2f-817f-bce058020006" ports: - name: http containerPort: {{ .Values.portContainer }} diff --git a/charts/ssi-credential-issuer/values.yaml b/charts/ssi-credential-issuer/values.yaml index 50b55548..9701a6db 100644 --- a/charts/ssi-credential-issuer/values.yaml +++ b/charts/ssi-credential-issuer/values.yaml @@ -85,12 +85,14 @@ migrations: cpu: 45m memory: 200M seeding: - testDataEnvironments: "" - testDataPaths: "Seeder/Data" + testDataEnvironments: "" + testData: + # -- ConfigMap containing json files for the tables to seed, e.g. companies.test.json, addresses.test.json, etc. + configMap: "" + # -- Filename identifying the test data files e.g. for companies.test.json the value would be "test" + filename: "" logging: default: "Information" - processIdentity: - identityId: ac1cf001-7fbc-1f2f-817f-bce058020006 processesworker: name: "processesworker" diff --git a/environments/argocd-app-templates/appsetup-int.yaml b/environments/argocd-app-templates/appsetup-int.yaml index 0e68c0b0..c95d2e1b 100644 --- a/environments/argocd-app-templates/appsetup-int.yaml +++ b/environments/argocd-app-templates/appsetup-int.yaml @@ -36,3 +36,45 @@ spec: - name: helm_args value: '-f values.yaml -f ../../environments/helm-values/values-int.yaml' project: project-portal +data: + use_cases.test.json: |- + [ + { + "id": "1aacde78-35ec-4df3-ba1e-f988cddcbbd9", + "name": "None", + "shortname": "None" + } + ] + verified_credential_external_type_detail_versions.test.json: |- + [ + { + "id": "d0f05b79-792c-4cb8-9b8d-6e476ac2e926", + "verified_credential_external_type_id": 2, + "version": "0.0", + "template": "https://catena-x.net/fileadmin/user_upload/04_Einfuehren_und_umsetzen/Governance_Framework/231016_Catena-X_Use_Case_Framework_PCF.pdf", + "valid_from": "2023-01-01 00:00:00.000000 +00:00", + "expiry": "2023-12-31 00:00:00.000000 +00:00" + }, + { + "id": "2d17a933-f65f-49cd-84a9-cff299a79f85", + "verified_credential_external_type_id": 11, + "version": "1.0", + "template": "https://catena-x.net/fileadmin/user_upload/04_Einfuehren_und_umsetzen/Governance_Framework/example.pdf", + "valid_from": "2024-10-16 00:00:00.000000 +00:00", + "expiry": "2025-10-16 00:00:00.000000 +00:00" + } + ] + verified_credential_type_assigned_external_types.test.json: |- + [ + { + "verified_credential_external_type_id": 11, + "verified_credential_type_id": 11 + } + ] + verified_credential_type_assigned_use_cases.test.json: |- + [ + { + "verified_credential_type_id": 11, + "use_case_id": "1aacde78-35ec-4df3-ba1e-f988cddcbbd9" + } + ] diff --git a/environments/consortia/argocd-app-templates/appsetup-dev.yaml b/environments/consortia/argocd-app-templates/appsetup-dev.yaml deleted file mode 100644 index 7089f4b2..00000000 --- a/environments/consortia/argocd-app-templates/appsetup-dev.yaml +++ /dev/null @@ -1,41 +0,0 @@ -############################################################### -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -############################################################### - -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ssi-credential-issuer -spec: - destination: - namespace: product-portal - server: 'https://kubernetes.default.svc' - source: - path: charts/ssi-credential-issuer - repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' - targetRevision: main - plugin: - env: - - name: AVP_SECRET - value: vault-secret - - name: helm_args - value: '-f values.yaml -f ../../environments/consortia/helm-values/values-dev.yaml' - project: project-portal - syncPolicy: - automated: - prune: true diff --git a/environments/consortia/argocd-app-templates/appsetup-int.yaml b/environments/consortia/argocd-app-templates/appsetup-int.yaml deleted file mode 100644 index 8c71d343..00000000 --- a/environments/consortia/argocd-app-templates/appsetup-int.yaml +++ /dev/null @@ -1,38 +0,0 @@ -############################################################### -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -############################################################### - -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ssi-credential-issuer -spec: - destination: - namespace: product-portal - server: 'https://kubernetes.default.svc' - source: - path: charts/ssi-credential-issuer - repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' - targetRevision: ssi-credential-issuer-1.1.0 - plugin: - env: - - name: AVP_SECRET - value: vault-secret - - name: helm_args - value: '-f values.yaml -f ../../environments/consortia/helm-values/values-int.yaml' - project: project-portal diff --git a/environments/consortia/argocd-app-templates/appsetup-rc.yaml b/environments/consortia/argocd-app-templates/appsetup-rc.yaml deleted file mode 100644 index 3b98e6eb..00000000 --- a/environments/consortia/argocd-app-templates/appsetup-rc.yaml +++ /dev/null @@ -1,38 +0,0 @@ -############################################################### -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -############################################################### - -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ssi-credential-issuer-rc -spec: - destination: - namespace: product-iam - server: 'https://kubernetes.default.svc' - source: - path: charts/ssi-credential-issuer - repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' - targetRevision: release-candidate - plugin: - env: - - name: AVP_SECRET - value: vault-secret - - name: helm_args - value: '-f values.yaml -f ../../environments/consortia/helm-values/values-rc.yaml' - project: project-portal diff --git a/environments/consortia/helm-values/values-dev.yaml b/environments/consortia/helm-values/values-dev.yaml deleted file mode 100644 index 6537ba26..00000000 --- a/environments/consortia/helm-values/values-dev.yaml +++ /dev/null @@ -1,99 +0,0 @@ -############################################################### -# Copyright (c) 2024 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 -############################################################### - -portalBackendAddress: "https://portal-backend.dev.demo.catena-x.net" -walletAddress: "https://dis-integration-service-prod.eu10.dim.cloud.sap" -walletTokenAddress: "https://bpnl00000003crhk-catena-x.authentication.eu10.hana.ondemand.com/oauth/token" - -ingress: - enabled: true - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/use-regex: "true" - nginx.ingress.kubernetes.io/enable-cors: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "8m" - nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.dev.demo.catena-x.net" - tls: - - secretName: "tls-secret" - hosts: - - "ssi-credential-issuer.dev.demo.catena-x.net" - hosts: - - host: "ssi-credential-issuer.dev.demo.catena-x.net" - paths: - - path: "/api" - pathType: "Prefix" - backend: - port: 8080 - -service: - image: - tag: "main" - imagePullPolicy: "Always" - swaggerEnabled: true - credential: - issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp" - issuerBpn: "BPNL00000003CRHK" - statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07" - encryptionConfigs: - index0: - encryptionKey: "" - portal: - clientId: "" - clientSecret: "" - -migrations: - image: - tag: "main" - imagePullPolicy: "Always" - logging: - default: "Debug" - seeding: - testDataEnvironments: "test" - -processesworker: - image: - tag: "main" - imagePullPolicy: "Always" - logging: - default: "Debug" - portal: - clientId: "" - clientSecret: "" - wallet: - clientId: "" - clientSecret: "" - -credentialExpiry: - image: - tag: "main" - imagePullPolicy: "Always" - logging: - default: "Debug" - -centralidp: - address: "https://centralidp.dev.demo.catena-x.net" - jwtBearerOptions: - tokenValidationParameters: - validAudience: "Cl24-CX-SSI-CredentialIssuer" - -postgresql: - auth: - postgrespassword: "" - password: "" - replicationPassword: "" diff --git a/environments/consortia/helm-values/values-int.yaml b/environments/consortia/helm-values/values-int.yaml deleted file mode 100644 index 937ce329..00000000 --- a/environments/consortia/helm-values/values-int.yaml +++ /dev/null @@ -1,87 +0,0 @@ -############################################################### -# Copyright (c) 2024 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 -############################################################### - -portalBackendAddress: "https://portal-backend.int.demo.catena-x.net" -walletAddress: "https://dis-integration-service-prod.eu10.dim.cloud.sap" -walletTokenAddress: "https://bpnl00000003crhk-catena-x.authentication.eu10.hana.ondemand.com/oauth/token" - -ingress: - enabled: true - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/use-regex: "true" - nginx.ingress.kubernetes.io/enable-cors: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "8m" - nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.int.demo.catena-x.net" - tls: - - secretName: "tls-secret" - hosts: - - "ssi-credential-issuer.int.demo.catena-x.net" - hosts: - - host: "ssi-credential-issuer.int.demo.catena-x.net" - paths: - - path: "/api" - pathType: "Prefix" - backend: - port: 8080 - -service: - swaggerEnabled: true - credential: - issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp" - issuerBpn: "BPNL00000003CRHK" - statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07" - encryptionConfigs: - index0: - encryptionKey: "" - portal: - clientId: "" - clientSecret: "" - -migrations: - logging: - default: "Debug" - seeding: - testDataEnvironments: "test" - -processesworker: - logging: - default: "Debug" - portal: - clientId: "" - clientSecret: "" - wallet: - clientId: "" - clientSecret: "" - -credentialExpiry: - logging: - default: "Debug" - -centralidp: - address: "https://centralidp.int.demo.catena-x.net" - jwtBearerOptions: - tokenValidationParameters: - validAudience: "Cl24-CX-SSI-CredentialIssuer" - -postgresql: - auth: - postgrespassword: "" - password: "" - replicationPassword: "" diff --git a/environments/consortia/helm-values/values-rc.yaml b/environments/consortia/helm-values/values-rc.yaml deleted file mode 100644 index f5472ae3..00000000 --- a/environments/consortia/helm-values/values-rc.yaml +++ /dev/null @@ -1,99 +0,0 @@ -############################################################### -# Copyright (c) 2024 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 -############################################################### - -portalBackendAddress: "https://portal-backend-rc.dev.demo.catena-x.net" -walletAddress: "https://dis-integration-service-prod.eu10.dim.cloud.sap" -walletTokenAddress: "https://bpnl00000003crhk-catena-x.authentication.eu10.hana.ondemand.com/oauth/token" - -ingress: - enabled: true - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/use-regex: "true" - nginx.ingress.kubernetes.io/enable-cors: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "8m" - nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000, https://*.dev.demo.catena-x.net" - tls: - - secretName: "tls-secret" - hosts: - - "ssi-credential-issuer-rc.dev.demo.catena-x.net" - hosts: - - host: "ssi-credential-issuer-rc.dev.demo.catena-x.net" - paths: - - path: "/api" - pathType: "Prefix" - backend: - port: 8080 - -service: - image: - tag: "rc" - imagePullPolicy: "Always" - swaggerEnabled: true - credential: - issuerDid: "did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp" - issuerBpn: "BPNL00000003CRHK" - statusListUrl: "https://dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com/credentials/status/c5f1d9bb-42d5-42b7-a80a-ccbda6891df3/3e6f1f74-56e3-443a-a75e-320c301aca07" - encryptionConfigs: - index0: - encryptionKey: "" - portal: - clientId: "" - clientSecret: "" - -migrations: - image: - tag: "rc" - imagePullPolicy: "Always" - logging: - default: "Debug" - seeding: - testDataEnvironments: "test" - -processesworker: - image: - tag: "rc" - imagePullPolicy: "Always" - logging: - default: "Debug" - portal: - clientId: "" - clientSecret: "" - wallet: - clientId: "" - clientSecret: "" - -credentialExpiry: - image: - tag: "rc" - imagePullPolicy: "Always" - logging: - default: "Debug" - -centralidp: - address: "https://centralidp-rc.dev.demo.catena-x.net" - jwtBearerOptions: - tokenValidationParameters: - validAudience: "Cl24-CX-SSI-CredentialIssuer" - -postgresql: - auth: - postgrespassword: "" - password: "" - replicationPassword: ""