Skip to content

Commit

Permalink
Merge pull request #33 from rh-rahulshetty/add_timeout_for_chains_setup
Browse files Browse the repository at this point in the history
Add sleep timeout before checking chains status
  • Loading branch information
openshift-merge-bot[bot] authored May 17, 2024
2 parents d311689 + e82d5d3 commit a2399aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ci-scripts/setup-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ EOF
# Patch TektonConfig with replicas and buckets for ha
kubectl patch TektonConfig/config --type merge --patch '{"spec":{"chain":{"options":{"deployments":{"tekton-chains-controller":{"spec":{"replicas":'"$DEPLOYMENT_CHAINS_CONTROLLER_HA_REPLICAS"'}}},"configMaps":{"tekton-chains-config-leader-election":{"data":{"buckets":"'$chains_controller_ha_buckets'"}}}}}}}'
# Wait for pods to come up
sleep 60
wait_for_entity_by_selector 300 openshift-pipelines pod app=tekton-chains-controller "$DEPLOYMENT_CHAINS_CONTROLLER_HA_REPLICAS"
kubectl -n openshift-pipelines wait --for=condition=ready --timeout=300s pod -l app=tekton-chains-controller
# Delete leases
kubectl delete -n openshift-pipelines $(kubectl get leases -n openshift-pipelines -o name | grep tektoncd.chains)
# Wait for pods to come up
sleep 60
wait_for_entity_by_selector 300 openshift-pipelines pod app=tekton-chains-controller "$DEPLOYMENT_CHAINS_CONTROLLER_HA_REPLICAS"
kubectl -n openshift-pipelines wait --for=condition=ready --timeout=300s pod -l app=tekton-chains-controller
# Check if all replicas were assigned some buckets
Expand Down
1 change: 1 addition & 0 deletions tests/scaling-pipelines/scenario/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function chains_setup_generic() {
cosign_generate_key_pair_secret

# Wait for Chains controller to come up
sleep 60
wait_for_entity_by_selector 300 openshift-pipelines deployment app.kubernetes.io/name=controller,app.kubernetes.io/part-of=tekton-chains
wait_for_entity_by_selector 300 openshift-pipelines pod app.kubernetes.io/part-of=tekton-chains
oc -n openshift-pipelines wait --for=condition=ready --timeout=300s pod -l app.kubernetes.io/part-of=tekton-chains
Expand Down

0 comments on commit a2399aa

Please sign in to comment.