Skip to content

Commit

Permalink
Fix core interceptors installation errors
Browse files Browse the repository at this point in the history
We need to wait for the Interceptors CRD to become established before we can
create the core interceptors. Otherwise, we run the risk of trying to create
the core-interceptors too early leading to installation errors.

Signed-off-by: Dibyo Mukherjee <[email protected]>
  • Loading branch information
dibyom committed Jan 28, 2021
1 parent e9543ad commit 2acfa07
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/v1alpha1-task/v1alpha1-task-listener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: v1alpha1-task-listener
name: v1alpha1-task-listener-mkt-cloud---product-hierarchy-replication-salesbagsreplication
spec:
serviceAccountName: tekton-triggers-example-sa
triggers:
Expand Down
7 changes: 6 additions & 1 deletion test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ function install_triggers_crd() {
echo ">> Deploying Tekton Triggers"
ko apply -f config/ || fail_test "Tekton Triggers installation failed"

# Wait for the Interceptors CRD to be available before adding the core-interceptors
kubectl wait --for=condition=Established --timeout=30s crds/interceptors.triggers.tekton.dev
ko apply -f config/interceptors || fail_test "Core interceptors installation failed"

# Make sure that eveything is cleaned up in the current namespace.
for res in eventlistener triggertemplate triggerbinding clustertriggerbinding; do
kubectl delete --ignore-not-found=true ${res}.triggers.tekton.dev --all
done

# Wait for pods to be running in the namespaces we are deploying to
wait_until_pods_running tekton-pipelines || fail_test "Tekton Triggers did not come up"
}

}

0 comments on commit 2acfa07

Please sign in to comment.