partition-deploy.yml 1.16 KB
Newer Older
Oleksii Tsyganov (EPAM)'s avatar
Oleksii Tsyganov (EPAM) committed
1
2
3
4
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.conf.app_name }}"
5
  namespace: "{{ .Release.Namespace }}"
Oleksii Tsyganov (EPAM)'s avatar
Oleksii Tsyganov (EPAM) committed
6
7
8
9
10
11
12
13
14
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "{{ .Values.conf.app_name }}"
  template:
    metadata:
      labels:
        app: "{{ .Values.conf.app_name }}"
15
16
      annotations:
        rollme: {{ randAlphaNum 5 | quote }}
Oleksii Tsyganov (EPAM)'s avatar
Oleksii Tsyganov (EPAM) committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    spec:
      containers:
        - image: "{{ .Values.data.image }}"
          imagePullPolicy: Always
          name: "{{ .Values.conf.app_name }}"
          env:
            - name: "ACCEPT_HTTP"
              value: "true"
          envFrom:
          - configMapRef:
              name: "{{ .Values.conf.configmap }}"
          securityContext:
            allowPrivilegeEscalation: false
            runAsUser: 0
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: "{{ .Values.data.requests_cpu }}"
              memory: "{{ .Values.data.requests_memory }}"
            limits:
              cpu: "{{ .Values.data.limits_cpu }}"
              memory: "{{ .Values.data.limits_memory }}"
      serviceAccountName: "{{ .Values.data.serviceAccountName }}"