[scripts] Cleanup intermediate files 05/505/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 25 Mar 2019 14:40:44 +0000 (15:40 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 25 Mar 2019 14:43:49 +0000 (15:43 +0100)
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 <Alexandru.Avadanii@enea.com>
src/foundation/scripts/helm.sh
src/foundation/scripts/nginx.sh

index 3f575d2..ccd32ae 100755 (executable)
@@ -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}"
index 40a9377..307371b 100755 (executable)
@@ -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