exec-as will fail if username not in lowercase
stepanselyuk opened this issue · comments
Stepan Seliuk commented
Hello,
kubectl-plugins/kubectl-exec-as
Line 88 in 98ee115
Locally I modified it as:
test "$(exec "${KUBECTL}" get po "$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-1" 2>/dev/null)" && container="$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-2" || container="$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-1"
Jordan Wilson commented
@stepanselyuk nice catch! As soon as I have time, I'll create a PR to test and merge your change in. Thanks!
marcomancusooutra commented
This has not been fixed yet