Verified Commit a956617d authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

replace k8s manifest with helm chart

parent ffad8b46
Pipeline #26160 passed with stages
in 7 minutes and 43 seconds
......@@ -11,4 +11,5 @@ include:
file: 'sbt-build/sbt-build-2.13.yml'
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'docker-image/docker-image.yml'
\ No newline at end of file
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'helm-chart/helm-chart.yml'
apiVersion: v2
name: rico-edm-transformer
description: A helm chart for the RiCO EDM Transformer
type: application
version: 0.0.0
appVersion: 0.0.0
maintainers:
- name: Sebastian Schüpbach
email: sebastian.schuepbach@unibas.ch
k8sEnvironment: prod
k8sReplicas: 1
k8sRequestsCpu: "0.2"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.4"
k8sLimitsMemory: "256Mi"
kafkaConfigs: prod-kafka-bootstrap-servers
inputTopicName: mb-di-processed-records-prod
outputTopicName: mb-di-edm-es-records-prod
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)
isocodeMapping: placeholder # TODO: Set value
institutionsCoordinates: placeholder # TODO: Set value
exportDefinitionRules: placeholder # TODO: Set value
k8sEnvironment: stage
k8sReplicas: 1
k8sRequestsCpu: "0.2"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.4"
k8sLimitsMemory: "256Mi"
kafkaConfigs: prod-kafka-bootstrap-servers
inputTopicName: mb-di-processed-records-stage
outputTopicName: mb-di-edm-es-records-stage
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)
isocodeMapping: placeholder # TODO: Set value
institutionsCoordinates: placeholder # TODO: Set value
exportDefinitionRules: placeholder # TODO: Set value
k8sEnvironment: test
k8sReplicas: 1
k8sRequestsCpu: "0.2"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.4"
k8sLimitsMemory: "256Mi"
kafkaConfigs: test-kafka-bootstrap-servers
inputTopicName: mb-di-processed-records-prod
outputTopicName: mb-di-edm-es-records-prod
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)
isocodeMapping: placeholder # TODO: Set value
institutionsCoordinates: placeholder # TODO: Set value
exportDefinitionRules: placeholder # TODO: Set value
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-config"
namespace: "{{ .Values.k8sNamespace }}"
data:
APPLICATION_ID: "{{ .Values.applicationId}}"
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 }}"
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}"
namespace: "{{ .Values.k8sNamespace }}"
labels:
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
spec:
selector:
matchLabels:
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
replicas: {{ .Values.k8sReplicas}}
template:
metadata:
labels:
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
group: "{{ .Values.k8sGroupName }}"
environment: "{{ .Values.k8sEnvironment }}"
spec:
containers:
- name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-container"
image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
imagePullPolicy: Always
command: [ "java" ]
args: [ "-Xms128m", "-Xmx256m", "-jar", "/app/app.jar" ]
resources:
requests:
cpu: "{{ .Values.k8sRequestsCpu }}"
memory: "{{ .Values.k8sRequestsMemory }}"
limits:
cpu: "{{ .Values.k8sLimitsCpu }}"
memory: "{{ .Values.k8sLimitsMemory }}"
envFrom:
- configMapRef:
name: "{{ .Values.kafkaConfigs }}"
- configMapRef:
name: "{{ .Values.elasticHostConfigs }}"
- configMapRef:
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-config"
restartPolicy: Always
registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/postprocessing/rico-edm-transformer"
tag: "latest"
k8sName: rico-edm-transformer
k8sNamespace: memobase
k8sGroupId: di
k8sGroupName: documents-import
k8sEnvironment: placeholder
k8sReplicas: placeholder
k8sRequestsCpu: placeholder
k8sRequestsMemory: placeholder
k8sLimitsCpu: placeholder
k8sLimitsMemory: placeholder
kafkaConfigs: placeholder
inputTopicName: placeholder
outputTopicName: placeholder
reportingTopicName: placeholder
applicationId: placeholder
elasticHostConfigs: placeholder
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)
isocodeMapping: placeholder
institutionsCoordinates: placeholder
exportDefinitionRules: placeholder
apiVersion: apps/v1
kind: Deployment
metadata:
name: pp-rico2edmtransfromer
namespace: memobase
labels:
app: pp-rico-2-edm-transfromer-app
spec:
selector:
matchLabels:
app: pp-rico-2-edm-transfromer-app
replicas: 1
template:
metadata:
labels:
app: pp-rico-2-edm-transfromer-app
tier: web
spec:
containers:
- name: pp-rico2edmtransfromer-container
image: cr.gitlab.switch.ch/memoriav/memobase-2020/services/postprocessing/rico-edm-transformer:0.2.7
imagePullPolicy: Always
command: [ "java" ]
args: [ "-Xmx128m", "-Xmx256m", "-jar", "/app/app.jar" ]
resources:
requests:
cpu: "0.2"
memory: "128Mi"
limits:
cpu: "0.4"
memory: "256Mi"
envFrom:
- configMapRef:
name: "prod-kafka-bootstrap-servers"
env:
- name: JOB_ID
value: rico-2-edm-transfromer
- name: APPLICATION_ID
value: rico-2-edm-transfromer-03-16
- name: TOPIC_IN
value: fedora-output-json-records
- name: TOPIC_OUT
value: edm-es-records
- name: TOPIC_PROCESS
value: import-process-reporting
restartPolicy: Always
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