Skip to content

Commit

Permalink
chore: add custom did methods
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsaporiti committed Jun 21, 2024
1 parent 89a2c2b commit a594350
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 10 deletions.
7 changes: 5 additions & 2 deletions k8s/helm/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export INGRESS_ENABLED=true # If this value is false
export VAULT_PWD=password # Vault password.
export RHS_MODE=None # Reverse Hash Service mode. Options: None, OnChain, OffChain
export RHS_URL="https://reverse-hash-service.com" # Reverse Hash Service URL. Required if RHS_MODE is OffChain
export ISSUER_CUSTOM_DID_METHODS='[{"blockchain":"camino","network":"columbus","networkFlag":"0b10000011","chainID":501}]' # Custom DID methods
```

## Install the helm chart with ingress and domain names
Expand All @@ -59,7 +60,8 @@ helm install "$APP_INSTANCE_NAME" . \
--set privateKey="$PRIVATE_KEY" \
--set vaultpwd="$VAULT_PWD" \
--set rhsMode="$RHS_MODE" \
--set rhsUrl="$RHS_URL"
--set rhsUrl="$RHS_URL" \
--set issuerCustomDidMethods="$ISSUER_CUSTOM_DID_METHODS"
```

In the code above, the PUBLIC_IP is not provided because is not needed when the ingress is enabled.
Expand All @@ -82,7 +84,8 @@ helm install "$APP_INSTANCE_NAME" . \
--set privateKey="$PRIVATE_KEY" \
--set vaultpwd="$VAULT_PWD" \
--set rhsMode="$RHS_MODE" \
--set rhsUrl="$RHS_URL"
--set rhsUrl="$RHS_URL" \
--set issuerCustomDidMethods="$ISSUER_CUSTOM_DID_METHODS"
```

In the code above, the publicIP is provided because is needed when the ingress is not enabled. In this case `$APP_DOMAIN`, `$UI_DOMAIN` and `$API_DOMAIN` are not used.
Expand Down
6 changes: 6 additions & 0 deletions k8s/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,9 @@ Define custom service selectorLabels for vault
{{- define "polygon-id-issuer.vaultIssuerNode.Labels" -}}
app: {{ .Values.vaultIssuerNode.service.selector }}
{{- end }}



{{- define "helpers.serviceAccountName" -}}
{{- printf "%s-%s%s" .Release.Name .Release.Namespace "-service-account" -}}
{{- end -}}
2 changes: 2 additions & 0 deletions k8s/helm/templates/issuer-node-api-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ data:
ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID : {{ include "helpers.api-rsh-chain-id" . | nindent 4 }}
ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT : {{ include "helpers.api-rsh-contract" . | nindent 4 }}
ISSUER_IPFS_GATEWAY_URL : {{ .Values.apiIssuerNode.configMap.issuerIpfsGatewayUrl | quote }}
ISSUER_CUSTOM_DID_METHODS : {{ .Values.issuerCustomDidMethods | toJson | quote }}




2 changes: 1 addition & 1 deletion k8s/helm/templates/issuer-node-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{{- include "polygon-id-issuer.apiIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.apiIssuerNode.deployment.containerName }}
image: {{ .Values.issuernode_repository_image }}:{{ .Values.issuernode_repository_tag }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/issuer-node-api-ui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{{- include "polygon-id-issuer.apiUiIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
initContainers:
- name: {{ .Values.apiUiIssuerNode.deployment.init.containerName }}
image: {{ .Values.issuernode_repository_image }}:{{ .Values.issuernode_repository_tag }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/issuer-node-notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{{- include "polygon-id-issuer.notificationsIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.notificationsIssuerNode.deployment.containerName }}
image: {{ .Values.issuernode_repository_image }}:{{ .Values.issuernode_repository_tag }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/issuer-node-pending-publisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{{- include "polygon-id-issuer.pendingPublisherIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.pendingPublisherIssuerNode.deployment.containerName }}
image: {{ .Values.issuernode_repository_image }}:{{ .Values.issuernode_repository_tag }}
Expand Down
1 change: 1 addition & 0 deletions k8s/helm/templates/issuer-node-ui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
{{- include "polygon-id-issuer.uiIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.uiIssuerNode.deployment.containerName }}
image: {{ .Values.issuernode_ui_repository_image }}:{{ .Values.issuernode_ui_repository_tag }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/postgres-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{{- include "polygon-id-issuer.postgresIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.postgresIssuerNode.deployment.containerName }}
image: {{ .Values.postgresIssuerNode.deployment.image.repository }}:{{ .Values.postgresIssuerNode.deployment.image.tag }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/redis-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{{- include "polygon-id-issuer.redisIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.redisIssuerNode.deployment.containerName }}
image: {{ .Values.redisIssuerNode.deployment.image.repository }}:{{ .Values.redisIssuerNode.deployment.image.tag }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/vault-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
{{- include "polygon-id-issuer.vaultIssuerNode.Labels" . | nindent 8 }}
{{- include "polygon-id-issuer.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: issuer-node-service-account
serviceAccountName: {{ include "helpers.serviceAccountName" . }}
containers:
- name: {{ .Values.vaultIssuerNode.deployment.containerName }}
securityContext:
Expand Down
3 changes: 2 additions & 1 deletion k8s/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ uiIssuerNode:
issuerUiBlockExplorerUrlMain: https://polygonscan.com/
issuerUiIpfsGatewayUrl: https://ipfs.io
issuerApiUiName: issuer-node-ui-configmap
issuerUiSchemaExplorerAndBuilderUrl: https://schema-builder.polygonid.me
issuerUiSchemaExplorerAndBuilderUrl: https://tools.privado.id

postgresIssuerNode:
deployment:
Expand Down Expand Up @@ -475,3 +475,4 @@ issuerKeyType: BJJ
rhsMode: None
rhsUrl: nil

issuerCustomDidMethods: ""

0 comments on commit a594350

Please sign in to comment.