Merge pull request #66834 from brandondr96/nscheck

Automatic merge from submit-queue (batch tested with PRs 62727, 66834). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added check for namespace file

**What this PR does / why we need it**:
This PR cleans up a bit of the code in the iks/shutdown file, so that is checks for a possible file prior to attempting to delete it. It is a very minor fix.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
This was not previously labelled as an issue.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-08-07 10:17:58 -07:00 committed by GitHub
commit 7a90141796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -34,6 +34,9 @@ rm -rf "${RESOURCE_DIRECTORY}/addons"
# Remove clusters, namespaces, and deployments
delete-clusters
bash ${RESOURCE_DIRECTORY}/iks-namespacelist.sh
rm -f ${RESOURCE_DIRECTORY}/iks-namespacelist.sh
if [[ -f "${RESOURCE_DIRECTORY}/iks-namespacelist.sh" ]] ; then
bash ${RESOURCE_DIRECTORY}/iks-namespacelist.sh
rm -f ${RESOURCE_DIRECTORY}/iks-namespacelist.sh
fi
echo -e "${color_blue}EXECUTION COMPLETE${color_norm}"
exit 0