Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't try to use shutdown gateways #116

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion chaos-workers/chaos-experiments/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ function runOnAllBrokers()
{
namespace=$(getNamespace)

# disable word splitting check, word splitting is necessary for broker labels
# shellcheck disable=SC2046
pods=$(kubectl get pod -n "$namespace" $(getBrokerLabels) -o jsonpath="{.items[*].metadata.name}")

set +e
Expand All @@ -53,6 +55,8 @@ function getBroker()
index=${1:-0}

namespace=$(getNamespace)
# disable word splitting check, word splitting is necessary for broker labels
# shellcheck disable=SC2046
pod=$(kubectl get pod -n "$namespace" $(getBrokerLabels) -o jsonpath="{.items[$index].metadata.name}")

echo "$pod"
Expand All @@ -61,7 +65,9 @@ function getBroker()
function getGateway()
{
namespace=$(getNamespace)
pod=$(kubectl get pod -n "$namespace" $(getGatewayLabels) -o jsonpath="{.items[0].metadata.name}")
# disable word splitting check, word splitting is necessary for gateway labels
# shellcheck disable=SC2046
pod=$(kubectl get pod -n "$namespace" --field-selector status.phase=Running $(getGatewayLabels) -o jsonpath="{.items[0].metadata.name}")

echo "$pod"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ else
# Wait until all gateway pods are running. We cannot use `--for=condition=Ready` pod for gateway because
# this check also includes the evicted pods as long as they are not deleted. Evicted pods are not immediately
# deleted by kuberenetes. The following check passes only if all pods are running, and excludes evicted pods.
kubectl wait --for=condition=Available deployment $namespace-zeebe-gateway --timeout=120s -n "$namespace"
kubectl wait --for=condition=Available deployment "$namespace-zeebe-gateway" --timeout=120s -n "$namespace"
fi