-
Notifications
You must be signed in to change notification settings - Fork 5
/
pollsapi.yml
78 lines (77 loc) · 1.98 KB
/
pollsapi.yml
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
apiVersion: v1
kind: Service
metadata:
name: polls-api
spec:
type: NodePort
ports:
- name: polls-api
port: 8000
targetPort: 8000
protocol: TCP
selector:
app: pollsapi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: polls-api
spec:
replicas: 1
revisionHistoryLimit: 2
template:
metadata:
labels:
name: polls-api
app: pollsapi
spec:
containers:
- name: django-polls-rest
image: gcr.io/test-gcp-208915/django-polls-rest:v1.0.0
resources:
requests:
cpu: 125m
memory: 100Mi
limits:
cpu: 200m
memory: 200Mi
imagePullPolicy: Always
env:
- name: GS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: pollsapi-static-serve
key: gs_access_key_id
- name: GS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: pollsapi-static-serve
key: gs_secret_access_key
- name: GS_BUCKET_NAME
valueFrom:
secretKeyRef:
name: pollsapi-static-serve
key: gs_bucket_name
- name: POSTGRES_DB
value: pollsdb
- name: POSTGRES_USER
value: polls_admin
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: pollsdb-postgresql
key: postgres-password
- name: POLLSAPI_PG_HOST
value: pollsdb-postgresql.databases.svc.cluster.local
- name: POLLSAPI_PROXY_ACCESS_LOG
value: "/dev/stdout"
- name: POLLSAPI_ADMIN_ACCESS_LOG
value: "/dev/stdout"
- name: POLLSAPI_PROXY_ERROR_LOG
value: "/dev/stderr"
- name: POLLSAPI_ADMIN_ERROR_LOG
value: "/dev/stderr"
ports:
- name: polls-test-api
containerPort: 8000
protocol: TCP