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

Addition of Financial portal and settlement services #233

Merged
merged 31 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
369ec81
add finance portal ui chart
Nov 26, 2019
d5a71a3
upgrade portal charts
Nov 28, 2019
afaedec
add db host config to secrets
Nov 29, 2019
c6e4b44
Added charts for settlement
Dec 3, 2019
dc0e97c
add finance portal proxy and quoting service quotes
Dec 3, 2019
7df5f44
Added command for updating `settlement` chart.
Dec 4, 2019
6441afe
Added `settlement` to requirements.yaml
Dec 4, 2019
212dcd2
Fixed issues with `settlement` chart.
Dec 4, 2019
92300e7
add finance-portal charts
Dec 5, 2019
410cbfe
add portal stuff
Dec 5, 2019
a973b97
Used more universal shebang for update script
partiallyordered Dec 5, 2019
a8b82a6
Delete this with extreme prejudice (#231)
Dec 5, 2019
ac7ece8
change settlement ingress ports
Dec 6, 2019
0d83d78
Merge branch 'master' of github.com:mojaloop/helm into mowdev-3414
Dec 6, 2019
335702b
fix finance portal images
Dec 6, 2019
93c7aa1
update services version to current version
Dec 10, 2019
0a7f277
fix settlement endpoints
Dec 12, 2019
247c34e
Merge branch 'master' into finance-portal-service
Dec 17, 2019
d94908e
Merge branch 'master' into finance-portal-service
mdebarros Dec 18, 2019
2dc543b
Update image repository of backend service
Dec 19, 2019
b7e1063
update portal images so the licenses get recognized
Dec 19, 2019
a2a037a
fix centralledger endpoint
Dec 27, 2019
f6e3e59
update latest portal versions and fix sql_mode
Jan 3, 2020
c8860be
fix labels and ingress
Jan 7, 2020
a36bc6c
add portal settlement to lint scripts
Jan 7, 2020
293aa2e
Merge branch 'master' into finance-portal-service
mdebarros Jan 7, 2020
0923be2
change finance-portal-settlement-management name
Jan 7, 2020
464c821
Updated selectors for portal and portal settlement management
partiallyordered Jan 8, 2020
c7affc5
Merge branch 'master' into finance-portal-service
Jan 8, 2020
2da741a
Removed duplicate appVersion
partiallyordered Jan 8, 2020
b96d147
Merge branch 'finance-portal-service' of github.com:mojaloop/helm int…
partiallyordered Jan 8, 2020
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
1 change: 0 additions & 1 deletion central/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,6 @@ centralledger:
wsrep_cluster_name=galera
wsrep_sst_method=xtrabackup-v2
pxc_strict_mode=DISABLED
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
## When set to true will create sidecar for `prom/mysqld-exporter`
## metrics exporting
metricsExporter:
Expand Down
3 changes: 2 additions & 1 deletion finance-portal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: v1
appVersion: "1.0"
description: Finance portal backend service
description: Finance portal service
name: finance-portal
version: 8.6.0
appVersion: "8.6.0"
33 changes: 33 additions & 0 deletions finance-portal/templates/backend-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- if .Values.backend.ingress.enabled -}}
{{- $serviceName := include "finance-portal.fullname" . -}}
{{- $backendPort := .Values.backend.service.port -}}
{{- $backendPath := .Values.backend.ingress.externalPath -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "finance-portal.fullname" . }}-backend
labels:
app: {{ template "finance-portal.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- range $key, $value := .Values.backend.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range $host := .Values.backend.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: {{ $backendPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $backendPort }}
{{- end -}}
{{- if .Values.backend.ingress.tls }}
tls:
{{ toYaml .Values.backend.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
9 changes: 5 additions & 4 deletions finance-portal/templates/configmap-auth-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ kind: ConfigMap
metadata:
name: {{ .Values.config.is_populate.name | quote }}
labels:
app: {{ template "finance-portal.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "finance-portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
HTTP_HOST: {{ .Values.config.oauthServer | quote }}
HTTP_PORT: {{ .Values.config.oauthPort | quote }}
Expand Down
9 changes: 5 additions & 4 deletions finance-portal/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ kind: ConfigMap
metadata:
name: {{ template "finance-portal.fullname" . }}
labels:
app: {{ template "finance-portal.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "finance-portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
SETTLEMENTS_ENDPOINT: {{ (printf "http://%s-%s" .Release.Name .Values.config.settlementsEndpoint) | quote }}
CENTRAL_LEDGER_ENDPOINT: {{ (printf "http://%s-%s" .Release.Name .Values.config.centralLedgerEndpoint) | quote }}
Expand Down
11 changes: 6 additions & 5 deletions finance-portal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ kind: Deployment
metadata:
name: {{ template "finance-portal.fullname" . }}
labels:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about labels apply here.

app: {{ template "finance-portal.name" . }}
chart: {{ template "finance-portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "finance-portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}001
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
spec:
selector:
matchLabels:
Expand Down Expand Up @@ -57,7 +58,7 @@ spec:
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
ports:
- name: frontend
containerPort: 80
containerPort: {{ .Values.frontend.image.port }}
protocol: TCP
livenessProbe:
httpGet:
Expand Down
34 changes: 34 additions & 0 deletions finance-portal/templates/frontend-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- if .Values.frontend.ingress.enabled -}}
{{- $serviceName := include "finance-portal.fullname" . -}}
{{- $frontendPort := .Values.frontend.service.port -}}
{{- $frontendPath := .Values.frontend.ingress.externalPath -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "finance-portal.fullname" . }}-frontend
labels:
app: {{ template "finance-portal.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- range $key, $value := .Values.frontend.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range $host := .Values.frontend.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: {{ $frontendPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $frontendPort }}
{{- end -}}
{{- if .Values.frontend.ingress.tls }}
tls:
{{ toYaml .Values.frontend.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}

20 changes: 0 additions & 20 deletions finance-portal/templates/ingress.yaml

This file was deleted.

9 changes: 5 additions & 4 deletions finance-portal/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ kind: Secret
metadata:
name: {{ template "finance-portal.fullname" . }}
labels:
app: {{ template "finance-portal.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "finance-portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
type: Opaque
data:
DB_USER: {{ .Values.db.user | b64enc }}
Expand Down
9 changes: 5 additions & 4 deletions finance-portal/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ kind: Service
metadata:
name: {{ template "finance-portal.fullname" . }}
labels:
app: {{ template "finance-portal.name" . }}
chart: {{ template "finance-portal.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "finance-portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
32 changes: 18 additions & 14 deletions finance-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,28 @@ config:
report2: "something"

frontend:
service:
port: 80
image:
repository: mojaloop/finance-portal-ui
tag: v0.0.3
pullPolicy: Always
port: 80
ingress:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config is not used in the ingress definition. Please advise?

enabled: true
externalPath: /
hosts:
api: finance-portal.local
annotations:
nginx.ingress.kubernetes.io/rewrite-target: '/'
tls:

externalPath: /(.*)
hosts:
api: finance-portal-frontend.local
annotations: {}
# kubernetes.io/ingress.class: nginx
# nginx.ingress.kubernetes.io/rewrite-target: /$1
backend:
service:
port: 3000
image:
repository: mojaloop/finance-portal-backend-service
tag: v0.0.4
tag: v0.0.5
pullPolicy: Always
port: 3000
init:
Expand All @@ -75,9 +79,9 @@ backend:
secretsMountPoint: '/secrets'
ingress:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config is not used in the ingress definition. Please advise?

enabled: true
externalPath: /admin-portal-backend
hosts:
api: finance-portal.local
annotations:
nginx.ingress.kubernetes.io/rewrite-target: '/'
tls:
externalPath: /admin-portal-backend/(.*)
hosts:
api: finance-portal-backend.local
annotations: {}
# kubernetes.io/ingress.class: nginx
# nginx.ingress.kubernetes.io/rewrite-target: /$1
4 changes: 4 additions & 0 deletions lint-charts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ echo "Linting finance-portal..."
helm lint ./finance-portal
checkCommandResult

echo "Linting portal-settlement..."
helm lint ./portal-settlement
checkCommandResult

echo "Linting transaction-requests-service..."
helm lint ./transaction-requests-service
checkCommandResult
Expand Down
8 changes: 3 additions & 5 deletions mojaloop/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ dependencies:
version: 8.6.0
repository: "file://../finance-portal"
condtion: finance-portal.enabled
- name: nginx-ingress
repository: https://kubernetes-charts.storage.googleapis.com
version: ~1.24.7
- name: settlement
- name: portal-settlement
version: 8.6.0
repository: "file://../settlement"
repository: "file://../portal-settlement"
condition: portal-settlement.enabled
8 changes: 1 addition & 7 deletions mojaloop/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,6 @@ central:
wsrep_cluster_name=galera
wsrep_sst_method=xtrabackup-v2
pxc_strict_mode=DISABLED
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
## When set to true will create sidecar for `prom/mysqld-exporter`
## metrics exporting
metricsExporter:
Expand Down Expand Up @@ -3156,7 +3155,6 @@ account-lookup-service:
max_connections=999
max_user_connections=994
thread_cache_size=999
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
## When set to true will create sidecar for `prom/mysqld-exporter`
## metrics exporting
metricsExporter:
Expand Down Expand Up @@ -3485,7 +3483,7 @@ simulator:

affinity: {}

settlement:
portal-settlement:
enabled: true
mdebarros marked this conversation as resolved.
Show resolved Hide resolved

mojaloop-bulk:
Expand Down Expand Up @@ -4483,7 +4481,3 @@ mojaloop-bulk:
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
additionalLabels: {}

nginx-ingress:
# This ensures we have a completely deterministic name for the ingress controller, such that we
# can predictably port-forward it with the same command, regardless of the release name
fullnameOverride: nginx-ingress
4 changes: 4 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ echo "Packaging finance-portal..."
helm package -u -d ./repo ./finance-portal
checkCommandResult

echo "Packaging portal-settlement..."
helm package -u -d ./repo ./portal-settlement
checkCommandResult

echo "Packaging transaction-requests-service..."
helm package -u -d ./repo ./transaction-requests-service
checkCommandResult
Expand Down
6 changes: 6 additions & 0 deletions portal-settlement/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
appVersion: "1.0"
description: Portal Settlement
name: portal-settlement
version: 8.6.0
appVersion: "8.6.0"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "settlement.name" -}}
{{- define "portal-settlement.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "settlement.fullname" -}}
{{- define "portal-settlement.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -27,6 +27,6 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "settlement.chart" -}}
{{- define "portal-settlement.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "settlement.fullname" . }}
name: {{ template "portal-settlement.fullname" . }}
labels:
app: {{ template "settlement.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "portal-settlement.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
ADMIN_ENDPOINT: {{ (printf "%s%s-%s:%s" "http://" .Release.Name .Values.settlementManagement.config.CENTRAL_LEDGER_SERVICE_NAME .Values.settlementManagement.config.CENTRAL_LEDGER_SERVICE_ADMIN_PORT) | quote }}
MIN_WINDOW_AGE_MS: {{ (printf "%s" .Values.settlementManagement.config.MIN_WINDOW_AGE_MS) | quote }}
Expand Down
Loading