-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yaml
49 lines (49 loc) · 1.47 KB
/
deployment.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: winelist
spec:
replicas: 1
template:
metadata:
labels:
app: winelist
spec:
containers:
- image: gcr.io/kubehack/winelist:v5
name: winelist
ports:
- containerPort: 8080
protocol: TCP
env:
# These secrets are required to start the pod.
# [START cloudsql_secrets]
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: cloudsql
key: username
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql
key: password
# [END cloudsql_secrets]
- image: b.gcr.io/cloudsql-docker/gce-proxy:1.05
name: cloudsql-proxy
command: ["/cloud_sql_proxy", "--dir=/cloudsql",
"-instances=kubehack:us-central1:winedb=tcp:3306",
"-credential_file=/secrets/cloudsql/KubeHack-key.json"]
volumeMounts:
- name: cloudsql-oauth-credentials
mountPath: /secrets/cloudsql
readOnly: true
- name: ssl-certs
mountPath: /etc/ssl/certs
volumes:
- name: cloudsql-oauth-credentials
secret:
secretName: cloudsql-oauth-credentials
- name: ssl-certs
hostPath:
path: /etc/ssl/certs