-
Notifications
You must be signed in to change notification settings - Fork 0
/
tal-backend.yaml
82 lines (77 loc) · 2 KB
/
tal-backend.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# [START kubernetes_deployment]
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tal-backend
labels:
app: tal-backend
spec:
template:
metadata:
labels:
app: tal-backend
spec:
containers:
- name: tal-backend
image: gcr.io/arabic-historical-dictionary/tal-backend
env:
- name: DATABASE_USER
valueFrom:
secretKeyRef:
name: cloudsql
key: username
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql
key: password
volumeMounts:
- name: tal-disk
mountPath: /root
ports:
- containerPort: 8080
- image: gcr.io/cloudsql-docker/gce-proxy:1.05
name: cloudsql-proxy
command: ["/cloud_sql_proxy", "--dir=/cloudsql",
"-instances=arabic-historical-dictionary:us-central1:tal-sql=tcp:5432",
"-credential_file=/secrets/cloudsql/credentials.json"]
volumeMounts:
- name: cloudsql-oauth-credentials
mountPath: /secrets/cloudsql
readOnly: true
- name: ssl-certs
mountPath: /etc/ssl/certs
- name: cloudsql
mountPath: /cloudsql
volumes:
- name: cloudsql-oauth-credentials
secret:
secretName: cloudsql-oauth-credentials
- name: ssl-certs
hostPath:
path: /etc/ssl/certs
- name: cloudsql
emptyDir:
- name: tal-disk
gcePersistentDisk:
# This disk must already exist.
pdName: tal-disk-europe
readOnly: true
fsType: ext4
# [END kubernetes_deployment]
---
# [START service]
apiVersion: v1
kind: Service
metadata:
name: tal-backend
labels:
app: tal-backend
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: tal-backend
# [END service]