Unverified Commit 0c7734db authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

make helm compatible with autodeploy

parent 1c86462c
Pipeline #24810 passed with stages
in 5 minutes and 39 seconds
k8sEnvironment: prod
k8sReplicas: 1
k8sRequestsCpu: "0.2"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.5"
k8sLimitsMemory: "300Mi"
applicationId: di-media-metadata-preprocessor-prod
bootstrapServers: prod-kafka-bootstrap-servers
inputTopicName: mb-di-media-metadata-prod
outputTopicAVName: mb-di-av-enrichment-prod
outputTopicIgnoreName: mb-di-normalization-prod
outputTopicImageName: mb-di-image-enrichment-prod
reportingTopicName: mb-di-reporting-prod
k8sEnvironment: stage
k8sReplicas: 1
k8sRequestsCpu: "0.2"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.5"
k8sLimitsMemory: "300Mi"
applicationId: di-media-metadata-preprocessor-stage
bootstrapServers: prod-kafka-bootstrap-servers
inputTopicName: mb-di-media-metadata-stage
outputTopicAVName: mb-di-av-enrichment-stage
outputTopicIgnoreName: mb-di-normalization-stage
outputTopicImageName: mb-di-image-enrichment-stage
reportingTopicName: mb-di-reporting-stage
k8sEnvironment: test
k8sReplicas: 1
k8sRequestsCpu: "0.2"
k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.5"
k8sLimitsMemory: "300Mi"
applicationId: di-media-metadata-preprocessor-test
bootstrapServers: test-kafka-bootstrap-servers
inputTopicName: mb-di-media-metadata-prod
outputTopicAVName: mb-di-av-enrichment-prod
outputTopicIgnoreName: mb-di-normalization-prod
outputTopicImageName: mb-di-image-enrichment-prod
reportingTopicName: mb-di-reporting-prod
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Values.deploymentName }}-config"
namespace: memobase
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-config"
namespace: "{{ .Values.k8sNamespace }}"
data:
APPLICATION_ID: "{{ .Values.applicationId }}"
TOPIC_IN: "{{ .Values.inputTopicName }}"
......
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Values.deploymentName }}"
namespace: memobase
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}"
namespace: "{{ .Values.k8sNamespace }}"
labels:
jobType: "import-process-deployment"
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
spec:
selector:
matchLabels:
app: {{ .Values.deploymentName }}
replicas: 1
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
replicas: {{ .Values.k8sReplicas}}
template:
metadata:
labels:
app: {{ .Values.deploymentName }}
tier: import-process
app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
group: "{{ .Values.k8sGroupName }}"
environment: "{{ .Values.k8sEnvironment }}"
spec:
restartPolicy: Always
containers:
- name: "{{ .Values.deploymentName }}-container"
- name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-container"
image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
imagePullPolicy: Always
command: [ "java" ]
args: [ "-Xms64m", "-Xmx256g", "-jar", "/app/app.jar" ]
resources:
requests:
cpu: "0.2"
memory: "128Mi"
cpu: "{{ .Values.k8sRequestsCpu }}"
memory: "{{ .Values.k8sRequestsMemory }}"
limits:
cpu: "0.5"
memory: "300Mi"
cpu: "{{ .Values.k8sLimitsCpu }}"
memory: "{{ .Values.k8sLimitsMemory }}"
envFrom:
- configMapRef:
name: "{{ .Values.bootstrapServers }}"
- configMapRef:
name: "{{ .Values.deploymentName }}-config"
name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-config"
############################################
## Values in this section are the same for #
## all jobs #
############################################
#image values
registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/media-metadata-preprocessor"
tag: "latest"
deploymentName: ip-media-metadata-preprocessor
applicationId: media-metadata-preprocessor-app
k8sName: media-metadata-preprocessor
k8sNamespace: memobase
k8sGroupId: di
k8sGroupName: documents-import
k8sEnvironment: placeholder
k8sReplicas: placeholder
k8sRequestsCpu: placeholder
k8sRequestsMemory: placeholder
k8sLimitsCpu: placeholder
k8sLimitsMemory: placeholder
bootstrapServers: prod-kafka-bootstrap-servers
applicationId: placeholder
inputTopicName: mb-di-media-metadata-prod
outputTopicAVName: mb-di-av-enrichment-prod
outputTopicIgnoreName: mb-di-normalization-prod
outputTopicImageName: mb-di-image-enrichment-prod
reportingTopicName: mb-di-reporting-prod
bootstrapServers: placeholder
inputTopicName: placeholder
outputTopicAVName: placeholder
outputTopicIgnoreName: placeholder
outputTopicImageName: placeholder
reportingTopicName: placeholder
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