diff --git a/infrastructure/local/docker-compose-infra.yml b/infrastructure/local/docker-compose-infra.yml index d5950f0f3..f3c085e6c 100644 --- a/infrastructure/local/docker-compose-infra.yml +++ b/infrastructure/local/docker-compose-infra.yml @@ -76,7 +76,7 @@ services: "--spider", "--proxy", "off", - "http://localhost:8200/v1/sys/health?standbyok=true", + "http://vault:8200/v1/sys/health?standbyok=true", ] interval: 10s timeout: 3s diff --git a/k8s/helm/readme.md b/k8s/helm/readme.md index ce69d44a6..90ea0a4ef 100644 --- a/k8s/helm/readme.md +++ b/k8s/helm/readme.md @@ -33,12 +33,14 @@ export PRIVATE_KEY='YOUR PRIVATE KEY' # Private key of the wal export PUBLIC_IP='YOUR PUBLIC IP' # Provide the PUBLIC IP if you have any otherwise leave this field. export MAINNET=false # Specify if the network is main, if this value is false issuer node will use amoy export UIPASSWORD="my ui password" # Password for user: ui-user. This password is used when the user visit the ui. +export UI_INSECURE=true # Set as true if the ui doesn't require basic auth. If this value true UIPASSWORD can be blank export ISSUERNAME="My Issuer" # Issuer Name. This value is shown in the UI export ISSUER_ETHERUM_URL="https://polygon-amoy.XXXX" # Blockchain RPC. export INGRESS_ENABLED=true # If this value is false you must provide a STATIC_IP 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 @@ -59,7 +61,9 @@ 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-json issuerCustomDidMethods="$ISSUER_CUSTOM_DID_METHODS" \ +--set issuerUiInsecure=$UI_INSECURE ``` In the code above, the PUBLIC_IP is not provided because is not needed when the ingress is enabled. @@ -82,7 +86,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. diff --git a/k8s/helm/templates/_helpers.tpl b/k8s/helm/templates/_helpers.tpl index cd7201ba1..42d343528 100644 --- a/k8s/helm/templates/_helpers.tpl +++ b/k8s/helm/templates/_helpers.tpl @@ -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 -}} \ No newline at end of file diff --git a/k8s/helm/templates/issuer-node-api-configmap.yaml b/k8s/helm/templates/issuer-node-api-configmap.yaml index 1d3abf7bb..849aeb97e 100644 --- a/k8s/helm/templates/issuer-node-api-configmap.yaml +++ b/k8s/helm/templates/issuer-node-api-configmap.yaml @@ -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 }} + \ No newline at end of file diff --git a/k8s/helm/templates/issuer-node-api-deployment.yaml b/k8s/helm/templates/issuer-node-api-deployment.yaml index e413ca47d..552a00be7 100644 --- a/k8s/helm/templates/issuer-node-api-deployment.yaml +++ b/k8s/helm/templates/issuer-node-api-deployment.yaml @@ -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 }} diff --git a/k8s/helm/templates/issuer-node-api-ui-deployment.yaml b/k8s/helm/templates/issuer-node-api-ui-deployment.yaml index f736d6feb..8f00bda58 100644 --- a/k8s/helm/templates/issuer-node-api-ui-deployment.yaml +++ b/k8s/helm/templates/issuer-node-api-ui-deployment.yaml @@ -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 }} diff --git a/k8s/helm/templates/issuer-node-notifications.yaml b/k8s/helm/templates/issuer-node-notifications.yaml index 71124c72a..0febae3a3 100644 --- a/k8s/helm/templates/issuer-node-notifications.yaml +++ b/k8s/helm/templates/issuer-node-notifications.yaml @@ -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 }} diff --git a/k8s/helm/templates/issuer-node-pending-publisher.yaml b/k8s/helm/templates/issuer-node-pending-publisher.yaml index 539202600..6ef63dae9 100644 --- a/k8s/helm/templates/issuer-node-pending-publisher.yaml +++ b/k8s/helm/templates/issuer-node-pending-publisher.yaml @@ -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 }} diff --git a/k8s/helm/templates/issuer-node-ui-configmap.yaml b/k8s/helm/templates/issuer-node-ui-configmap.yaml index b201df838..5a71be8a9 100644 --- a/k8s/helm/templates/issuer-node-ui-configmap.yaml +++ b/k8s/helm/templates/issuer-node-ui-configmap.yaml @@ -14,4 +14,5 @@ data: ISSUER_API_UI_AUTH_PASSWORD: {{ .Values.uiIssuerNode.configMap.issuerApiUiAuthPassword }} ISSUER_API_UI_ISSUER_NAME: {{ .Values.issuerName }} ISSUER_UI_IPFS_GATEWAY_URL: {{ .Values.uiIssuerNode.configMap.issuerUiIpfsGatewayUrl }} - ISSUER_UI_SCHEMA_EXPLORER_AND_BUILDER_URL: {{ .Values.uiIssuerNode.configMap.issuerUiSchemaExplorerAndBuilderUrl }} \ No newline at end of file + ISSUER_UI_SCHEMA_EXPLORER_AND_BUILDER_URL: {{ .Values.uiIssuerNode.configMap.issuerUiSchemaExplorerAndBuilderUrl }} + ISSUER_UI_INSECURE: {{ .Values.issuerUiInsecure | quote }} \ No newline at end of file diff --git a/k8s/helm/templates/issuer-node-ui-deployment.yaml b/k8s/helm/templates/issuer-node-ui-deployment.yaml index 097e95b1d..fc6a0d162 100644 --- a/k8s/helm/templates/issuer-node-ui-deployment.yaml +++ b/k8s/helm/templates/issuer-node-ui-deployment.yaml @@ -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 }} diff --git a/k8s/helm/templates/postgres-deployment.yaml b/k8s/helm/templates/postgres-deployment.yaml index 0c20e79ca..7e6e423dd 100644 --- a/k8s/helm/templates/postgres-deployment.yaml +++ b/k8s/helm/templates/postgres-deployment.yaml @@ -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 }} diff --git a/k8s/helm/templates/redis-deployment.yaml b/k8s/helm/templates/redis-deployment.yaml index d65bfbf11..370c3d905 100644 --- a/k8s/helm/templates/redis-deployment.yaml +++ b/k8s/helm/templates/redis-deployment.yaml @@ -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 }} diff --git a/k8s/helm/templates/vault-deployment.yaml b/k8s/helm/templates/vault-deployment.yaml index 767ede10b..ffbf8306b 100644 --- a/k8s/helm/templates/vault-deployment.yaml +++ b/k8s/helm/templates/vault-deployment.yaml @@ -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: diff --git a/k8s/helm/values.yaml b/k8s/helm/values.yaml index 0d261de1b..56ef21c1a 100644 --- a/k8s/helm/values.yaml +++ b/k8s/helm/values.yaml @@ -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: @@ -464,6 +464,7 @@ issuerEthereumUrl: https://polygon-amoy.g.alchemy.com/v2/ mainnet: false publicIP: nil uiPassword: password +issuerUiInsecure: false issuerName: "My Issuer!" ingressEnabled: false privateKey: metamask private key @@ -475,3 +476,4 @@ issuerKeyType: BJJ rhsMode: None rhsUrl: nil +issuerCustomDidMethods: ""