From 146cb6f9e91b908c8294423e4a8237f6329efa9c Mon Sep 17 00:00:00 2001 From: Tim Smyth Date: Mon, 26 Feb 2024 12:35:24 +0100 Subject: [PATCH 1/2] Fill TIR broker with initial set of dids --- .../trusted-issuers-registry/Chart.yaml | 1 + .../templates/init-cm.yaml | 38 +++++++++++++++++++ .../templates/init-job.yaml | 22 +++++++++++ .../trusted-issuers-registry/values.yaml | 7 +++- 4 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml create mode 100644 aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-job.yaml diff --git a/aws/dsba/onboarding-portal/trusted-issuers-registry/Chart.yaml b/aws/dsba/onboarding-portal/trusted-issuers-registry/Chart.yaml index ff4f5dc1..81e010d7 100644 --- a/aws/dsba/onboarding-portal/trusted-issuers-registry/Chart.yaml +++ b/aws/dsba/onboarding-portal/trusted-issuers-registry/Chart.yaml @@ -8,5 +8,6 @@ appVersion: "0.0.1" dependencies: - name: trusted-issuers-registry + alias: trustedIssuersRegistry version: 0.0.3 repository: https://fiware.github.io/helm-charts diff --git a/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml b/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml new file mode 100644 index 00000000..af3a309c --- /dev/null +++ b/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml @@ -0,0 +1,38 @@ +{{- $values := .Values -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: dsba-onboarding-tir-participants +data: + import.sh: |- + broker = {{ .Values.trustedIssuersRegistry.tir.ngsiBroker.url}} + {{- range .Values.initialData }} + curl -iX POST '{{ $values.trustedIssuersRegistry.tir.ngsiBroker.url}}ngsi-ld/v1/entities' \ + -H 'Content-Type: application/json' \ + -d '{ + "id": "urn:ngsi-ld:TrustedIssuer:{{ . }}", + "type": "TrustedIssuer", + "issuer": { + "type": "Property", + "value": "{{ . }}" + }, + "selfDescription": { + "type": "Property", + "value": { + "id": "{{ . }}", + "type": "gx:LegalParticipant", + "gx:legalName": "IPS", + "gx:legalRegistrationNumber": { + "gx:vatID": "MYVATID" + }, + "gx:headquarterAddress": { + "gx:countrySubdivisionCode": "DE-BER" + }, + "gx:legalAddress": { + "gx:countrySubdivisionCode": "DE-BER" + }, + "gx-terms-and-conditions:gaiaxTermsAndConditions": "70c1d713215f95191a11d38fe2341faed27d19e083917bc8732ca4fea4976700" + } + } + }' + {{- end }} \ No newline at end of file diff --git a/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-job.yaml b/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-job.yaml new file mode 100644 index 00000000..8dfc74b4 --- /dev/null +++ b/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-job.yaml @@ -0,0 +1,22 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: dsba-onboarding-tir-participants +spec: + template: + spec: + containers: + - name: init + image: quay.io/opencloudio/curl:4.2.0-build.8 + command: + - /bin/sh + - /opt/tir/script/import.sh + volumeMounts: + - name: import-config + mountPath: /opt/tir/script + restartPolicy: OnFailure + volumes: + - name: import-config + configMap: + name: dsba-onboarding-tir-participants + backoffLimit: 10 \ No newline at end of file diff --git a/aws/dsba/onboarding-portal/trusted-issuers-registry/values.yaml b/aws/dsba/onboarding-portal/trusted-issuers-registry/values.yaml index 4f0f80cd..ffd0910a 100644 --- a/aws/dsba/onboarding-portal/trusted-issuers-registry/values.yaml +++ b/aws/dsba/onboarding-portal/trusted-issuers-registry/values.yaml @@ -1,4 +1,8 @@ -trusted-issuers-registry: +initialParticipants: + - did:web:packetdelivery.dsba.fiware.dev:did + - did:web:onboarding.dsba.fiware.dev:did + - did:web:happypets.dsba.fiware.dev:did +trustedIssuersRegistry: replicaCount: 1 deployment: image: @@ -16,7 +20,6 @@ trusted-issuers-registry: issuer: kind: ClusterIssuer name: letsencrypt-aws-prod - tir: ngsiBroker: url: http://dsba-onboarding-portal-orion-ld:1026/ From b7d5cf4c63d80f6f5ed82bb1c132e911a7f2291b Mon Sep 17 00:00:00 2001 From: Tim Smyth Date: Mon, 26 Feb 2024 12:36:33 +0100 Subject: [PATCH 2/2] fix cp error --- .../trusted-issuers-registry/templates/init-cm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml b/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml index af3a309c..ea58fa6e 100644 --- a/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml +++ b/aws/dsba/onboarding-portal/trusted-issuers-registry/templates/init-cm.yaml @@ -21,7 +21,7 @@ data: "value": { "id": "{{ . }}", "type": "gx:LegalParticipant", - "gx:legalName": "IPS", + "gx:legalName": "SomeName", "gx:legalRegistrationNumber": { "gx:vatID": "MYVATID" },