Skip to content

Commit

Permalink
Improve plugin semantics
Browse files Browse the repository at this point in the history
Once the plugin has done its work, it should replace itself with `kubectl` (or the next plugin in the chain).
  • Loading branch information
jfoy authored May 7, 2021
1 parent 8161391 commit cdf2bba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bash/kubectl-sudo
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ do
done

if [ -z "${PLUGIN_NAME}" ]; then
kubectl --as=${USER} --as-group=system:masters "$@"
exec kubectl --as=${USER} --as-group=system:masters "$@"
else
kubectl ${PLUGIN_NAME} --as=${USER} --as-group=system:masters ${NEW_ARGS}
exec kubectl ${PLUGIN_NAME} --as=${USER} --as-group=system:masters ${NEW_ARGS}
fi

0 comments on commit cdf2bba

Please sign in to comment.