deployment.yml 2.22 KB
Newer Older
1
2
3
apiVersion: apps/v1
kind: Deployment
metadata:
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
4
  name: pp-media-converter-deployment
5
6
  namespace: memobase
  labels:
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
7
    app: pp-media-converter-app
8
9
10
spec:
  selector:
    matchLabels:
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
11
      app: pp-media-converter-app
12
13
14
15
  replicas: 1
  template:
    metadata:
      labels:
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
16
17
        app: pp-media-converter-app
        tier: postprocessing
18
19
    spec:
      containers:
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
20
        - name: pp-media-converter-container
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
21
22
          image: cr.gitlab.switch.ch/memoriav/memobase-2020/services/postprocessing/media-converter:latest
          imagePullPolicy: Always
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
23
24
          command: [ "java" ]
          args: [ "-Xms128m", "-Xmx10g", "-jar", "/app/app.jar" ]
25
          resources:
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
26
27
28
29
30
31
            requests:
              cpu: "0.2"
              memory: "1Gi"
            limits:
              cpu: "1"
              memory: "11Gi"
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
32
          volumeMounts:
33
            - name: media-volume
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
34
35
36
37
              mountPath: /data
          env:
            - name: JOB_ID
              value: media-converter
38
39
            - name: AUDIO_SNIPPET_DURATION
              value: "30"
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
40
            - name: INTERNAL_BASE_URL
41
              value: "http://mb-fed1.memobase.unibas.ch:8080/fcrepo/rest/"
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
            - name: EXTERNAL_BASE_URL
              value: "https://memobase.ch/"
            - name: FEDORA_USER
              valueFrom:
                secretKeyRef:
                  name: fedora-admin-credentials
                  key: FEDORA_USER
            - name: FEDORA_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: fedora-admin-credentials
                  key: FEDORA_PASSWORD
            - name: KAFKA_BOOTSTRAP_SERVERS
              value: mb-ka1.memobase.unibas.ch:9092,mb-ka2.memobase.unibas.ch:9092,mb-ka3.memobase.unibas.ch:9092
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
56
            - name: CLIENT_ID
57
58
              value: media-converter-client
            - name: GROUP_ID
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
59
60
              value: media-converter
            - name: TOPIC_IN
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
61
              value: fedora-output-json-records
62
            - name: TOPIC_PROCESS
63
              value: postprocessing-reporting
64
65
            - name: MEDIA_FOLDER_ROOT_PATH
              value: "/data"
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
66

67
68
      restartPolicy: Always
      volumes:
69
        - name: media-volume
70
          persistentVolumeClaim:
71
            claimName: media-volume-claim