mirror of https://github.com/k3s-io/k3s
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
commit
7a90141796
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue