forked from CityOfZion/neo-scan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment-psql.yaml
36 lines (36 loc) · 947 Bytes
/
deployment-psql.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: psql
labels:
app: psql
spec:
template:
metadata:
labels:
app: psql
spec:
containers:
- name: psql
image: governmentpaas/psql
stdin: true
tty: true
- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: ["/cloud_sql_proxy",
"-instances=$(DB_INSTANCE)=tcp:5432",
"-credential_file=/secrets/cloudsql/credentials.json"]
env:
- name: DB_INSTANCE
valueFrom:
secretKeyRef:
name: cloudsql-db-credentials
key: instance
volumeMounts:
- name: cloudsql-instance-credentials
mountPath: /secrets/cloudsql
readOnly: true
volumes:
- name: cloudsql-instance-credentials
secret:
secretName: cloudsql-instance-credentials