Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements mongodb backend for kyc-case #178

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ SCRAPEIT_API_KEY=""
CLOUDANT_USERNAME=""
CLOUDANT_API_KEY=""
CLOUDANT_URL=""

MONGODB_PASSWORD=""
MONGODB_USERNAME=""
MONGODB_CONNECT_STRING=""
MONGODB_DATABASE_NAME=""
MONGODB_CERTIFICATE_FILE=""
MONGODB_CERTIFICATE_BASE64=""
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi9/nodejs-18:1-70.1695740477 AS builder
FROM registry.access.redhat.com/ubi9/nodejs-18:1-112.1719561319 AS builder

WORKDIR /opt/app-root/src

Expand All @@ -9,7 +9,7 @@ RUN mkdir -p /opt/app-root/src/node_modules && \
npm ci && \
npm run build

FROM registry.access.redhat.com/ubi9/nodejs-18:1-70.1695740477
FROM registry.access.redhat.com/ubi9/nodejs-18:1-112.1719561319

## Uncomment the below lines to update image security content if any
# USER root
Expand All @@ -18,7 +18,7 @@ FROM registry.access.redhat.com/ubi9/nodejs-18:1-70.1695740477
LABEL name="ibm/template-node-typescript" \
vendor="IBM" \
version="1" \
release="67" \
release="112" \
summary="This is an example of a container image." \
description="This container image will deploy a Typescript Node App"

Expand Down
28 changes: 28 additions & 0 deletions chart/base/templates/watsonx-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: watsonx-config
labels:
app.kubernetes.io/name: {{ include "starter-kit.name" . }}
helm.sh/chart: {{ include "starter-kit.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ .Release.Name }}
data:
CRA_BASE_PATH: https://cpd-cp4ba.cp4ba-cra-c6c44da74def18a795b07cc32856e138-0000.us-south.containers.appdomain.cloud/ads/runtime/api/v1/deploymentSpaces/embedded/decisions/ekyc001%2FcustomerRiskAssessmentDecisionService%2Fekyc-08%2FcustomerRiskAssessmentDecisionService-ekyc-08.jar/operations
DATA_EXTRACTION_COLLECTION_ID: d2042924-7671-d0f5-0000-018a41a20ec1
DATA_EXTRACTION_PROJECT_ID: 05ba9d92-734e-4b34-a672-f727a2c26440
DECODING_METHOD: greedy
DISCOVERY_PROJECT_ID: 303aab25-cb4f-4b28-b8d2-30e23e39a37f
DISCOVERY_URL: https://api.us-south.discovery.watson.cloud.ibm.com/instances/0992769e-726a-4ab0-a9d9-4352e204cc87
DISCOVERY_VERSION: "2020-08-30"
FIND_PASSAGE_CONCURRENCY: "20"
IAM_URL: https://iam.cloud.ibm.com/identity/token
KYC_COLLECTION_ID: f97f97bd-7fa1-c9ac-0000-018acacf5fdf
KYC_PROJECT_ID: 4fd3f39a-3ed9-4c66-a4c4-7951afc0aee
KYC_SUMMARY_URL: https://kyc-summary-api.177i1pavvk8r.us-south.codeengine.appdomain.cloud/summarise
MAX_NEW_TOKENS: "20"
MODEL_ID: google/flan-t5-xxl
RELEVANT_PASSAGES_URL: https://similarity-check.18z7sftfb1j5.us-south.codeengine.appdomain.cloud/api/find_relevant_passage
REPETITION_PENALTY: "1"
WML_PROJECT_ID: 05ba9d92-734e-4b34-a672-f727a2c26440
WML_URL: https://us-south.ml.cloud.ibm.com/ml/v1-beta/generation/text?version=2023-05-28
25 changes: 25 additions & 0 deletions chart/base/templates/watsonx-credentials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.secret.enabled -}}
apiVersion: v1
kind: Secret
metadata:
name: watsonx-credentials
labels:
app.kubernetes.io/name: {{ include "starter-kit.name" . }}
helm.sh/chart: {{ include "starter-kit.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ .Release.Name }}
stringData:
CLOUDANT_API_KEY: {{ .Values.cloudant.apiKey | quote }}
CLOUDANT_URL: {{ .Values.cloudant.url | quote }}
CLOUDANT_USERNAME: {{ .Values.cloudant.username | quote }}
CRA_API_KEY: {{ .Values.cra.apiKey | quote }}
CRA_USERNAME: {{ .Values.cra.username | quote }}
DISCOVERY_API_KEY: {{ .Values.discovery.apiKey | quote }}
SCRAPEIT_API_KEY: {{ .Values.scrapeit.apiKey | quote }}
WML_API_KEY: {{ .Values.wml.apiKey | quote }}
MONGODB_PASSWORD: {{ .Values.mongodb.password | quote }}
MONGODB_USERNAME: {{ .Values.mongodb.username | quote }}
MONGODB_CONNECT_STRING: {{ .Values.mongodb.connectString | quote }}
MONGODB_DATABASE_NAME: {{ .Values.mongodb.databaseName | quote }}
MONGODB_CERTIFICATE_FILE: {{ .Values.mongodb.certificateFile | quote }}
{{- end }}
Loading
Loading