From e96bdd9fb6235573acf5d4d1d019dca1e1446b7d Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Mon, 15 Jul 2019 20:03:02 -0500 Subject: [PATCH] Ingress: Clean up tmp dir entirely on container start This PS cleans up the container dir entirely on container restart, as sometimes remnets of previous runs can cause issues. Change-Id: I873667a8a57bca6096cbe777ee83ef8648a368d4 Signed-off-by: Pete Birley --- ingress/templates/bin/_ingress-controller.sh.tpl | 2 +- mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ingress/templates/bin/_ingress-controller.sh.tpl b/ingress/templates/bin/_ingress-controller.sh.tpl index 550c57c51..a484e98d0 100644 --- a/ingress/templates/bin/_ingress-controller.sh.tpl +++ b/ingress/templates/bin/_ingress-controller.sh.tpl @@ -20,7 +20,7 @@ set -ex COMMAND="${@:-start}" function start () { - rm -fv /tmp/prometheus-nginx.socket + find /tmp/ -maxdepth 1 -writable | grep -v "^/tmp/$" | xargs -L1 -r rm -rfv exec /usr/bin/dumb-init \ /nginx-ingress-controller \ {{- if eq .Values.deployment.mode "namespace" }} diff --git a/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl b/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl index 903c947fa..1d12a4ac2 100644 --- a/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl +++ b/mariadb/templates/bin/_mariadb-ingress-controller.sh.tpl @@ -20,7 +20,7 @@ set -ex COMMAND="${@:-start}" function start () { - rm -fv /tmp/prometheus-nginx.socket + find /tmp/ -maxdepth 1 -writable | grep -v "^/tmp/$" | xargs -L1 -r rm -rfv exec /usr/bin/dumb-init \ /nginx-ingress-controller \ --force-namespace-isolation \