Skip to content

Commit

Permalink
feat: config override mojaloop/project#3936
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev committed Jun 5, 2024
1 parent d6480d9 commit 88aa64e
Show file tree
Hide file tree
Showing 20 changed files with 394 additions and 66 deletions.
20 changes: 20 additions & 0 deletions account-lookup-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ account-lookup-service:
nameOverride: ""
fullnameOverride: ""

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka
#
# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Pod scheduling preferences.
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
Expand Down Expand Up @@ -339,6 +349,16 @@ account-lookup-service-admin:
nameOverride: ""
fullnameOverride: ""

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka
#
# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Pod scheduling preferences.
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
Expand Down
6 changes: 3 additions & 3 deletions bulk-api-adapter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: bulk-api-adapter Helm chart for Kubernetes
name: bulk-api-adapter
version: 14.5.0
version: 14.6.0
appVersion: v17.0.0
home: http://mojaloop.io
icon: http://mojaloop.io/images/logo.png
Expand All @@ -16,11 +16,11 @@ maintainers:
email: [email protected]
dependencies:
- name: bulk-api-adapter-service
version: ">= 14.3.0"
version: ">= 14.4.0"
repository: "file://./chart-service"
condition: bulk-api-adapter-service.enabled
- name: bulk-api-adapter-handler-notification
version: ">= 14.3.0"
version: ">= 14.4.0"
repository: "file://./chart-handler-notification"
condition: bulk-api-adapter-handler-notification.enabled
- name: common
Expand Down
2 changes: 1 addition & 1 deletion bulk-api-adapter/chart-handler-notification/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: bulk-api-adapter Handler for Notifications component Helm chart for Kubernetes
name: bulk-api-adapter-handler-notification
version: 14.3.0
version: 14.4.0
appVersion: v17.0.0
home: http://mojaloop.io
icon: http://mojaloop.io/images/logo.png
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.configOverride }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "bulk-api-adapter-handler-notification.fullname" . }}-config-override
labels:
app.kubernetes.io/name: {{ include "bulk-api-adapter-handler-notification.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.Version }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
{{- range $fileName, $fileContents := .Values.configOverride }}
{{ $fileName }}: | {{ $fileContents | toPrettyJson | nindent 4 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ spec:
volumeMounts:
- name: {{ template "bulk-api-adapter-handler-notification.fullname" . }}-config-volume
mountPath: /opt/app/config
{{- range $fileName, $fileContents := .Values.configOverride }}
- name: config-override-volume
mountPath: /opt/app/{{ $fileName }}
subPath: {{ $fileName }}
{{- end }}
{{- if .Values.config.endpointSecurity.jwsSign }}
- name: jws-signing-key
mountPath: /opt/app/secrets
Expand All @@ -126,6 +131,11 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
{{- if .Values.configOverride }}
- name: config-override-volume
configMap:
name: {{ template "bulk-api-adapter-handler-notification.fullname" . }}-config-override
{{- end }}
- name: {{ template "bulk-api-adapter-handler-notification.fullname" . }}-config-volume
configMap:
name: {{ template "bulk-api-adapter-handler-notification.fullname" . }}-config
Expand Down
2 changes: 1 addition & 1 deletion bulk-api-adapter/chart-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: bulk-api-adapter API component Helm chart for Kubernetes
name: bulk-api-adapter-service
version: 14.3.0
version: 14.4.0
appVersion: v17.0.0
home: http://mojaloop.io
icon: http://mojaloop.io/images/logo.png
Expand Down
16 changes: 16 additions & 0 deletions bulk-api-adapter/chart-service/templates/config-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.configOverride }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "bulk-api-adapter-service.fullname" . }}-config-override
labels:
app.kubernetes.io/name: {{ include "bulk-api-adapter-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.Version }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
{{- range $fileName, $fileContents := .Values.configOverride }}
{{ $fileName }}: | {{ $fileContents | toPrettyJson | nindent 4 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions bulk-api-adapter/chart-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ spec:
volumeMounts:
- name: {{ template "bulk-api-adapter-service.fullname" . }}-config-volume
mountPath: /opt/app/config
{{- range $fileName, $fileContents := .Values.configOverride }}
- name: config-override-volume
mountPath: /opt/app/{{ $fileName }}
subPath: {{ $fileName }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
Expand All @@ -119,6 +124,11 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
{{- if .Values.configOverride }}
- name: config-override-volume
configMap:
name: {{ template "account-lookup-service-admin.fullname" . }}-config-override
{{- end }}
- name: {{ template "bulk-api-adapter-service.fullname" . }}-config-volume
configMap:
name: {{ template "bulk-api-adapter-service.fullname" . }}-config
Expand Down
80 changes: 80 additions & 0 deletions centralledger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ centralledger-service:
replicaCount: 1
command: '["node", "src/api/index.js"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -430,6 +440,16 @@ centralledger-handler-transfer-prepare:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--prepare"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -829,6 +849,16 @@ centralledger-handler-transfer-position:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--position"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -1222,6 +1252,16 @@ centralledger-handler-transfer-position-batch:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--positionbatch"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -1621,6 +1661,16 @@ centralledger-handler-transfer-get:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--get"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -2014,6 +2064,16 @@ centralledger-handler-transfer-fulfil:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--fulfil"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -2407,6 +2467,16 @@ centralledger-handler-timeout:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--timeout"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down Expand Up @@ -2805,6 +2875,16 @@ centralledger-handler-admin-transfer:
replicaCount: 1
command: '["node", "src/handlers/index.js", "handler", "--admin"]'

# Mount configuration files in the app folder for overriding defaults
# configOverride:
# # event sdk settings override
# .EVENT_SDKrc:
# AUDIT: kafka

# # logging settings override
# .CSLrc:
# LOG_FILTER: ""

## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down
10 changes: 5 additions & 5 deletions centralsettlement/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Central-Settlement Helm chart for Kubernetes
name: centralsettlement
version: 14.6.0
version: 14.7.0
appVersion: v16.0.0
home: http://mojaloop.io
icon: http://mojaloop.io/images/logo.png
Expand All @@ -16,22 +16,22 @@ maintainers:
email: [email protected]
dependencies:
- name: centralsettlement-service
version: ">= 15.1.0"
version: ">= 15.2.0"
repository: "file://./chart-service"
alias: centralsettlement-service
condition: centralsettlement-service.enabled
- name: centralsettlement-service
version: ">= 15.1.0"
version: ">= 15.2.0"
repository: "file://./chart-service"
alias: centralsettlement-handler-deferredsettlement
condition: centralsettlement-handler-deferredsettlement.enabled
- name: centralsettlement-service
version: ">= 15.1.0"
version: ">= 15.2.0"
repository: "file://./chart-service"
alias: centralsettlement-handler-grosssettlement
condition: centralsettlement-handler-grosssettlement.enabled
- name: centralsettlement-service
version: ">= 15.1.0"
version: ">= 15.2.0"
repository: "file://./chart-service"
alias: centralsettlement-handler-rules
condition: centralsettlement-handler-rules.enabled
Expand Down
2 changes: 1 addition & 1 deletion centralsettlement/chart-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Central-Settlement helm chart for API services and handlers
name: centralsettlement-service
version: 15.1.0
version: 15.2.0
appVersion: v16.0.0
home: http://mojaloop.io
icon: http://mojaloop.io/images/logo.png
Expand Down
16 changes: 16 additions & 0 deletions centralsettlement/chart-service/templates/config-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.configOverride }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "centralsettlement-service.fullname" . }}-config-override
labels:
app.kubernetes.io/name: {{ include "centralsettlement-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.Version }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
{{- range $fileName, $fileContents := .Values.configOverride }}
{{ $fileName }}: | {{ $fileContents | toPrettyJson | nindent 4 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions centralsettlement/chart-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ spec:
- name: EVENT_SDK_TRACEID_PER_VENDOR
value: {{ .Values.config.event_traceid_per_vendor | quote }}
volumeMounts:
{{- range $fileName, $fileContents := .Values.configOverride }}
- name: config-override-volume
mountPath: /opt/app/{{ $fileName }}
subPath: {{ $fileName }}
{{- end }}
- name: {{ template "centralsettlement-service.fullname" . }}-cfg-vol
mountPath: /opt/app/config
- name: {{ template "centralsettlement-service.fullname" . }}-rules-vol
Expand Down Expand Up @@ -183,6 +188,11 @@ spec:
value: {{ .Values.sidecar.config.event_log_metadata_only | quote }}
{{- end }}
volumes:
{{- if .Values.configOverride }}
- name: config-override-volume
configMap:
name: {{ template "account-lookup-service-admin.fullname" . }}-config-override
{{- end }}
- name: {{ template "centralsettlement-service.fullname" . }}-cfg-vol
configMap:
name: {{ template "centralsettlement-service.fullname" . }}-config
Expand Down
Loading

0 comments on commit 88aa64e

Please sign in to comment.