Commit 3e038c90 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

get indices name from external configmap

parent 43b09b26
Pipeline #30141 passed with stages
in 7 minutes and 47 seconds
......@@ -12,9 +12,8 @@ reportingTopicName: mb-di-reporting-prod
applicationId: prod-rico-edm-transformer
elasticHostConfigs: prod-elastic-configs
elasticClustername: placeholder # TODO: Why is this value needed?
elasticInstitutionIndex: placeholder # TODO: From already existing ConfigMap (prod-institution-index) or custom value?
elasticRecordSetIndex: placeholder # TODO: From already existing ConfigMap (prod-record-sets-index)
institutionIndexCM: prod-institutions-index
recordSetIndexCM: prod-record-sets-index
isocodeMapping: placeholder # TODO: Set value
institutionsCoordinates: placeholder # TODO: Set value
......
......@@ -12,9 +12,8 @@ reportingTopicName: mb-di-reporting-stage
applicationId: stage-rico-edm-transformer
elasticHostConfigs: stage-elastic-configs
elasticClustername: placeholder # TODO: Why is this value needed?
elasticInstitutionIndex: placeholder # TODO: From already existing ConfigMap (prod-institution-index) or custom value?
elasticRecordSetIndex: placeholder # TODO: From already existing ConfigMap (prod-record-sets-index)
institutionIndexCM: stage-institutions-index
recordSetIndexCM: stage-record-sets-index
isocodeMapping: placeholder # TODO: Set value
institutionsCoordinates: placeholder # TODO: Set value
......
......@@ -12,9 +12,8 @@ reportingTopicName: mb-di-reporting-prod
applicationId: test-rico-edm-transformer
elasticHostConfigs: test-elastic-configs
elasticClustername: placeholder # TODO: Why is this value needed?
elasticInstitutionIndex: placeholder # TODO: From already existing ConfigMap (prod-institution-index) or custom value?
elasticRecordSetIndex: placeholder # TODO: From already existing ConfigMap (prod-record-sets-index)
institutionIndexCM: test-institutions-index
recordSetIndexCM: test-record-sets-index
isocodeMapping: placeholder # TODO: Set value
institutionsCoordinates: placeholder # TODO: Set value
......
......@@ -8,9 +8,6 @@ data:
TOPIC_IN: "{{ .Values.inputTopicName }}"
TOPIC_OUT: "{{ .Values.outputTopicName }}"
TOPIC_PROCESS: "{{ .Values.reportingTopicName }}"
#ELASTIC_CLUSTERNAME: "{{ .Values.elasticClustername }}"
#ELASTIC_INSTITUTION_INDEX: "{{ .Values.elasticClustername }}" # TODO: Can maybe be removed
#ELASTIC_RECORD_SET_INDEX: "{{ .Values.elasticClustername }}" # TODO: Can maybe be removed
ISOCODE_MAPPING: "{{ .Values.isocodeMapping }}"
INSTITUTIONS_COORDINATES: "{{ .Values.institutionsCoordinates }}"
EXPORT_DEFINITION_RULES: "{{ .Values.exportDefinitionRules }}"
......@@ -30,6 +30,17 @@ spec:
limits:
cpu: "{{ .Values.k8sLimitsCpu }}"
memory: "{{ .Values.k8sLimitsMemory }}"
env:
- name: INSTITUTION_INDEX
valueFrom:
configMapKeyRef:
name: {{ .Values.institutionIndexCM }}
key: ELASTIC_INDEX
- name: RECORD_SET_INDEX
valueFrom:
configMapKeyRef:
name: {{ .Values.recordSetIndexCM }}
key: ELASTIC_INDEX
envFrom:
- configMapRef:
name: "{{ .Values.kafkaConfigs }}"
......
......@@ -20,16 +20,9 @@ reportingTopicName: placeholder
applicationId: placeholder
elasticHostConfigs: placeholder
#@sebastian
#clustername was regularly used in early ES times - seems I'm getting to old..
#compare: https://discuss.elastic.co/t/when-does-client-need-cluster-name/114916/2
#I removed the Header setting in the code - should work now without this setting
#elasticClustername: placeholder
#yes please: if you can provide an elegant reference (with helm) to an already existing configmap - go for it, thanks!
#important: the code is working with the env variables set in app.yml ("Jonas mechanism") If possible
#I would prefer not to have to adapt the code - thanks, let me know
#elasticInstitutionIndex: placeholder # TODO: From already existing ConfigMap (prod-institutions-index) or custom value?
#elasticRecordSetIndex: placeholder # TODO: From already existing ConfigMap (prod-record-sets-index)
institutionIndexCM: placeholder
recordSetIndexCM: placeholder
isocodeMapping: placeholder
institutionsCoordinates: placeholder
......
app:
#institutionTypeLabelsPath: "/home/swissbib/environment/code/repositories/memoriav/gitlab/services/postprocessing/rico-edm-transformer/configs/institution_types/labels.csv"
#documentTypeLabelsPath: "/home/swissbib/environment/code/repositories/memoriav/gitlab/services/postprocessing/rico-edm-transformer/configs/document_types/labels.csv"
#accessTermLabelsPath: "/home/swissbib/environment/code/repositories/memoriav/gitlab/services/postprocessing/rico-edm-transformer/configs/access_terms/labels.csv"
#reuseStatementLabelsPath: "/home/swissbib/environment/code/repositories/memoriav/gitlab/services/postprocessing/rico-edm-transformer/configs/reuse_statements/labels.csv"
isocodemapping: ${ISOCODE_MAPPING:?system}
institutionscoordinates: ${INSTITUTIONS_COORDINATES:?system}
exportDefinitionRules: ${EXPORT_DEFINITION_RULES:?system}
elastic:
host: ${ELASTIC_HOST:?system}
port: ${ELASTIC_PORT:?system}
#clustername: ${ELASTIC_CLUSTERNAME:?system}
#documentsIndex: ${DOCUMENTS_INDEX:?system}
institutionIndex: ${INSTITUTION_INDEX:?system}
recordSetIndex: ${RECORD_SET_INDEX:?system}
kafka:
streams:
bootstrap.servers: ${KAFKA_BOOTSTRAP_SERVERS:?system}
......
Markdown is supported
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