Skip to content

Commit 54f6fa1

Browse files
committed
Add resource limits to the long running containers
Prevents accidental resource exhaustion Signed-off-by: Steve Wills <[email protected]>
1 parent a7110f2 commit 54f6fa1

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

deploy/compose/docker-compose.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ services:
114114

115115
tink-server:
116116
image: ${TINK_SERVER_IMAGE}
117+
deploy:
118+
resources:
119+
limits:
120+
cpus: "0.50"
121+
memory: "512M"
117122
restart: unless-stopped
118123
environment:
119124
FACILITY: ${FACILITY:-onprem}
@@ -173,6 +178,11 @@ services:
173178

174179
db:
175180
image: postgres:14-alpine
181+
deploy:
182+
resources:
183+
limits:
184+
cpus: "0.50"
185+
memory: "512M"
176186
restart: unless-stopped
177187
environment:
178188
POSTGRES_DB: tinkerbell
@@ -190,6 +200,11 @@ services:
190200

191201
tink-cli:
192202
image: ${TINK_CLI_IMAGE}
203+
deploy:
204+
resources:
205+
limits:
206+
cpus: "0.50"
207+
memory: "512M"
193208
restart: unless-stopped
194209
environment:
195210
TINKERBELL_GRPC_AUTHORITY: tink-server:42113
@@ -203,6 +218,11 @@ services:
203218
registry:
204219
image: registry:2.7.1
205220
init: true
221+
deploy:
222+
resources:
223+
limits:
224+
cpus: "0.50"
225+
memory: "512M"
206226
restart: unless-stopped
207227
network_mode: host
208228
healthcheck:
@@ -232,6 +252,11 @@ services:
232252

233253
boots:
234254
image: ${BOOTS_SERVER_IMAGE}
255+
deploy:
256+
resources:
257+
limits:
258+
cpus: "0.50"
259+
memory: "512M"
235260
restart: unless-stopped
236261
command: -dhcp-addr 0.0.0.0:67 -tftp-addr $TINKERBELL_HOST_IP:69 -http-addr $TINKERBELL_HOST_IP:80 -log-level DEBUG
237262
network_mode: host
@@ -264,6 +289,11 @@ services:
264289

265290
osie-bootloader:
266291
image: nginx:alpine
292+
deploy:
293+
resources:
294+
limits:
295+
cpus: "0.50"
296+
memory: "512M"
267297
restart: unless-stopped
268298
tty: true
269299
user: root
@@ -279,6 +309,11 @@ services:
279309

280310
hegel:
281311
image: ${HEGEL_SERVER_IMAGE}
312+
deploy:
313+
resources:
314+
limits:
315+
cpus: "0.50"
316+
memory: "512M"
282317
restart: unless-stopped
283318
environment:
284319
ROLLBAR_TOKEN: ${ROLLBAR_TOKEN-ignored}

0 commit comments

Comments
 (0)