Skip to content

Commit

Permalink
Merge branch 'main' into fix/chart-db-connection
Browse files Browse the repository at this point in the history
  • Loading branch information
i5okie authored Oct 16, 2023
2 parents f576ac4 + 10e54d4 commit 806b38c
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 37 deletions.
9 changes: 9 additions & 0 deletions charts/traction/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ spec:
name: {{ template "tenant-ui.fullname" . }}
resources:
{{- toYaml .Values.ui.resources | nindent 12 }}
volumeMounts:
- name: reservation-form
mountPath: "/usr/src/app/frontend/dist/forms/reservation.json"
subPath: "reservation.json"
readOnly: true
volumes:
- name: reservation-form
configMap:
name: {{ include "tenant-ui.fullname" . }}-form
{{- with .Values.ui.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
12 changes: 12 additions & 0 deletions charts/traction/templates/ui/form-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.ui.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "tenant-ui.fullname" . }}-form
labels:
{{- include "tenant-ui.labels" . | nindent 4 }}
data:
# TODO: Strip out newline characters
reservation.json: |
{{ .Values.ui.oidc.reservationForm | replace "\n" "" | nindent 4 }}
{{- end -}}
72 changes: 42 additions & 30 deletions charts/traction/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## @param nameOverride
## @param nameOverride
nameOverride: ""
## @param fullnameOverride
fullnameOverride: ""
Expand All @@ -8,7 +8,7 @@ ingressSuffix: -dev.example.com
## @section Acapy Configuration
##
acapy:
## @param acapy.image.repository
## @param acapy.image.repository
## @param acapy.image.pullPolicy
## @param acapy.image.pullSecrets [array]
## @param acapy.image.tag Overrides the image tag which defaults to the chart appVersion.
Expand All @@ -17,7 +17,7 @@ acapy:
repository: ghcr.io/bcgov/traction-plugins-acapy
pullPolicy: IfNotPresent
pullSecrets: []
tag: ''
tag: ""

## ServiceAccount configuration
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
Expand Down Expand Up @@ -78,7 +78,7 @@ acapy:
## @param acapy.argfile.yml.emit-new-didcomm-prefix Emit protocol messages with new DIDComm prefix; i.e., 'https://didcomm.org/' instead of (default) prefix 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/'.
## @param acapy.argfile.yml.endorser-alias For transaction Authors, specify the alias of the Endorser connection that will be used to endorse transactions.
## @param acapy.argfile.yml.endorser-protocol-role Specify the role ('author' or 'endorser') which this agent will participate. Authors will request transaction endorement from an Endorser. Endorsers will endorse transactions from Authors, and may write their own transactions to the ledger. If no role (or 'none') is specified then the endorsement protocol will not be used and this agent will write transactions to the ledger directly.
## @param acapy.argfile.yml.genesis-transactions-list Path to YAML configuration for connecting to multiple HyperLedger Indy ledgers.
## @param acapy.argfile.yml.genesis-transactions-list Path to YAML configuration for connecting to multiple HyperLedger Indy ledgers.
## @param acapy.argfile.yml.label Specifies the label for this agent. This label is publicized (self-attested) to other agents as part of forming a connection. Set to release name by default.
## @param acapy.argfile.yml.log-level Specifies a custom logging level as one of: ('debug', 'info', 'warning', 'error', 'critical')
## @param acapy.argfile.yml.monitor-ping Send a webhook when a ping is sent or received.
Expand Down Expand Up @@ -140,19 +140,19 @@ acapy:
- id: bcovrin-test
is_production: true
is_write: true
genesis_url: 'http://test.bcovrin.vonx.io/genesis'
endorser_did: 'Ket75eV5UQvVkW2XBjgDH7'
endorser_alias: 'bcovrin-test-endorser'
genesis_url: "http://test.bcovrin.vonx.io/genesis"
endorser_did: "Ket75eV5UQvVkW2XBjgDH7"
endorser_alias: "bcovrin-test-endorser"
- id: bcovrin-dev
is_production: true
is_write: true
genesis_url: 'http://dev.bcovrin.vonx.io/genesis'
endorser_did: 'VGA8QzjQaL5xkXRHjAgQcj'
endorser_alias: 'bcovrin-dev-endorser'
genesis_url: "http://dev.bcovrin.vonx.io/genesis"
endorser_did: "VGA8QzjQaL5xkXRHjAgQcj"
endorser_alias: "bcovrin-dev-endorser"

## @section Wallet Storage configuration
## Specifies the storage configuration to use for the wallet.
## This is required if you are for using 'postgres_storage' wallet 'storage type.
## Specifies the storage configuration to use for the wallet.
## This is required if you are for using 'postgres_storage' wallet 'storage type.
## For example, '{"url":"localhost:5432", "wallet_scheme":"MultiWalletSingleTable"}'.
## This configuration maps to the indy sdk postgres plugin (PostgresConfig).
##
Expand All @@ -162,8 +162,8 @@ acapy:
## @param acapy.walletStorageConfig.wallet_scheme Wallet scheme.
##
walletStorageConfig:
json: ''
url: ''
json: ""
url: ""
max_connections: 10
wallet_scheme: DatabasePerWallet
## @section Wallet Storage Credentials
Expand Down Expand Up @@ -248,7 +248,7 @@ acapy:
- bcovrin-dev
reservation:
expiry_minutes: 2880
auto_approve: false
auto_approve: false
auto_issuer: false
## @section Acapy tails persistence configuration
persistence:
Expand Down Expand Up @@ -294,12 +294,14 @@ acapy:
## @param acapy.podSecurityContext Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000
## @param acapy.containerSecurityContext Container Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
containerSecurityContext: {}
containerSecurityContext:
{}
# capabilities:
# drop:
# - ALL
Expand Down Expand Up @@ -330,7 +332,7 @@ acapy:
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []

## @section Acapy NetworkPolicy parameters
##
networkPolicy:
Expand All @@ -342,7 +344,8 @@ acapy:
## @param acapy.networkPolicy.ingress.podSelector [object] Pod selector label that is allowed to access the Tenant proxy pods.
ingress:
enabled: false
namespaceSelector: {}
namespaceSelector:
{}
# network.openshift.io/policy-group: ingress
podSelector: {}

Expand Down Expand Up @@ -427,7 +430,7 @@ acapy:
## @section Tenant Proxy configuration
##
tenant_proxy:
## @param tenant_proxy.image.repository
## @param tenant_proxy.image.repository
## @param tenant_proxy.image.pullPolicy
## @param tenant_proxy.image.pullSecrets [array]
## @param tenant_proxy.image.tag Overrides the image tag which defaults to the chart appVersion.
Expand All @@ -436,7 +439,7 @@ tenant_proxy:
repository: ghcr.io/bcgov/traction-tenant-proxy
pullPolicy: IfNotPresent
pullSecrets: []
tag: ''
tag: ""
## ServiceAccount configuration
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
## @param tenant_proxy.serviceAccount.create Specifies whether a ServiceAccount should be created
Expand Down Expand Up @@ -475,12 +478,14 @@ tenant_proxy:
## @param tenant_proxy.podSecurityContext Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000
## @param tenant_proxy.containerSecurityContext Container Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
containerSecurityContext: {}
containerSecurityContext:
{}
# capabilities:
# drop:
# - ALL
Expand Down Expand Up @@ -554,7 +559,8 @@ tenant_proxy:
## @param tenant_proxy.networkPolicy.ingress.podSelector [object] Pod selector label that is allowed to access the Tenant proxy pods.
ingress:
enabled: true
namespaceSelector: {}
namespaceSelector:
{}
# network.openshift.io/policy-group: ingress
podSelector: {}

Expand Down Expand Up @@ -586,7 +592,7 @@ ui:
## @param ui.image.pullSecrets [array]
pullSecrets: []
## @param ui.image.tag Overrides the image tag which defaults to the chart appVersion.
tag: ''
tag: ""

## Frontend Configuration
##
Expand Down Expand Up @@ -634,6 +640,9 @@ ui:
session:
timeoutSeconds: 600
countdownSeconds: 30
## @param ui.oidc.reservationForm
reservationForm: >-
{}
## SMTP Configuration
smtp:
Expand All @@ -645,15 +654,16 @@ ui:
senderAddress: ""
## @param ui.smtp.innkeeperInbox innkeeper notification inbox
innkeeperInbox: ""

## ServiceAccount configuration
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
## @param ui.serviceAccount.create Specifies whether a ServiceAccount should be created
create: false
## @param ui.serviceAccount.annotations Annotations for service account. Evaluated as a template. Only used if `create` is `true`.
annotations: {}
annotations:
{}
# network.openshift.io/policy-group: ingress
## @param ui.serviceAccount.automountServiceAccountToken Automount service account token for the server service account
automountServiceAccountToken: true
Expand All @@ -665,12 +675,14 @@ ui:
## @param ui.podSecurityContext Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000
## @param ui.containerSecurityContext Container Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
containerSecurityContext: {}
containerSecurityContext:
{}
# capabilities:
# drop:
# - ALL
Expand Down
39 changes: 39 additions & 0 deletions deploy/traction/values-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,45 @@ ui:
active: true
authority: https://dev.loginproxy.gov.bc.ca/auth/realms/digitaltrust-nrm
jwksUri: https://dev.loginproxy.gov.bc.ca/auth/realms/digitaltrust-nrm/protocol/openid-connect/certs
reservationForm: >-
{
"formDataSchema": {
"type": "object",
"properties": {
"fullName": {
"type": "string"
},
"phoneNumber": {
"type": "string"
},
"tenantReason": {
"type": "string"
}
},
"required": []
},
"formUISchema": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/phoneNumber",
"label": "Phone / Mobile"
},
{
"type": "Control",
"scope": "#/properties/fullName"
},
{
"type": "Control",
"scope": "#/properties/tenantReason",
"options": {
"multi": true
}
}
]
}
}
ariesDetails:
ledgerDescription: "bcovrin-test"
smtp:
Expand Down
23 changes: 16 additions & 7 deletions scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ services:
- POSTGRESQL_USER=${POSTGRESQL_USER}
- POSTGRESQL_PASSWORD=${POSTGRESQL_PASSWORD}
- TRACTION_MULTITENANCY_CONFIGURATION_WALLET_TYPE=${TRACTION_MULTITENANCY_CONFIGURATION_WALLET_TYPE}
- TRACTION_MULTITENANCY_CONFIGURATION_WALLET_NAME=${TRACTION_MULTITENANCY_CONFIGURATION_WALLET_NAME}
- ACAPY_LOG_LEVEL=${ACAPY_LOG_LEVEL}
- TRACTION_MULTITENANCY_CONFIGURATION_WALLET_NAME=${TRACTION_MULTITENANCY_CONFIGURATION_WALLET_NAME}
- ACAPY_LOG_LEVEL=${ACAPY_LOG_LEVEL}
- ACAPY_AUTO_PROVISION=${ACAPY_AUTO_PROVISION}
- ACAPY_WALLET_TYPE=${ACAPY_WALLET_TYPE}
- ACAPY_WALLET_STORAGE_TYPE=${ACAPY_WALLET_STORAGE_TYPE}
Expand Down Expand Up @@ -76,7 +76,7 @@ services:
- ACAPY_MONITOR_REVOCATION_NOTIFICATION=${ACAPY_MONITOR_REVOCATION_NOTIFICATION}
- ACAPY_ENDORSER_ROLE=${ACAPY_ENDORSER_ROLE}
- ACAPY_AUTO_REQUEST_ENDORSEMENT=${ACAPY_AUTO_REQUEST_ENDORSEMENT}
- ACAPY_AUTO_WRITE_TRANSACTIONS=${ACAPY_AUTO_WRITE_TRANSACTIONS}
- ACAPY_AUTO_WRITE_TRANSACTIONS=${ACAPY_AUTO_WRITE_TRANSACTIONS}
- ACAPY_AUTO_PROMOTE_AUTHOR_DID=${ACAPY_AUTO_PROMOTE_AUTHOR_DID}
- ACAPY_CREATE_REVOCATION_TRANSACTIONS=${ACAPY_CREATE_REVOCATION_TRANSACTIONS}
- ACAPY_PLUGIN_CONFIG=${ACAPY_PLUGIN_CONFIG}
Expand Down Expand Up @@ -109,7 +109,7 @@ services:
retries: 5
extra_hosts:
- host.docker.internal:host-gateway

tenant-ui:
pull_policy: missing
build:
Expand All @@ -136,6 +136,11 @@ services:
- SERVER_SMTP_PORT=1025
ports:
- ${TENANT_UI_PORT}:8080
###############################################
# Comment the following out if you want to use the default reservation form
volumes:
- ../services/tenant-ui/config/forms:/usr/src/app/frontend/dist/forms
###############################################
extra_hosts:
- host.docker.internal:host-gateway

Expand All @@ -157,6 +162,9 @@ services:
extra_hosts:
- host.docker.internal:host-gateway

###############################################
# XXX: The following is breaking the build
###############################################
# tenant-lob:
# build:
# context: ../services/tenant-lob
Expand All @@ -176,6 +184,7 @@ services:
# - ${LOB_PORT}:8088
# extra_hosts:
# - host.docker.internal:host-gateway
###############################################

endorser-api:
pull_policy: missing
Expand Down Expand Up @@ -208,7 +217,7 @@ services:
- host.docker.internal:host-gateway

endorser-agent:
image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.10.3
image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.10.2
depends_on:
endorser-db:
condition: service_healthy
Expand Down Expand Up @@ -298,7 +307,7 @@ services:
- host.docker.internal:host-gateway

endorser-agent-1:
image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.10.3
image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.10.2
depends_on:
endorser-db-1:
condition: service_healthy
Expand Down Expand Up @@ -356,7 +365,7 @@ services:
retries: 5
extra_hosts:
- host.docker.internal:host-gateway

maildev:
image: maildev/maildev
ports:
Expand Down
Loading

0 comments on commit 806b38c

Please sign in to comment.