mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +00:00
Merge pull request #1335 from dchen1107/exit1
Convert existing kubernetes system to use ContainerStatus, instead of
This commit is contained in:
@@ -50,7 +50,7 @@ while [ $ALL_RUNNING -ne 1 ]; do
|
||||
ALL_RUNNING=1
|
||||
for id in $POD_ID_LIST; do
|
||||
CURRENT_STATUS=$($KUBECFG -template '{{and .CurrentState.Info.mynginx.State.Running .CurrentState.Info.net.State.Running}}' get pods/$id)
|
||||
if [ "$CURRENT_STATUS" != "true" ]; then
|
||||
if [ "$CURRENT_STATUS" != "{}" ]; then
|
||||
ALL_RUNNING=0
|
||||
fi
|
||||
done
|
||||
|
@@ -40,10 +40,10 @@ function validate() {
|
||||
for id in $POD_ID_LIST; do
|
||||
TEMPLATE_STRING="{{and ((index .CurrentState.Info \"${CONTROLLER_NAME}\").State.Running) .CurrentState.Info.net.State.Running}}"
|
||||
CURRENT_STATUS=$($KUBECFG -template "${TEMPLATE_STRING}" get pods/$id)
|
||||
if [ "$CURRENT_STATUS" != "true" ]; then
|
||||
if [ "$CURRENT_STATUS" != "{}" ]; then
|
||||
ALL_RUNNING=0
|
||||
else
|
||||
CURRENT_IMAGE=$($KUBECFG -template "{{(index .CurrentState.Info \"${CONTROLLER_NAME}\").Config.Image}}" get pods/$id)
|
||||
CURRENT_IMAGE=$($KUBECFG -template "{{(index .CurrentState.Info \"${CONTROLLER_NAME}\").DetailInfo.Config.Image}}" get pods/$id)
|
||||
if [ "$CURRENT_IMAGE" != "${DOCKER_HUB_USER}/update-demo:${CONTAINER_IMAGE_VERSION}" ]; then
|
||||
ALL_RUNNING=0
|
||||
fi
|
||||
|
Reference in New Issue
Block a user