Skip to content

Commit

Permalink
exit gracefully if the namespace already exists (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreat authored Nov 15, 2022
1 parent 93d7708 commit 172f81a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,13 @@ then

echo "-- Create namespace ${INPUT_NAMESPACE}"
# Don't sweat it if the namespace already exists.
k create ns "${INPUT_NAMESPACE}" || echo "Namespace already exists"
if k create ns "${INPUT_NAMESPACE}"
then
echo "Namespace created"
else
echo "Namespace already exists"
exit 0
fi

auth_header="Authorization: Bearer ${INPUT_RANCHER_TOKEN}"

Expand Down

0 comments on commit 172f81a

Please sign in to comment.