-
Notifications
You must be signed in to change notification settings - Fork 0
/
hiss.yaml
96 lines (93 loc) · 2.46 KB
/
hiss.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hiss
labels:
app: hiss
spec:
replicas: 1
template:
metadata:
labels:
app: hiss
spec:
containers:
- name: hiss-app
# Replace this with your project ID
image: gcr.io/tamuhack-prod/hiss:14b35fb
imagePullPolicy: Always
env:
- name: DATABASE_USER
valueFrom:
secretKeyRef:
name: cloudsql
key: username
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql
key: password
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: django-sk
key: secret_key
- name: MAILGUN_API_KEY
valueFrom:
secretKeyRef:
name: mailgun
key: apikey
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/storage-creds/django-storages-creds.json"
volumeMounts:
- name: django-storage-credentials
mountPath: /etc/storage-creds
readOnly: true
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /healthy/
port: 8080
readinessProbe:
httpGet:
path: /healthy/
port: 8080
- image: gcr.io/cloudsql-docker/gce-proxy:1.05
name: cloudsql-proxy
command: ["/cloud_sql_proxy", "--dir=/cloudsql",
"-instances=tamuhack-prod:us-central1:hiss=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: django-storage-credentials
secret:
secretName: django-storages-creds
---
apiVersion: v1
kind: Service
metadata:
name: hiss-nodeport-service
spec:
selector:
app: hiss
ports:
- protocol: TCP
port: 9000
targetPort: 8080
type: NodePort