deployment.yaml 2.25 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1 2 3 4 5 6 7 8 9 10 11
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.deploymentName }}-deployment"
  namespace: memobase
  labels:
    app: "{{ .Values.deploymentName }}-deployment"
spec:
  selector:
    matchLabels:
      app: "{{ .Values.deploymentName }}-deployment"
12
  replicas: 3
Jonas Waeber's avatar
Jonas Waeber committed
13 14 15 16
  template:
    metadata:
      labels:
        app: "{{ .Values.deploymentName }}-deployment"
Jonas Waeber's avatar
Jonas Waeber committed
17
        environment: {{ .Values.env }}
Jonas Waeber's avatar
Jonas Waeber committed
18 19 20 21 22
    spec:
      containers:
        - name: "{{ .Values.deploymentName }}-container"
          image: "{{.Values.registry}}/{{ .Values.image }}:{{ .Values.tag }}"
          imagePullPolicy: Always
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
          env:
          - name: DOCUMENTS_INDEX
            valueFrom:
              configMapKeyRef:
                name: {{ .Values.documentsIndexSource }}
                key: ELASTIC_INDEX
          - name: INSTITUTIONS_INDEX
            valueFrom:
              configMapKeyRef:
                name: {{ .Values.institutionIndexSource }}
                key: ELASTIC_INDEX
          - name: RECORD_SETS_INDEX
            valueFrom:
              configMapKeyRef:
                name: {{ .Values.recordSetIndexSource }}
                key: ELASTIC_INDEX
Jonas Waeber's avatar
Jonas Waeber committed
39 40 41
          envFrom:
          - configMapRef:
              name: "{{ .Values.kafkaConfigs }}"
42 43
          - configMapRef:
              name: "{{ .Values.elasticConfigs }}"
Jonas Waeber's avatar
Jonas Waeber committed
44
          - configMapRef:
Jonas Waeber's avatar
Jonas Waeber committed
45
              name: "{{ .Values.deploymentName}}-app-config"
46 47 48
          volumeMounts:
          - name: instituion-type-labels
            mountPath: "/configs/institution_types/"
49 50
          - name: document-type-labels
            mountPath: "/configs/document_types/"
51 52
          - name: access-term-labels
            mountPath: "/configs/access_terms/"
53
          - name: reuse-statement-labels
Jonas Waeber's avatar
Jonas Waeber committed
54
            mountPath: "/configs/reuse_statements/"
55 56 57 58
      volumes:
        - name: instituion-type-labels
          configMap:
            name: "{{ .Values.instutionTypeLabels }}"
59 60 61
        - name: document-type-labels
          configMap:
            name: "{{ .Values.documentTypeLabels }}"
62 63 64
        - name: access-term-labels
          configMap:
            name: "{{ .Values.accessTermLabels }}"
65 66 67
        - name: reuse-statement-labels
          configMap:
            name: "{{ .Values.reuseStatementLabels }}"
Jonas Waeber's avatar
Jonas Waeber committed
68
      restartPolicy: Always