From 69ff7a77496f7e5c7809b9698f85c671c5413d19 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 25 Mar 2019 15:40:44 +0100 Subject: [PATCH] [scripts] Cleanup intermediate files The installation scripts should not leave behind unused files created during their run, but instead remove them on success: - index.html, nginx-app.yaml generated by nginx testing; - tiller-rba.yaml generated by tiller install; Change-Id: Iebbfb13e0da6f9657dad65dc34cf62147210c487 Signed-off-by: Alexandru Avadanii --- src/foundation/scripts/helm.sh | 1 + src/foundation/scripts/nginx.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/foundation/scripts/helm.sh b/src/foundation/scripts/helm.sh index 3f575d2..ccd32ae 100755 --- a/src/foundation/scripts/helm.sh +++ b/src/foundation/scripts/helm.sh @@ -42,3 +42,4 @@ EOF kubectl create -f "${TILLER_SA_RBAC}" helm init --service-account tiller --tiller-image="jessestuart/tiller:${VERSION}" fi +rm -f "${TILLER_SA_RBAC}" diff --git a/src/foundation/scripts/nginx.sh b/src/foundation/scripts/nginx.sh index 40a9377..307371b 100755 --- a/src/foundation/scripts/nginx.sh +++ b/src/foundation/scripts/nginx.sh @@ -57,8 +57,9 @@ done svcip=$(kubectl get services nginx -o json | grep clusterIP | cut -f4 -d'"') sleep 10 -wget "http://$svcip" +wget -O /dev/null "http://$svcip" kubectl delete -f "${NGINX_APP}" +rm -f "${NGINX_APP}" kubectl get rc kubectl get pods kubectl get services -- 2.16.6