Commit 779c928b authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add env variable.

Add resource limits.
parent cc12b3c5
Pipeline #32372 passed with stages
in 3 minutes and 33 seconds
...@@ -4,4 +4,6 @@ applicationId: di-mapper-prod-app ...@@ -4,4 +4,6 @@ applicationId: di-mapper-prod-app
inputTopicName: mb-di-mapper-prod inputTopicName: mb-di-mapper-prod
outputTopicName: mb-di-media-linker-prod outputTopicName: mb-di-media-linker-prod
reportingTopicName: mb-di-reporting-prod reportingTopicName: mb-di-reporting-prod
configTopicName: mb-di-config-prod configTopicName: mb-di-config-prod
\ No newline at end of file
k8sEnvironment: prod
\ No newline at end of file
...@@ -4,4 +4,6 @@ applicationId: di-mapper-stage-app ...@@ -4,4 +4,6 @@ applicationId: di-mapper-stage-app
inputTopicName: mb-di-mapper-stage inputTopicName: mb-di-mapper-stage
outputTopicName: mb-di-media-linker-stage outputTopicName: mb-di-media-linker-stage
reportingTopicName: mb-di-reporting-stage reportingTopicName: mb-di-reporting-stage
configTopicName: mb-di-config-stage configTopicName: mb-di-config-stage
\ No newline at end of file
k8sEnvironment: stage
\ No newline at end of file
...@@ -5,3 +5,5 @@ inputTopicName: mb-di-mapper-prod ...@@ -5,3 +5,5 @@ inputTopicName: mb-di-mapper-prod
outputTopicName: mb-di-media-linker-prod outputTopicName: mb-di-media-linker-prod
reportingTopicName: mb-di-reporting-prod reportingTopicName: mb-di-reporting-prod
configTopicName: mb-di-config-prod configTopicName: mb-di-config-prod
k8sEnvironment: test
...@@ -5,23 +5,31 @@ metadata: ...@@ -5,23 +5,31 @@ metadata:
name: "{{ .Values.deploymentName }}-deployment" name: "{{ .Values.deploymentName }}-deployment"
namespace: memobase namespace: memobase
labels: labels:
jobType: "import-process-deployment" app: {{ .Values.deploymentName }}
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: {{ .Values.deploymentName }} app: {{ .Values.deploymentName }}
replicas: 1 replicas: {{ .Values.k8sReplicas }}
template: template:
metadata: metadata:
labels: labels:
app: {{ .Values.deploymentName }} app: {{ .Values.deploymentName }}
tier: import-process tier: import-process
environment: {{.Values.k8sEnvironment }}
spec: spec:
restartPolicy: Always restartPolicy: Always
containers: containers:
- name: "{{ .Values.deploymentName }}-container" - name: "{{ .Values.deploymentName }}-container"
image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}" image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
imagePullPolicy: Always imagePullPolicy: Always
resources:
requests:
cpu: "{{ .Values.k8sRequestsCpu }}"
memory: "{{ .Values.k8sRequestsMemory }}"
limits:
cpu: "{{ .Values.k8sLimitsCpu }}"
memory: "{{ .Values.k8sLimitsMemory }}"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: "{{ .Values.kafkaConfigs }}" name: "{{ .Values.kafkaConfigs }}"
......
...@@ -2,6 +2,13 @@ registry: "cr.gitlab.switch.ch" ...@@ -2,6 +2,13 @@ registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/mapper-service" image: "memoriav/memobase-2020/services/import-process/mapper-service"
tag: "latest" tag: "latest"
k8sEnvironment: placeholder
k8sReplicas: 1
k8sRequestsCpu: "0.1"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.5"
k8sLimitsMemory: "512Mi"
kafkaConfigs: placeholder kafkaConfigs: placeholder
deploymentName: placeholder deploymentName: placeholder
applicationId: placeholder applicationId: placeholder
......
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