forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlproxy.yaml
59 lines (59 loc) · 1.23 KB
/
sqlproxy.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: extensions/v1beta1
kind: Deployment
metadata:
name: sqlproxy
labels:
app: sqlproxy
spec:
replicas: 1
template:
metadata:
labels:
app: sqlproxy
spec:
containers:
- image: gcr.io/cloudsql-docker/gce-proxy:1.06
name: sqlproxy
command:
- /cloud_sql_proxy
- -dir=/cloudsql
- -instances=$(INSTANCES)
- -credential_file=/credentials/credential.json
resources:
requests:
cpu: 0m
env:
- name: INSTANCES
valueFrom:
secretKeyRef:
name: sqlproxy
key: instances
ports:
- name: sqlproxy-port
containerPort: 3306
volumeMounts:
- mountPath: /cloudsql
name: cloudsql
- mountPath: /credentials
name: service-account-token
readOnly: true
volumes:
- name: cloudsql
emptyDir:
- name: service-account-token
secret:
secretName: service-account-token
---
apiVersion: v1
kind: Service
metadata:
labels:
app: sqlproxy
name: sqlproxy
spec:
ports:
- name: sqlport
port: 3306
targetPort: sqlproxy-port
selector:
app: sqlproxy