entitlements-deploy.yml 1.18 KB
Newer Older
vladislav's avatar
vladislav 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
35
36
37
38
39
40
41
42
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.conf.app_name }}"
  namespace: "{{ .Release.Namespace }}"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "{{ .Values.conf.app_name }}"
  template:
    metadata:
      labels:
        app: "{{ .Values.conf.app_name }}"
    spec:
      containers:
      - image: "{{ .Values.data.image }}"
        imagePullPolicy: Always
        name: "{{ .Values.conf.app_name }}"
        envFrom:
        - configMapRef:
            name: "{{ .Values.conf.configmap }}"
        - secretRef:
            name: "{{ .Values.conf.secret_name }}"
      - image: "gcr.io/cloudsql-docker/gce-proxy:{{ .Values.data.cloud_sql_proxy_version }}"
        name: cloud-sql-proxy
        command:
          - /cloud_sql_proxy
          - "-instances={{ .Values.data.sql_connection_string }}=tcp:5432"
        securityContext:
          allowPrivilegeEscalation: false
          runAsUser: 0
        ports:
        - containerPort: 8080
        resources:
          requests:
            cpu: "0.25"
            memory: "128M"
          limits:
            cpu: "1"
            memory: "1G"
      serviceAccountName: "{{ .Values.data.serviceAccountName }}"