mirror of https://github.com/k3s-io/k3s
Fix update.sh
parent
668d8539b8
commit
9f5ca3f6ac
|
@ -23,7 +23,7 @@ if [[ "${DOCKER_HUB_USER+set}" != "set" ]] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
export KUBE_ROOT=$(dirname $0)/../..
|
||||
export KUBE_REPO_ROOT=${KUBE_REPO_ROOT-$(dirname $0)/../..}
|
||||
export KUBECTL=${KUBE_REPO_ROOT}/cluster/kubectl.sh
|
||||
|
||||
set -x
|
||||
|
|
|
@ -62,7 +62,7 @@ function validate() {
|
|||
# This template is unit-tested in kubec{tl|fg}, so if you change it, update the unit test.
|
||||
#
|
||||
# You can read about the syntax here: http://golang.org/pkg/text/template/
|
||||
template_string="{{and (exists . \"currentState\" \"info\" \"${CONTROLLER_NAME}\" \"state\" \"running\") (exists . \"currentState\" \"info\" \"net\" \"state\" \"running\")}}"
|
||||
template_string="{{and (exists . \"currentState\" \"info\" \"${CONTROLLER_NAME}\" \"state\" \"running\") (exists . \"currentState\" \"info\" \"POD\" \"state\" \"running\")}}"
|
||||
current_status=$($KUBECTL get pods "$id" -o template --template="${template_string}") || {
|
||||
if [[ $current_status =~ "pod \"${id}\" not found" ]]; then
|
||||
echo " $id no longer exists"
|
||||
|
@ -106,9 +106,6 @@ function validate() {
|
|||
|
||||
export DOCKER_HUB_USER=jlowdermilk
|
||||
|
||||
# Launch a container
|
||||
${KUBE_ROOT}/examples/update-demo/2-create-replication-controller.sh
|
||||
|
||||
function teardown() {
|
||||
echo "Cleaning up test artifacts"
|
||||
${KUBE_ROOT}/examples/update-demo/5-down.sh
|
||||
|
@ -116,6 +113,9 @@ function teardown() {
|
|||
|
||||
trap "teardown" EXIT
|
||||
|
||||
# Launch a container
|
||||
${KUBE_ROOT}/examples/update-demo/2-create-replication-controller.sh
|
||||
|
||||
validate 2 nautilus
|
||||
|
||||
${KUBE_ROOT}/examples/update-demo/3-scale.sh 1
|
||||
|
|
Loading…
Reference in New Issue