deployment.yaml 1.36 KB
Newer Older
1
2
3
4
apiVersion: apps/v1
kind: Deployment

metadata:
Jonas Waeber's avatar
Jonas Waeber committed
5
  name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-deployment"
6
7
  namespace: memobase
  labels:
Jonas Waeber's avatar
Jonas Waeber committed
8
    app: "{{ .Values.k8sName }}"
Jonas Waeber's avatar
Jonas Waeber committed
9
    environment: {{ .Values.k8sEnvironment }}
Jonas Waeber's avatar
Jonas Waeber committed
10
    group: {{ .Values.k8sGroupName }}
11
12
13
spec:
  selector:
    matchLabels:
Jonas Waeber's avatar
Jonas Waeber committed
14
15
16
      app: {{ .Values.k8sName }}
      environment: {{ .Values.k8sEnvironment }}
      group: {{ .Values.k8sGroupName }}
Jonas Waeber's avatar
Jonas Waeber committed
17
  replicas: {{ .Values.k8sReplicas }}
18
19
20
  template:
    metadata:
      labels:
Jonas Waeber's avatar
Jonas Waeber committed
21
        app: "{{ .Values.k8sName }}"
Jonas Waeber's avatar
Jonas Waeber committed
22
        environment: {{ .Values.k8sEnvironment }}
Jonas Waeber's avatar
Jonas Waeber committed
23
        group: {{ .Values.k8sGroupName }}
24
25
26
    spec:
      restartPolicy: Always
      containers:
Jonas Waeber's avatar
Jonas Waeber committed
27
      - name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-container"
28
29
        image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
        imagePullPolicy: Always
Jonas Waeber's avatar
Jonas Waeber committed
30
31
32
33
34
35
36
        resources:
          requests:
            cpu: "{{ .Values.k8sRequestsCpu }}"
            memory: "{{ .Values.k8sRequestsMemory }}"
          limits:
            cpu: "{{ .Values.k8sLimitsCpu }}"
            memory: "{{ .Values.k8sLimitsMemory }}"
37
38
39
40
        envFrom:
        - configMapRef:
            name: "{{ .Values.kafkaConfigs }}"
        - configMapRef:
Jonas Waeber's avatar
Jonas Waeber committed
41
            name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-config"