Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Pass args to execd mysqlsh in the container
Browse files Browse the repository at this point in the history
  • Loading branch information
prydie committed May 8, 2018
1 parent ac26dd7 commit 8968b32
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hack/mysqlsh-py.sh → hack/mysqlsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#
# Gets an interactive Python based mysqlsh on the given instance.

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <namespace/podname>"
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <namespace/podname> [args]"
echo "example: $0 default/my-cluster-0 --py"
exit 1
fi

Expand All @@ -17,4 +18,4 @@ kubectl exec \
-it \
-c mysql-agent \
${POD} -- /bin/sh \
-c "PS1='\u@\h:\w\$ ' mysqlsh --no-wizard --uri ${URI} --py"
-c "PS1='\u@\h:\w\$ ' mysqlsh --no-wizard --uri ${URI} ${@:2}"

0 comments on commit 8968b32

Please sign in to comment.