deploy.yml 1.06 KB
Newer Older
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
35
36
37
38
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: "{{ .Values.conf.app_name }}"
  name: "{{ .Values.conf.app_name }}"
  namespace: "{{ .Release.Namespace }}"
spec:
  selector:
    matchLabels:
      app: "{{ .Values.conf.app_name }}"
  replicas: 1
  template:
    metadata:
      labels:
        app: "{{ .Values.conf.app_name }}"
      annotations:
        rollme: {{ randAlphaNum 5 | quote }}
    spec:
      containers:
      - name: "{{ .Values.conf.app_name }}"
        image: "{{ .Values.data.image }}"
        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 }}"