-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb-error-experiments-sqlproxy.yaml
More file actions
144 lines (144 loc) · 4.31 KB
/
Copy pathdb-error-experiments-sqlproxy.yaml
File metadata and controls
144 lines (144 loc) · 4.31 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: db-error-experiment-sqlproxy
namespace: stage
labels:
subdomain: stage
spec:
replicas: 10
selector:
matchLabels:
name: db-error-experiment
revisionHistoryLimit: 3
template:
metadata:
labels:
name: db-error-experiment
spec:
containers:
- name: db-error-experiment-nosqlproxy
image: gcr.io/REDACTED_PROJECT_NAME/db-error-experiment
imagePullPolicy: Always
env:
- name: DO_INITIALIZATION
value: "false"
- name: DB_TABLE_PREFIX
value: "nosqlproxy_"
- name: DB_HOST
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_HOST
- name: DB_PORT
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_PORT
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_PASSWORD
- name: DB_DATABASE
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_DATABASE
- name: DB_USER
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_USER
command: ["python"]
args: ["/db.py"]
resources:
requests:
cpu: 200m
memory: 750Mi
limits:
cpu: 350m
memory: 1500Mi
- name: ping
image: gcr.io/REDACTED_PROJECT_NAME/db-error-experiment
imagePullPolicy: Always
command: ["/bin/bash"]
args: ["-c", "while :; do ping -c 1 -q REDACTED_DATABASE_PUBLIC_IP ; sleep 0.2 ; done"]
resources:
requests:
cpu: 10m
memory: 10Mi
limits:
cpu: 100m
memory: 50Mi
- name: db-error-experiment-sqlproxy
image: gcr.io/REDACTED_PROJECT_NAME/db-error-experiment
imagePullPolicy: Always
env:
- name: DO_INITIALIZATION
value: "false"
- name: DB_TABLE_PREFIX
value: "sqlproxy_"
- name: DB_HOST
value: "127.0.0.1"
- name: DB_PORT
value: "5432"
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_PASSWORD
- name: DB_DATABASE
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_DATABASE
- name: DB_USER
valueFrom:
secretKeyRef:
name: "db-error-experiment-secrets"
key: DB_USER
command: ["python"]
args: ["/db.py"]
resources:
requests:
cpu: 200m
memory: 750Mi
limits:
cpu: 350m
memory: 1500Mi
- name: cloudsql-proxy
image: "gcr.io/cloudsql-docker/gce-proxy:1.14"
command:
- /cloud_sql_proxy
- --dir=/cloudsql
- -instances=REDACTED_PROJECT_NAME:us-east1:REDACTED_DB_INSTANCE_NAME=tcp:0.0.0.0:5432
- -credential_file=/secrets/cloudsql/credentials.json
- -term_timeout=10s
ports:
- containerPort: 5432
name: database-port
volumeMounts:
- name: sql-client-sa
mountPath: /secrets/cloudsql
readOnly: true
- name: ssl-certs
mountPath: /etc/ssl/certs
- name: cloudsql
mountPath: /cloudsql
resources:
limits:
cpu: 800m
memory: 800Mi
requests:
cpu: 200m
memory: 200Mi
volumes:
- name: sql-client-sa
secret:
secretName: sql-client-sa
- name: cloudsql
emptyDir:
- name: ssl-certs
hostPath:
path: /etc/ssl/certs