Setting Up Tekton Triggers
Follow the steps below to set up an official release of Tekton Triggers on your Kubernetes cluster.
If you want to test Triggers from HEAD
, see the
Tekton Developer Guide.
Prerequisites
You must satisfy the following prerequisites to set up Tekton Triggers:
-
You must have a Kubernetes Cluster running Kubernetes 1.18 or above.
You can use
kind
to quickly create a local cluster with RBAC enabled for testing purposes:-
Install
kind
as described in Installation. -
Create a cluster as described in Creating a Cluster.
-
-
You must have Tekton Pipelines installed on your Kubernetes cluster.
For instructions, see Installing Tekton Pipelines.
-
You must grant the
cluster-admin
privilege to the user with which you installed Tekton Pipelines.For instructions, see Role-based access control.
Installing Tekton Triggers on Your Cluster
-
Log on to your Kubernetes cluster as the user with which you installed Tekton Pipelines.
-
Use the
kubectl apply
command to install the latest release of Tekton Triggers and its dependencies:kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/latest/interceptors.yaml
To install a specific release of Tekton Triggers, replace
latest
with the desired version number as shown in the following example:kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.1.0/release.yaml
To install a nightly release, use the following command:
kubectl apply --filename https://storage.googleapis.com/tekton-releases-nightly/triggers/latest/release.yaml
-
Monitor the installation using the
kubectl get
command:kubectl get pods --namespace tekton-pipelines --watch
-
When all Tekton Triggers components report a status of
Running
press CTRL+C to stop monitoring.
You are now ready to configure Tekton Triggers for your workflow. For instructions, see the following:
Customizing the Triggers Controller behavior
To customize the behavior of the Triggers Controller, modify the ConfigMap feature-flags-triggers
as follows:
-
enable-api-fields
: set this flag to “stable” to allow only the most stable features to be used. Set it to “alpha” to allow alpha features (in addition to stable features) to be used. Note that this flag only applies to the v1beta1 apiVersion. -
labels-exclusion-pattern
: set this field with regex pattern which will exclude labels matching the pattern from getting added to resources created by the EventListener such as the deployment. By default, there is no value is set for this field so all labels added to the EventListener are propagated down.
For example:
apiVersion: v1
kind: ConfigMap
metadata:
name: feature-flags-triggers
data:
enable-api-fields: "alpha" # Allow "alpha" fields to be used in v1beta1 Triggers' resources. Defaults to "stable" features only.
labels-exclusion-pattern: "^tekton-dev-"
Feedback
Was this page helpful?
Thanks! Tell us how we can further improve.
Sorry about that. Tell us how we can further improve.