Skip to content

Commit

Permalink
feat: added keycloak support (#88)
Browse files Browse the repository at this point in the history
* feat: added keycloak support

* chore: removed temp files

* fix: empty string

* chore: ingress disabled by default
  • Loading branch information
vijayg10 authored Feb 5, 2024
1 parent 4310af7 commit 9995420
Show file tree
Hide file tree
Showing 28 changed files with 150 additions and 151 deletions.
2 changes: 1 addition & 1 deletion mojaloop/account-lookup-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
- name: account-lookup-service
version: 13.0.0
repository: "file://../chart-service"
Expand Down
2 changes: 1 addition & 1 deletion mojaloop/admin-api-svc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
13 changes: 3 additions & 10 deletions mojaloop/bof/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,20 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 4.0.0
version: 5.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "4.0.0"
appVersion: "5.0.0"
dependencies:
- name: common
repository: "file://../common"
tags:
- mojaloop
- common
version: 2.1.0
- name: role-assignment-service
condition: role-assignment-service.enabled
repository: "file://../role-assignment-service"
tags:
- mojaloop
- role-assignment-service
version: 2.0.0
version: 3.0.0
- name: security-role-perm-operator-svc
condition: security-role-perm-operator-svc.enabled
repository: "file://../security-role-perm-operator-svc"
Expand Down
30 changes: 0 additions & 30 deletions mojaloop/bof/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,11 @@ global:
keto:
readURL: "http://keto-read:80"
writeURL: "http://keto-write:80"
wso2:
identityServer:
host: "wso2-identity-server.local"
port: 9443
userListURL: "http://wso2-identity-server.local:9443/scim2/Users"
user: 'admin'
secret:
name: wso2-is-admin-creds
key: password

rolePermOperator:
mojaloopRole: {}
mojaloopPermissionExclusion: {}
apiSvc: {}
## Currently setting the following to dummy values and we need to remove this dependency
adminApiSvc:
host: "dummy"
port: 80

role-assignment-service:
enabled: true
ingress:
enabled: true
hostname: api-bof.local
path: /proxy/iam(/|$)(.*)
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
configFiles:
default.json: {
"ROLES_LIST": [
"USER_ROLE_abc7a2fd-4acf-4547-a194-1673f63eb37c",
"ADMIN_ROLE_6c1ec084-86d4-4915-ba81-6c59b87a65a6"
]
}


security-role-perm-operator-svc:
enabled: true
2 changes: 1 addition & 1 deletion mojaloop/chart-admin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
2 changes: 1 addition & 1 deletion mojaloop/chart-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
4 changes: 2 additions & 2 deletions mojaloop/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ annotations:
category: Infrastructure
apiVersion: v2
# Please make sure that version and appVersion are always the same.
appVersion: 2.1.0
appVersion: 3.0.0
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
home: https://github.com/mojaloop/charts/tree/master/mojaloop/common
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
Expand All @@ -20,4 +20,4 @@ sources:
- https://github.com/mojaloop/charts
- http://www.bitnami.com/
type: library
version: 2.1.0
version: 3.0.0
59 changes: 59 additions & 0 deletions mojaloop/common/templates/backends/_keycloak.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{{/*
Get fully qualified keto name.
*/}}
{{- define "common.backends.keycloak.fullname" -}}
{{- if .Values.keycloak -}}
{{- if .Values.keycloak.fullnameOverride -}}
{{- .Values.keycloak.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default "wso2" .Values.keycloak.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- else -}}
{{- $name := default "wso2" .Values.keycloak.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}

{{/*
Get keycloak url.
*/}}
{{- define "common.backends.keycloak.url" -}}
{{- default "http://keycloak:8080" (default .Values.global.keycloak.url .Values.keycloak.url) -}}
{{- end -}}

{{/*
Get keycloak username.
*/}}
{{- define "common.backends.keycloak.user" -}}
{{- default "admin" (default .Values.global.keycloak.user .Values.keycloak.user) -}}
{{- end -}}

{{/*
Get keycloak password.
*/}}
{{- define "common.backends.keycloak.password" -}}
{{- default "admin" (default .Values.global.keycloak.password .Values.keycloak.password) -}}
{{- end -}}

{{/*
Get keycloak realm.
*/}}
{{- define "common.backends.keycloak.realm" -}}
{{- default "master" (default .Values.global.keycloak.realm .Values.keycloak.realm) -}}
{{- end -}}

{{/*
Get keycloak secret.name
*/}}
{{- define "common.backends.keycloak.secret.name" -}}
{{- default "" (default .Values.global.keycloak.secret.name .Values.keycloak.secret.name) -}}
{{- end -}}

{{/*
Get keycloak secret.key
*/}}
{{- define "common.backends.keycloak.secret.key" -}}
{{- default "" (default .Values.global.keycloak.secret.key .Values.keycloak.secret.key) -}}
{{- end -}}

67 changes: 0 additions & 67 deletions mojaloop/common/templates/backends/_wso2.tpl

This file was deleted.

13 changes: 10 additions & 3 deletions mojaloop/finance-portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 4.0.0
version: 4.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "4.0.0"
appVersion: "4.1.0"
dependencies:
- name: common
repository: "file://../common"
tags:
- mojaloop
- common
version: 2.1.0
version: 3.0.0
- name: role-assignment-service
condition: role-assignment-service.enabled
repository: "file://../role-assignment-service"
tags:
- mojaloop
- role-assignment-service
version: 3.0.0
- name: reporting-hub-bop-shell
condition: reporting-hub-bop-shell.enabled
repository: "file://../reporting-hub-bop-shell"
Expand Down
38 changes: 32 additions & 6 deletions mojaloop/finance-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ global:
host: test1-kafka-headless
port: 9092
topic: topic-event
rolePermOperator:
apiSvc: {}
keycloak:
url: 'http://keycloak:8080'
user: 'admin'
password: ''
# secret:
# name: 'keycloak-secret'
# key: 'password'
realm: 'master'

## TODO: Disabling the tests by default for now. Need to figure out how to configure the tests.
## RBAC Tests
Expand Down Expand Up @@ -177,10 +187,26 @@ reportTests:
initContainers: []

## Backend API services
role-assignment-service:
enabled: true
ingress:
enabled: false
hostname: api-bof.local
path: /proxy/iam(/|$)(.*)
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
configFiles:
default.json: {
"ROLES_LIST": [
"USER_ROLE_abc7a2fd-4acf-4547-a194-1673f63eb37c",
"ADMIN_ROLE_6c1ec084-86d4-4915-ba81-6c59b87a65a6"
]
}

reporting-hub-bop-api-svc:
enabled: true
ingress:
enabled: true
enabled: false
hostname: api-bof.local
path: /proxy/transfers(/|$)(.*)
annotations:
Expand All @@ -189,7 +215,7 @@ reporting-hub-bop-api-svc:
reporting-legacy-api:
enabled: true
ingress:
enabled: true
enabled: false
hostname: api-bof.local
path: /proxy/reports(/|$)(.*)
annotations:
Expand Down Expand Up @@ -220,7 +246,7 @@ reporting-hub-bop-shell:
reporting-hub-bop-role-ui:
enabled: true
ingress:
enabled: true
enabled: false
pathType: ImplementationSpecific
hostname: reporting-hub-bop-role-ui.local
config:
Expand All @@ -230,7 +256,7 @@ reporting-hub-bop-role-ui:
reporting-hub-bop-trx-ui:
enabled: true
ingress:
enabled: true
enabled: false
pathType: ImplementationSpecific
hostname: reporting-hub-bop-trx-ui.local
config:
Expand All @@ -240,7 +266,7 @@ reporting-hub-bop-trx-ui:
reporting-hub-bop-positions-ui:
enabled: true
ingress:
enabled: true
enabled: false
pathType: ImplementationSpecific
hostname: reporting-hub-bop-positions-ui.local
config:
Expand All @@ -250,7 +276,7 @@ reporting-hub-bop-positions-ui:
reporting-hub-bop-settlements-ui:
enabled: true
ingress:
enabled: true
enabled: false
pathType: ImplementationSpecific
hostname: reporting-hub-bop-settlements-ui.local
config:
Expand Down
2 changes: 1 addition & 1 deletion mojaloop/fspiop-transfer-api-svc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
2 changes: 1 addition & 1 deletion mojaloop/mojaloop/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
tags:
- mojaloop
- common
version: 2.1.0
version: 3.0.0
- name: fspiop-transfer-api-svc
repository: "file://../fspiop-transfer-api-svc"
tags:
Expand Down
2 changes: 1 addition & 1 deletion mojaloop/reporting-events-processor-svc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
2 changes: 1 addition & 1 deletion mojaloop/reporting-hub-bop-api-svc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
2 changes: 1 addition & 1 deletion mojaloop/reporting-hub-bop-experience-api-svc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies:
repository: "file://../common"
tags:
- moja-common
version: 2.1.0
version: 3.0.0
Loading

0 comments on commit 9995420

Please sign in to comment.