Skip to content

Commit

Permalink
Merge pull request #2 from mojaloop/feat/add-secret-env
Browse files Browse the repository at this point in the history
add secret for mongodb url
  • Loading branch information
dfry authored Mar 26, 2024
2 parents 342026f + bb24f58 commit 794f80b
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 88 deletions.
7 changes: 3 additions & 4 deletions account-lookup-http-oracle-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ ingress:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down Expand Up @@ -102,7 +102,6 @@ extraEnvs: {}
# - name: KAFKA_AUDITS_TOPIC
# value: audits


initContainers: |
- name: wait-for-kafka
image: solsson/kafka:2.8.1
Expand All @@ -120,4 +119,4 @@ initContainers: |
echo Kafka ok!;
env:
- name: KAFKA_URL
value: kafka:9092
value: '{{ .Values.env.kafka_url }}'
20 changes: 18 additions & 2 deletions account-lookup-svc/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Default values for account-lookup-svc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
#general config params
config:
mongo_url: mongodb://root:mongodb@mongodb:27017
# db_secret:
### Example config for an existing secret
# mongo_url_secret:
# name: mongo-secret
# key: password

replicaCount: 1

Expand Down Expand Up @@ -93,15 +101,23 @@ env:
kafka_url: kafka:9092
kafka_logs_topic: logs
kafka_audits_topic: audits
mongo_url: mongodb://root:mongodb@mongodb:27017
platform_config_base_svc_url: http://platform-configuration-svc:3100
auth_z_svc_baseurl: http://authorization-svc:3202
auth_n_svc_baseurl: http://authentication-svc:3201
auth_n_token_issuer_name: mojaloop.vnext.dev.default_issuer
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010

extraEnvs: {}
extraEnvs:
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_URL
Expand Down
39 changes: 29 additions & 10 deletions accounts-and-balances-builtin-ledger-grpc-svc/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Default values for accounts-and-balances-builtin-ledger-grpc-svc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#general config params
config:
mongo_url: mongodb://root:mongodb@mongodb:27017
# db_secret:
### Example config for an existing secret
# mongo_url_secret:
# name: mongo-secret
# key: password
replicaCount: 1

image:
Expand Down Expand Up @@ -46,8 +53,8 @@ ingress:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down Expand Up @@ -93,7 +100,6 @@ env:
kafka_url: kafka:9092
kafka_logs_topic: logs
kafka_audits_topic: audits
mongo_url: mongodb://root:mongodb@mongodb:27017
platform_config_base_svc_url: http://platform-configuration-svc:3100
auth_z_svc_baseurl: http://authorization-svc:3202
auth_n_svc_baseurl: http://authentication-svc:3201
Expand All @@ -103,9 +109,16 @@ env:
redis_host: redis-master
redis_port: 6379



extraEnvs: {}
extraEnvs:
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down Expand Up @@ -135,7 +148,6 @@ extraEnvs: {}
# - name: REDIS_PORT
# value: "6379"


initContainers: |
- name: wait-for-mongodb
image: bitnami/mongodb:6.0.1
Expand All @@ -153,8 +165,15 @@ initContainers: |
echo ====================;
echo MongoDB ok!;
env:
- name: MONGO_URL
value: mongodb://root:mongodb@mongodb:27017
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
- name: wait-for-platform-configuration-svc
image: curlimages/curl:8.3.0
Expand Down
20 changes: 18 additions & 2 deletions accounts-and-balances-coa-grpc-svc/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Default values for accounts-and-balances-coa-grpc-svc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
#general config params
config:
mongo_url: mongodb://root:mongodb@mongodb:27017
# db_secret:
### Example config for an existing secret
# mongo_url_secret:
# name: mongo-secret
# key: password

replicaCount: 1

Expand Down Expand Up @@ -92,7 +100,6 @@ env:
kafka_url: kafka:9092
kafka_logs_topic: logs
kafka_audits_topic: audits
mongo_url: mongodb://root:mongodb@mongodb:27017
platform_config_base_svc_url: http://platform-configuration-svc:3100
elasticsearch_url: http://elasticsearch.monitoring.svc.cluster.local:9200
auth_z_svc_baseurl: http://authorization-svc:3202
Expand All @@ -104,7 +111,16 @@ env:
redis_port: 6379
builtin_ledger_svc_url: accounts-and-balances-builtin-ledger-grpc-svc:3350

extraEnvs: {}
extraEnvs:
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
37 changes: 25 additions & 12 deletions fspiop-api-svc/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Default values for fspiop-api-svc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#general config params
config:
mongo_url: mongodb://root:mongodb@mongodb:27017
# db_secret:
### Example config for an existing secret
# mongo_url_secret:
# name: mongo-secret
# key: password
replicaCount: 1

image:
Expand Down Expand Up @@ -47,14 +54,14 @@ ingress:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0
hosts:
- host: fspiop-api.localhost
paths:
- path: /
pathType: ImplementationSpecific
- host: fspiop-api.localhost
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: fspiop-api-tls
hosts:
- fspiop-api.localhost
- secretName: fspiop-api-tls
hosts:
- fspiop-api.localhost

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down Expand Up @@ -96,7 +103,6 @@ env:
kafka_url: kafka:9092
kafka_logs_topic: logs
kafka_audits_topic: audits
mongo_url: mongodb://root:mongodb@mongodb:27017
platform_config_base_svc_url: http://platform-configuration-svc:3100
elasticsearch_url: http://elasticsearch.monitoring.svc.cluster.local:9200
auth_z_svc_baseurl: http://authorization-svc:3202
Expand All @@ -105,9 +111,16 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010



extraEnvs: {}
extraEnvs:
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
31 changes: 20 additions & 11 deletions participants-svc/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Default values for participants-svc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#general config params
config:
mongo_url: mongodb://root:mongodb@mongodb:27017
# db_secret:
### Example config for an existing secret
# mongo_url_secret:
# name: mongo-secret
# key: password
replicaCount: 1

image:
Expand Down Expand Up @@ -46,8 +53,8 @@ ingress:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down Expand Up @@ -89,12 +96,10 @@ readinessProbe:
initialDelaySeconds: 15
periodSeconds: 20


env:
kafka_url: kafka:9092
kafka_logs_topic: logs
kafka_audits_topic: audits
mongo_url: mongodb://root:mongodb@mongodb:27017
platform_config_base_svc_url: http://platform-configuration-svc:3100
elasticsearch_url: http://elasticsearch.monitoring.svc.cluster.local:9200
auth_z_svc_baseurl: http://authorization-svc:3202
Expand All @@ -103,11 +108,16 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
account_and_balance_coa_svc: accounts-and-balances-coa-grpc-svc:3300





extraEnvs: {}
extraEnvs:
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down Expand Up @@ -135,7 +145,6 @@ extraEnvs: {}
# - name: ACCOUNTS_BALANCES_COA_SVC_URL
# value: accounts-and-balances-coa-grpc-svc:3300


initContainers: |
- name: wait-for-platform-configuration-svc
image: curlimages/curl:8.3.0
Expand Down
26 changes: 20 additions & 6 deletions quoting-svc/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Default values for quoting-svc.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#general config params
config:
mongo_url: mongodb://root:mongodb@mongodb:27017
# db_secret:
### Example config for an existing secret
# mongo_url_secret:
# name: mongo-secret
# key: password
replicaCount: 1

image:
Expand Down Expand Up @@ -46,8 +53,8 @@ ingress:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down Expand Up @@ -93,16 +100,23 @@ env:
kafka_url: kafka:9092
kafka_logs_topic: logs
kafka_audits_topic: audits
mongo_url: mongodb://root:mongodb@mongodb:27017
platform_config_base_svc_url: http://platform-configuration-svc:3100
auth_z_svc_baseurl: http://authorization-svc:3202
auth_n_svc_baseurl: http://authentication-svc:3201
auth_n_token_issuer_name: mojaloop.vnext.dev.default_issuer
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010


extraEnvs: {}
extraEnvs:
- name: mongo_url
{{- if .Values.config.mongo_url_secret }}
valueFrom:
secretKeyRef:
name: '{{ .Values.config.mongo_url_secret.name }}'
key: '{{ .Values.config.mongo_url_secret.key }}'
{{- else }}
value: {{ .Values.config.mongo_url }}
{{- end }}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
Loading

0 comments on commit 794f80b

Please sign in to comment.