Installs Tekton GitHub Trigger.
Apply tekton triggers resources:
❯ kubectl apply -f tekton/4.triggers
eventlistener.triggers.tekton.dev/github-listener-interceptor created
serviceaccount/tekton-triggers-github-sa created
role.rbac.authorization.k8s.io/tekton-triggers-example-minimal created
rolebinding.rbac.authorization.k8s.io/tekton-triggers-example-binding created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-example-clusterrole created
clusterrolebinding.rbac.authorization.k8s.io/tekton-triggers-example-clusterbinding created
triggerbinding.triggers.tekton.dev/github-binding created
triggertemplate.triggers.tekton.dev/github-template created
Create github-secret
secret with a random TEKTON_TUTORIAL_SECRET_TOKEN. Annotate the token as you'll use it later in GitHub to send authenticated triggers.
export TEKTON_TUTORIAL_SECRET_TOKEN=${TEKTON_TUTORIAL_SECRET_TOKEN-$(head -c 24 /dev/random | base64)}
kubectl create secret generic github-secret --from-literal=secretToken=$TEKTON_TUTORIAL_SECRET_TOKEN
echo "TEKTON_TUTORIAL_SECRET_TOKEN: $TEKTON_TUTORIAL_SECRET_TOKEN"
- Tekton Triggers: Event triggering with Tekton.
Once build-and-deploy pipeline is installed, see the Setup GitHub Webhook tutorial.
If you want to tear down the tekton triggers:
# delete github secret
❯ kubectl delete secret github-secret
secret "github-secret" deleted
# delete triggers resources
❯ kubectl delete -f tekton/4.triggers/
pipeline.tekton.dev "build-and-deploy" deleted
eventlistener.triggers.tekton.dev "github-listener-interceptor" deleted
serviceaccount "tekton-triggers-github-sa" deleted
role.rbac.authorization.k8s.io "tekton-triggers-example-minimal" deleted
rolebinding.rbac.authorization.k8s.io "tekton-triggers-example-binding" deleted
clusterrole.rbac.authorization.k8s.io "tekton-triggers-example-clusterrole" deleted
clusterrolebinding.rbac.authorization.k8s.io "tekton-triggers-example-clusterbinding" deleted
triggerbinding.triggers.tekton.dev "github-binding" deleted
triggertemplate.triggers.tekton.dev "github-template" deleted