deployment.yaml 1.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 }}"
17
18
      annotations:
        rollme: {{ randAlphaNum 5 | quote }}
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    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 }}"