From 15ffb51394bb22e435bb04dd234199c8c28fd37e Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Sat, 26 May 2018 11:08:38 -0400 Subject: [PATCH] Enable core dumps during tests (#2570) --- test/manifests/ingress-controller/mandatory.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/manifests/ingress-controller/mandatory.yaml b/test/manifests/ingress-controller/mandatory.yaml index a587627ef..15af034c2 100644 --- a/test/manifests/ingress-controller/mandatory.yaml +++ b/test/manifests/ingress-controller/mandatory.yaml @@ -226,6 +226,18 @@ spec: spec: terminationGracePeriodSeconds: 0 serviceAccountName: nginx-ingress-serviceaccount + initContainers: + - name: enable-coredump + image: busybox + command: + - /bin/sh + - -c + - | + ulimit -c unlimited + echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern + sysctl -w fs.suid_dumpable=2 + securityContext: + privileged: true containers: - name: nginx-ingress-controller image: ingress-controller/nginx-ingress-controller:dev @@ -271,4 +283,4 @@ spec: successThreshold: 1 timeoutSeconds: 1 securityContext: - runAsNonRoot: false + privileged: true