deployment.yaml 1.34 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.deploymentName }}-deployment"
  namespace: memobase
  labels:
    app: "{{ .Values.deploymentName }}-deployment"
spec:
  selector:
    matchLabels:
      app: "{{ .Values.deploymentName }}-deployment"
  replicas: 1
  template:
    metadata:
      labels:
        app: "{{ .Values.deploymentName }}-deployment"
        environment: {{ .Values.k8sEnvironment }}
    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
35
36
37
38
39
40
41
          volumeMounts:
            - name: {{ .Values.whitelistFileConfig }}
              mountPath: {{ .Values.whitelistFilePath }}
      volumes:
        - name: {{ .Values.whitelistFileConfig }}
          configMap:
            name: {{ .Values.whitelistFileConfig }}
Jonas Waeber's avatar
Jonas Waeber committed
42
      restartPolicy: Always