Skip to content

Commit

Permalink
Retrying applying CRs in the e2e jobs.
Browse files Browse the repository at this point in the history
The webhook services are not always available right after the
deployments are ready. This is causing a race condition between the
services being ready to get requests and the CRs applied to the cluster.

By retrying to apply the CRs we can give the services the time they need
to become ready.

Signed-off-by: Yoni Bettan <[email protected]>
  • Loading branch information
ybettan committed Jan 12, 2025
1 parent 36447e9 commit 8156f88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/prow/e2e-hub-spoke-incluster-build
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ else
fi

# Apply resources
oc apply -k ci/e2e-hub
timeout 1m bash -c 'until oc apply -k ci/e2e-hub; do sleep 3; done'

# Wait for the build build to be created and completed
timeout 1m bash -c 'until oc -n ${HUB_OPERATOR_NAMESPACE} get builds -o json | jq -er ".items[].metadata.name | select(.? | match(\"build\"))"; do sleep 1; done'
Expand Down
2 changes: 1 addition & 1 deletion ci/prow/e2e-incluster-build
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ oc debug "node/${NODE}" -- chroot host/ lsmod | grep dummy
oc wait --for=condition=Available deployment/kmm-operator-controller deployment/kmm-operator-webhook -n openshift-kmm

echo "Add resources"
oc apply -k ci/e2e
timeout 1m bash -c 'until oc apply -k ci/e2e; do sleep 3; done'

# Wait for the build pod to be created. `kubectl wait` doesn't support such option,
# see https://github.com/kubernetes/kubernetes/issues/83242.
Expand Down

0 comments on commit 8156f88

Please sign in to comment.