-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from FIWARE-Ops/onboarding-did
Added init job to onboarding waltid
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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\" | ||
}" |
27 changes: 27 additions & 0 deletions
27
aws/dsba/onboarding-portal/walt-id/templates/init-job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |