Commit ff4a52cc authored by Matthias's avatar Matthias Committed by Thomas Bernhart
Browse files

deployment-transform

parent b58ad288
Pipeline #15502 passed with stages
in 5 minutes and 40 seconds
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: "{{ .Values.processId }}-{{ .Values.jobName }}-app-config" name: "{{ .Values.deploymentName }}-config"
namespace: memobase namespace: memobase
data: data:
APP_DIRECTORY: "{{ .Values.appDirectory }}" APPLICATION_ID: {{ .Values.applicationId }}
CLIENT_ID: "{{ .Values.processId }}-{{ .Values.jobName }}" TOPIC_IN: {{ .Values.inputTopicName }}
TOPIC_IN: "{{ .Values.processId }}-{{ .Values.lastJobName }}" TOPIC_OUT: {{ .Values.outputTopicName }}
TOPIC_OUT: "{{.Values.processId }}-{{ .Values.jobName }}" TOPIC_PROCESS: {{ .Values.reportingTopicName }}
TOPIC_PROCESS: "{{ .Values.processId }}-reporting"
apiVersion: batch/v1 apiVersion: apps/v1
kind: Job kind: Deployment
metadata: metadata:
name: "{{ .Values.processId }}-{{ .Values.jobName }}" name: {{ .Values.deploymentName }}
namespace: memobase namespace: memobase
labels: labels:
institutionId: "{{ .Values.institutionId }}" jobType: "import-process-deployment"
recordSetId: "{{ .Values.recordSetId }}"
jobType: "import-job"
spec: spec:
selector:
matchLabels:
app: {{ .Values.deploymentName }}
replicas: 1
template: template:
metadata:
labels:
app: {{ .Values.deploymentName }}
tier: import-process
spec: spec:
restartPolicy: Always
containers: containers:
- name: "{{ .Values.processId }}-{{ .Values.jobName }}" - name: "{{ .Values.deploymentName }}-container"
image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}" image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
imagePullPolicy: Always
envFrom: envFrom:
- secretRef: - secretRef:
name: "{{ .Values.sftpConfigs }}" name: "{{ .Values.sftpConfigs }}"
...@@ -21,6 +29,4 @@ spec: ...@@ -21,6 +29,4 @@ spec:
- configMapRef: - configMapRef:
name: "{{ .Values.kafkaConfigs }}" name: "{{ .Values.kafkaConfigs }}"
- configMapRef: - configMapRef:
name: "{{ .Values.processId }}-{{ .Values.jobName }}-app-config" name: "{{ .Values.deploymentName }}-config"
restartPolicy: Never \ No newline at end of file
backoffLimit: 0
\ No newline at end of file
...@@ -3,9 +3,12 @@ registry: "cr.gitlab.switch.ch" ...@@ -3,9 +3,12 @@ registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/fedora-ingest-service" image: "memoriav/memobase-2020/services/import-process/fedora-ingest-service"
tag: "latest" tag: "latest"
deploymentName: xml-data-transform
## TODO: This needs to be solved differently. This way it is not possible to deploy a replica-set.
## somehow the id needs to be dependent on the pod name?
applicationId: xml-data-transform-app
jobName: fedora-ingest-service jobName: fedora-ingest-service
lastJobName: normalization-service
processId: p0001
institutionId: placeholder institutionId: placeholder
recordSetId: placeholder recordSetId: placeholder
...@@ -18,3 +21,6 @@ fedoraConfigs: fedora-admin-credentials ...@@ -18,3 +21,6 @@ fedoraConfigs: fedora-admin-credentials
## this is a relative path built like this: ## this is a relative path built like this:
## "./{RECORD_SET_ID}" ## "./{RECORD_SET_ID}"
appDirectory: placeholderValue appDirectory: placeholderValue
inputTopicName: import-process-fedora-ingest
reportingTopicName: import-process-reporting
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