deployment.yaml 1.4 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
6
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.deploymentName }}-deployment"
  namespace: memobase
  labels:
Jonas Waeber's avatar
Jonas Waeber committed
7
8
9
    app: "{{ .Values.deploymentName }}"
    environment: {{ .Values.k8sEnvironment }}
    group: "documents-import"
Jonas Waeber's avatar
Jonas Waeber committed
10
11
12
spec:
  selector:
    matchLabels:
Jonas Waeber's avatar
Jonas Waeber committed
13
      app: "{{ .Values.deploymentName }}"
Jonas Waeber's avatar
Jonas Waeber committed
14
15
16
17
  replicas: 1
  template:
    metadata:
      labels:
Jonas Waeber's avatar
Jonas Waeber committed
18
        app: "{{ .Values.deploymentName }}"
Jonas Waeber's avatar
Jonas Waeber committed
19
        environment: {{ .Values.k8sEnvironment }}
Jonas Waeber's avatar
Jonas Waeber committed
20
        group: "documents-import"
Jonas Waeber's avatar
Jonas Waeber committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    spec:
      containers:
        - name: "{{ .Values.deploymentName }}-container"
          image: "{{.Values.registry}}/{{ .Values.image }}:{{ .Values.tag }}"
          imagePullPolicy: Always
          resources:
            requests:
              cpu: "{{ .Values.k8sRequestsCpu }}"
              memory: "{{ .Values.k8sRequestsMemory }}"
            limits:
              cpu: "{{ .Values.k8sLimitsCpu }}"
              memory: "{{ .Values.k8sLimitsMemory }}"
          envFrom:
          - configMapRef:
              name: "{{ .Values.kafkaConfigs }}"
          - configMapRef:
              name: "{{ .Values.deploymentName}}-app-config"
Jonas Waeber's avatar
Jonas Waeber committed
38
39
          volumeMounts:
            - name: {{ .Values.whitelistFileConfig }}
Jonas Waeber's avatar
Jonas Waeber committed
40
              mountPath: "/configs"
Jonas Waeber's avatar
Jonas Waeber committed
41
42
43
44
      volumes:
        - name: {{ .Values.whitelistFileConfig }}
          configMap:
            name: {{ .Values.whitelistFileConfig }}
Jonas Waeber's avatar
Jonas Waeber committed
45
      restartPolicy: Always