diff --git a/deploy/with-rbac.yaml b/deploy/with-rbac.yaml index 537939499..57aac0b6a 100644 --- a/deploy/with-rbac.yaml +++ b/deploy/with-rbac.yaml @@ -17,6 +17,16 @@ spec: prometheus.io/scrape: 'true' spec: serviceAccountName: nginx-ingress-serviceaccount + initContainers: + - command: + - sh + - -c + - sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535" + image: alpine:3.6 + imagePullPolicy: IfNotPresent + name: sysctl + securityContext: + privileged: true containers: - name: nginx-ingress-controller image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.0 diff --git a/deploy/without-rbac.yaml b/deploy/without-rbac.yaml index a6741d768..4871359ad 100644 --- a/deploy/without-rbac.yaml +++ b/deploy/without-rbac.yaml @@ -16,6 +16,16 @@ spec: prometheus.io/port: '10254' prometheus.io/scrape: 'true' spec: + initContainers: + - command: + - sh + - -c + - sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535" + image: alpine:3.6 + imagePullPolicy: IfNotPresent + name: sysctl + securityContext: + privileged: true containers: - name: nginx-ingress-controller image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.0 diff --git a/test/e2e/wait-for-nginx.sh b/test/e2e/wait-for-nginx.sh index 19e4d5ebb..fc309c159 100755 --- a/test/e2e/wait-for-nginx.sh +++ b/test/e2e/wait-for-nginx.sh @@ -45,7 +45,7 @@ function waitForPod() { export -f waitForPod -timeout 10s bash -c waitForPod +timeout 30s bash -c waitForPod if kubectl get pods -n ingress-nginx -l app=ingress-nginx -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; then