diff --git a/aws/dsba/onboarding-portal/walt-id/Chart.yaml b/aws/dsba/onboarding-portal/walt-id/Chart.yaml index bc64fb89..01c9734f 100644 --- a/aws/dsba/onboarding-portal/walt-id/Chart.yaml +++ b/aws/dsba/onboarding-portal/walt-id/Chart.yaml @@ -3,7 +3,7 @@ name: vcwaltid description: Chart holder for argo-cd type: application -version: 0.0.16 +version: 0.0.18 appVersion: "0.0.1" dependencies: diff --git a/aws/dsba/onboarding-portal/walt-id/templates/init-cm.yaml b/aws/dsba/onboarding-portal/walt-id/templates/init-cm.yaml new file mode 100644 index 00000000..5727d3d7 --- /dev/null +++ b/aws/dsba/onboarding-portal/walt-id/templates/init-cm.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "waltid.fullname" . }}-did-config +data: + import.sh: |- + export KEY=$(cat /opt/did/secret/tls.key) + export KEY_ID=$(curl --location "http://{{ include "waltid.fullname" . }}:{{ .Values.vcwaltid.api.core.port }}/v1/key/import" --header 'Content-Type: text/plain' --data "${KEY}" | jq -r '.id') + echo The key id: ${KEY_ID} + curl -v --location "http://{{ include "waltid.fullname" . }}:{{ .Values.vcwaltid.api.core.port }}/v1/did/create" \ + --header 'Content-Type: application/json' \ + --data "{ + \"method\": \"web\", + \"keyAlias\":\"${KEY_ID}\", + \"domain\": \"{{ .Values.route.host }}\", + \"path\": \"did\", + \"x5u\": \"https://{{ .Values.route.host }}/certs/tls.crt\" + }" \ No newline at end of file diff --git a/aws/dsba/onboarding-portal/walt-id/templates/init-job.yaml b/aws/dsba/onboarding-portal/walt-id/templates/init-job.yaml new file mode 100644 index 00000000..097bf518 --- /dev/null +++ b/aws/dsba/onboarding-portal/walt-id/templates/init-job.yaml @@ -0,0 +1,27 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "waltid.fullname" . }}-init +spec: + template: + spec: + containers: + - name: init + image: quay.io/opencloudio/curl:4.2.0-build.8 + command: + - /bin/sh + - /opt/did/script/import.sh + volumeMounts: + - name: did-config + mountPath: /opt/did/script + - name: did-secret + mountPath: /opt/did/secret + restartPolicy: OnFailure + volumes: + - name: did-config + configMap: + name: {{ include "waltid.fullname" . }}-did-config + - name: did-secret + secret: + secretName: {{ include "waltid.fullname" . }}-tls-sec + backoffLimit: 10 \ No newline at end of file