Commit fb8f4c18 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Update deployment

parent d87b64ce
Pipeline #27646 passed with stages
in 3 minutes and 36 seconds
...@@ -3,5 +3,6 @@ kafkaConfigs: prod-kafka-bootstrap-servers ...@@ -3,5 +3,6 @@ kafkaConfigs: prod-kafka-bootstrap-servers
inputTopic: di-processed-reports-prod inputTopic: di-processed-reports-prod
reportingTopic: di-reporting-reports-prod reportingTopic: di-reporting-reports-prod
importApiEndpoint: https://import.memobase.k8s.unibas.ch importApiEndpoint: https://import.memobase.k8s.unibas.ch
whitelistFileConfig: prod-reports-consumer-step-whitelist
k8sEnvironment: prod k8sEnvironment: prod
...@@ -3,5 +3,6 @@ kafkaConfigs: stage-kafka-bootstrap-servers ...@@ -3,5 +3,6 @@ kafkaConfigs: stage-kafka-bootstrap-servers
inputTopic: di-processed-reports-stage inputTopic: di-processed-reports-stage
reportingTopic: di-reporting-reports-stage reportingTopic: di-reporting-reports-stage
importApiEndpoint: https://stage.import.memobase.k8s.unibas.ch importApiEndpoint: https://stage.import.memobase.k8s.unibas.ch
whitelistFileConfig: stage-reports-consumer-step-whitelist
k8sEnvironment: stage k8sEnvironment: stage
...@@ -5,6 +5,7 @@ metadata: ...@@ -5,6 +5,7 @@ metadata:
namespace: memobase namespace: memobase
data: data:
API_ENDPOINT_URL: "{{ .Values.importApiEndpoint }}" API_ENDPOINT_URL: "{{ .Values.importApiEndpoint }}"
STEP_WHITE_LIST_FILE_PATH: "{{ .Values.whitelistFilePath }}"
APPLICATION_ID: "{{ .Values.deploymentName }}-{{ .Values.k8sEnvironment }}-app" APPLICATION_ID: "{{ .Values.deploymentName }}-{{ .Values.k8sEnvironment }}-app"
TOPIC_IN: "{{ .Values.inputTopic }}" TOPIC_IN: "{{ .Values.inputTopic }}"
TOPIC_OUT: "not-used" TOPIC_OUT: "not-used"
......
...@@ -32,4 +32,11 @@ spec: ...@@ -32,4 +32,11 @@ spec:
name: "{{ .Values.kafkaConfigs }}" name: "{{ .Values.kafkaConfigs }}"
- configMapRef: - configMapRef:
name: "{{ .Values.deploymentName}}-app-config" name: "{{ .Values.deploymentName}}-app-config"
volumeMounts:
- name: {{ .Values.whitelistFileConfig }}
mountPath: {{ .Values.whitelistFilePath }}
volumes:
- name: {{ .Values.whitelistFileConfig }}
configMap:
name: {{ .Values.whitelistFileConfig }}
restartPolicy: Always restartPolicy: Always
...@@ -15,3 +15,5 @@ kafkaConfigs: placeholder ...@@ -15,3 +15,5 @@ kafkaConfigs: placeholder
inputTopic: placeholder inputTopic: placeholder
reportingTopic: placeholder reportingTopic: placeholder
importApiEndpoint: placeholder importApiEndpoint: placeholder
whitelistFilePath: /configs/whitelist.txt
whitelistFileConfig: placeholder
\ No newline at end of file
...@@ -52,6 +52,7 @@ class Service(file: String = "app.yml") { ...@@ -52,6 +52,7 @@ class Service(file: String = "app.yml") {
.mapNotNull { klaxon.parse<IndexReport>(it.value()) } .mapNotNull { klaxon.parse<IndexReport>(it.value()) }
.filter { stepWhitelist.check(it.report.step) } .filter { stepWhitelist.check(it.report.step) }
.forEach { .forEach {
log.info("Processing report: " + it.report.id + "; " + it.report.step)
if (it.metadata.institutionId == "none") { if (it.metadata.institutionId == "none") {
collector.addReport( collector.addReport(
it.metadata.recordSetId, it.metadata.recordSetId,
......
app: app:
importApiUrl: ${API_ENDPOINT_URL:?system} importApiUrl: ${API_ENDPOINT_URL:?system}
whitelistFilePath: ${STEP_WHITE_LIST_FILE_PATH:?system}
kafka: kafka:
consumer: consumer:
bootstrap.servers: ${KAFKA_BOOTSTRAP_SERVERS:?system} bootstrap.servers: ${KAFKA_BOOTSTRAP_SERVERS:?system}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment