Skip to content

Commit b08f400

Browse files
committed
patch coredns memory resources on ovh
default limit seems to get OOMKilled after our ban patches
1 parent d28b1cc commit b08f400

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

deploy.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,28 @@ def setup_certmanager():
245245
subprocess.check_call(helm_upgrade)
246246

247247

248+
def patch_coredns():
249+
"""Patch coredns resource allocation
250+
251+
OVH2 coredns does not have sufficient memory by default after our ban patches
252+
"""
253+
print(BOLD + GREEN + "Patching coredns resources" + NC, flush=True)
254+
subprocess.check_call(
255+
[
256+
"kubectl",
257+
"set",
258+
"resources",
259+
"-n",
260+
"kube-system",
261+
"deployments/coredns",
262+
"--limits",
263+
"memory=250Mi",
264+
"--requests",
265+
"memory=200Mi",
266+
]
267+
)
268+
269+
248270
def main():
249271
# parse command line args
250272
argparser = argparse.ArgumentParser()
@@ -312,6 +334,7 @@ def main():
312334

313335
if cluster.startswith("ovh"):
314336
setup_auth_ovh(args.release, cluster)
337+
patch_coredns()
315338
elif cluster in AZURE_RGs:
316339
setup_auth_turing(cluster)
317340
elif cluster in GCP_PROJECTS:

0 commit comments

Comments
 (0)