Skip to content

Commit

Permalink
Merge branches 'w/2.6/improvement/1687-test-restore-in-ci' and 'q/206…
Browse files Browse the repository at this point in the history
…1/2.5/improvement/1687-test-restore-in-ci' into tmp/octopus/q/2.6
  • Loading branch information
bert-e committed Jun 2, 2020
3 parents 64eb509 + c7a3072 + c21747d commit a6756c5
Show file tree
Hide file tree
Showing 13 changed files with 411 additions and 90 deletions.
13 changes: 7 additions & 6 deletions eve/create-volumes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ check_pod_is_in_phase() {
[[ $phase = "$expected_phase" ]]
}

BOOTSTRAP_NODE_NAME=${BOOTSTRAP_NODE_NAME:-$(salt-call --local --out txt grains.get id | cut -c 8-)}
NODE_NAME=${NODE_NAME:-$(salt-call --local --out txt grains.get id | cut -c 8-)}
PRODUCT_TXT=${PRODUCT_TXT:-/vagrant/_build/root/product.txt}
MAX_TRIES=300

Expand All @@ -55,17 +55,18 @@ KUBECONFIG=${KUBECONFIG:-/etc/kubernetes/admin.conf}
export KUBECONFIG

echo "Creating storage volumes"
sed "s/BOOTSTRAP_NODE_NAME/${BOOTSTRAP_NODE_NAME}/" "${PRODUCT_MOUNT}/examples/prometheus-sparse.yaml" | \
sed "s/NODE_NAME/${NODE_NAME}/" \
"${PRODUCT_MOUNT}/examples/prometheus-sparse.yaml" | \
kubectl apply -f -

echo "Waiting for PV 'bootstrap-alertmanager' to be provisioned"
if ! retry "$MAX_TRIES" check_pv_exists bootstrap-alertmanager; then
echo "Waiting for PV '$NODE_NAME-alertmanager' to be provisioned"
if ! retry "$MAX_TRIES" check_pv_exists "$NODE_NAME-alertmanager"; then
echo "PV not created"
exit 1
fi

echo "Waiting for PV 'bootstrap-prometheus' to be provisioned"
if ! retry "$MAX_TRIES" check_pv_exists bootstrap-prometheus; then
echo "Waiting for PV '$NODE_NAME-prometheus' to be provisioned"
if ! retry "$MAX_TRIES" check_pv_exists "$NODE_NAME-prometheus"; then
echo "PV not created"
exit 1
fi
Expand Down
Loading

0 comments on commit a6756c5

Please sign in to comment.