Skip to content

Commit

Permalink
alter deploy to use secret
Browse files Browse the repository at this point in the history
  • Loading branch information
dfry committed Mar 26, 2024
1 parent bb24f58 commit d1e9409
Show file tree
Hide file tree
Showing 24 changed files with 112 additions and 142 deletions.
12 changes: 8 additions & 4 deletions account-lookup-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand All @@ -71,9 +78,6 @@ spec:
value: {{ .Values.env.auth_n_token_audience }}
- name: PARTICIPANTS_SVC_URL
value: {{ .Values.env.participants_svc_url }}
{{- if .Values.extraEnvs | default .Values.extraEnvs }}
{{ toYaml ( .Values.extraEnvs | default .Values.extraEnvs ) | indent 10 }}
{{- end }}
volumes:
- name: account-lookup-svc-data
emptyDir: {}
Expand Down
15 changes: 3 additions & 12 deletions account-lookup-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,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 @@ -108,16 +108,7 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand All @@ -75,9 +82,6 @@ spec:
value: {{ .Values.env.redis_host}}
- name: REDIS_PORT
value: {{ .Values.env.redis_port | quote}}
{{- if .Values.extraEnvs | default .Values.extraEnvs }}
{{ toYaml ( .Values.extraEnvs | default .Values.extraEnvs ) | indent 10 }}
{{- end }}
volumes:
- name: aandb-builtin-ledger-grpc-svc-data
emptyDir: {}
Expand Down
11 changes: 1 addition & 10 deletions accounts-and-balances-builtin-ledger-grpc-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,7 @@ env:
redis_host: redis-master
redis_port: 6379

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion accounts-and-balances-coa-grpc-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: ELASTICSEARCH_URL
Expand Down
15 changes: 3 additions & 12 deletions accounts-and-balances-coa-grpc-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,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 @@ -111,16 +111,7 @@ env:
redis_port: 6379
builtin_ledger_svc_url: accounts-and-balances-builtin-ledger-grpc-svc:3350

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion fspiop-api-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: ELASTICSEARCH_URL
Expand Down
11 changes: 1 addition & 10 deletions fspiop-api-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,7 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion participants-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: ELASTICSEARCH_URL
Expand Down
11 changes: 1 addition & 10 deletions participants-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,7 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
account_and_balance_coa_svc: accounts-and-balances-coa-grpc-svc:3300

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion quoting-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand Down
11 changes: 1 addition & 10 deletions quoting-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,7 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion settlements-api-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand Down
11 changes: 1 addition & 10 deletions settlements-api-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,7 @@ env:
participants_svc_url: http://participants-svc:3010
account_and_balance_coa_svc: accounts-and-balances-coa-grpc-svc:3300

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion settlements-command-handler-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand Down
11 changes: 1 addition & 10 deletions settlements-command-handler-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,7 @@ env:
participants_svc_url: http://participants-svc:3010
account_and_balance_coa_svc: accounts-and-balances-coa-grpc-svc:3300

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion settlements-event-handler-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand Down
11 changes: 1 addition & 10 deletions settlements-event-handler-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,7 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion transfers-api-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand Down
11 changes: 1 addition & 10 deletions transfers-api-svc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,7 @@ env:
auth_n_token_audience: mojaloop.vnext.dev.default_audience
participants_svc_url: http://participants-svc:3010

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 }}
extraEnvs: {}
# - name: KAFKA_URL
# value: kafka:9092
# - name: KAFKA_LOGS_TOPIC
Expand Down
9 changes: 8 additions & 1 deletion transfers-command-handler-svc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ spec:
- name: KAFKA_AUDITS_TOPIC
value: {{ .Values.env.kafka_audits_topic }}
- name: MONGO_URL
value: {{ .Values.env.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: PLATFORM_CONFIG_BASE_SVC_URL
value: {{ .Values.env.platform_config_base_svc_url }}
- name: AUTH_Z_SVC_BASEURL
Expand Down
Loading

0 comments on commit d1e9409

Please sign in to comment.