From 3920e97e07d21c8fa414ff85479cd81eab586883 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Fri, 15 Sep 2023 14:17:24 +0800 Subject: [PATCH] fix: mysql terminated --- dev-upgrade/mongo/mongo.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dev-upgrade/mongo/mongo.yaml b/dev-upgrade/mongo/mongo.yaml index 2466248..98afb0d 100644 --- a/dev-upgrade/mongo/mongo.yaml +++ b/dev-upgrade/mongo/mongo.yaml @@ -13,6 +13,19 @@ spec: labels: app: mongo spec: + initContainers: + - name: init + image: busybox + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + sysctl -w net.ipv4.tcp_keepalive_time=300 + sysctl -w net.ipv4.tcp_keepalive_intvl=10 + sysctl -w net.ipv4.tcp_keepalive_probes=3 + securityContext: + privileged: true containers: - name: mongo image: mongo:6.0.6