-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.yaml
59 lines (59 loc) · 1.35 KB
/
web.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: v1
kind: Service
metadata:
name: web-service
spec:
type: NodePort
selector:
app: web
ports:
- protocol: TCP
port: 3000
targetPort: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-deployment
labels:
app: web
spec:
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: [IMAGE_NAME]
ports:
- containerPort: 3000
env:
- name: RAILS_ENV
value: production
- name: ENV_FILE
value: /app-secrets/env
volumeMounts:
- name: app-secrets
mountPath: /app-secrets
readOnly: true
- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: ["/cloud_sql_proxy",
"-instances=[INSTANCE_CONNECTION_NAME]=tcp:5432",
"-credential_file=/cloudsql-secrets/credentials.json"]
volumeMounts:
- name: cloudsql-secrets
mountPath: /cloudsql-secrets
readOnly: true
volumes:
- name: app-secrets
secret:
secretName: app-secrets
- name: cloudsql-secrets
secret:
secretName: cloudsql-secrets