life embetterment
This commit is contained in:
parent
ff57f07a37
commit
8f1ecdbfee
5 changed files with 4 additions and 25 deletions
bin
20
bin/ktoolbox
20
bin/ktoolbox
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
name=toolbox-${USER}
|
||||
image='dlneintr/toolbox:latest'
|
||||
labels="app=toolbox,owner=${USER},cookie=0xdeadbeef"
|
||||
|
||||
existing=$(kubectl get pod -l ${labels} --output='jsonpath={.items..metadata.name}')
|
||||
|
||||
if [ "${existing}" == "" ]; then
|
||||
kubectl run --image=${image} --image-pull-policy=Always --labels=${labels} ${name}
|
||||
fi
|
||||
|
||||
for i in {1..10}; do
|
||||
ready=$(kubectl get pod --field-selector=status.phase=Running -l ${labels} --output='jsonpath={.items..metadata.name}')
|
||||
if [ "${ready}" != "" ]; then
|
||||
exec kubectl exec -it ${ready} /bin/sh
|
||||
fi
|
||||
echo "Waiting for pod to be ready"
|
||||
sleep 1
|
||||
done
|
1
bin/ktoolbox
Symbolic link
1
bin/ktoolbox
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/dln/src/github.com/dln/ktoolbox/ktoolbox
|
Loading…
Add table
Add a link
Reference in a new issue