部署 Tekton Triggers v0.25.3

环境要求

1. 运行 1.18 或更高版本的Kubernetes 集群;
2. 集群上要安装了Tekton Pipelines;

部署 Tekton Triggers

下载 Tekton Triggers

# wget https://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml
# wget https://storage.googleapis.com/tekton-releases/triggers/latest/interceptors.yaml

替换 gcr.io

# sed -i 's@gcr.io@gcr.dockerproxy.com@g' *.yaml

部署 Tekton Triggers

# kubectl apply -f release.yaml -f interceptors.yaml
clusterrole.rbac.authorization.k8s.io/tekton-triggers-admin created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-core-interceptors created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-core-interceptors-secrets created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-eventlistener-roles created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-eventlistener-clusterroles created
role.rbac.authorization.k8s.io/tekton-triggers-admin-webhook created
role.rbac.authorization.k8s.io/tekton-triggers-core-interceptors created
role.rbac.authorization.k8s.io/tekton-triggers-info created
serviceaccount/tekton-triggers-controller created
serviceaccount/tekton-triggers-webhook created
serviceaccount/tekton-triggers-core-interceptors created
clusterrolebinding.rbac.authorization.k8s.io/tekton-triggers-controller-admin created
clusterrolebinding.rbac.authorization.k8s.io/tekton-triggers-webhook-admin created
clusterrolebinding.rbac.authorization.k8s.io/tekton-triggers-core-interceptors created
clusterrolebinding.rbac.authorization.k8s.io/tekton-triggers-core-interceptors-secrets created
rolebinding.rbac.authorization.k8s.io/tekton-triggers-webhook-admin created
rolebinding.rbac.authorization.k8s.io/tekton-triggers-core-interceptors created
rolebinding.rbac.authorization.k8s.io/tekton-triggers-info created
customresourcedefinition.apiextensions.k8s.io/clusterinterceptors.triggers.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/clustertriggerbindings.triggers.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/eventlisteners.triggers.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/interceptors.triggers.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/triggers.triggers.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/triggerbindings.triggers.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/triggertemplates.triggers.tekton.dev created
secret/triggers-webhook-certs created
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.triggers.tekton.dev created
mutatingwebhookconfiguration.admissionregistration.k8s.io/webhook.triggers.tekton.dev created
validatingwebhookconfiguration.admissionregistration.k8s.io/config.webhook.triggers.tekton.dev created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-aggregate-edit created
clusterrole.rbac.authorization.k8s.io/tekton-triggers-aggregate-view created
configmap/config-defaults-triggers created
configmap/feature-flags-triggers created
configmap/triggers-info created
configmap/config-leader-election-triggers-controller created
configmap/config-leader-election-triggers-webhook created
configmap/config-logging-triggers created
configmap/config-observability-triggers created
service/tekton-triggers-controller created
deployment.apps/tekton-triggers-controller created
service/tekton-triggers-webhook created
deployment.apps/tekton-triggers-webhook created
secret/tekton-triggers-core-interceptors-certs created
deployment.apps/tekton-triggers-core-interceptors created
service/tekton-triggers-core-interceptors created
clusterinterceptor.triggers.tekton.dev/cel created
clusterinterceptor.triggers.tekton.dev/bitbucket created
clusterinterceptor.triggers.tekton.dev/slack created
clusterinterceptor.triggers.tekton.dev/github created
clusterinterceptor.triggers.tekton.dev/gitlab created

查看 pod

# kubectl get pods --namespace tekton-pipelines
NAME                                                READY   STATUS    RESTARTS        AGE
tekton-dashboard-5b5dcccc8-2p5gr                    1/1     Running   2 (4h27m ago)   2d3h
tekton-events-controller-5659db8c9b-8g5dq           1/1     Running   2 (4h27m ago)   2d4h
tekton-pipelines-controller-6c6d9f758d-p8xvp        1/1     Running   2 (4h27m ago)   2d4h
tekton-pipelines-webhook-7767648b4-gpsjc            1/1     Running   2 (4h27m ago)   2d4h
tekton-triggers-controller-bcfd9b78f-ffft5          1/1     Running   0               6m25s
tekton-triggers-core-interceptors-cbb688fd8-4tqrn   1/1     Running   0               6m25s
tekton-triggers-webhook-b8f5bf9f6-wrq8t             1/1     Running   0               6m25s

查看 svc

# kubectl get svc --namespace tekton-pipelines
NAME                                TYPE        CLUSTER-IP       EXTERNAL-IP       PORT(S)                              AGE
tekton-dashboard                    ClusterIP   10.100.122.163   192.168.174.248   9097/TCP                             2d3h
tekton-events-controller            ClusterIP   10.100.147.243   <none>            9090/TCP,8008/TCP,8080/TCP           2d4h
tekton-pipelines-controller         ClusterIP   10.100.136.156   <none>            9090/TCP,8008/TCP,8080/TCP           2d4h
tekton-pipelines-webhook            ClusterIP   10.100.73.188    <none>            9090/TCP,8008/TCP,443/TCP,8080/TCP   2d4h
tekton-triggers-controller          ClusterIP   10.100.139.24    <none>            9000/TCP                             5m21s
tekton-triggers-core-interceptors   ClusterIP   10.100.120.8     <none>            8443/TCP                             5m21s
tekton-triggers-webhook             ClusterIP   10.100.40.174    <none>            443/TCP                              5m21s

查看 CRD

# kubectl api-resources |grep tekton
extensions                        ext,exts                                        dashboard.tekton.dev/v1alpha1                  true         Extension
resolutionrequests                resolutionrequest,resolutionrequests            resolution.tekton.dev/v1beta1                  true         ResolutionRequest
clustertasks                                                                      tekton.dev/v1beta1                             false        ClusterTask
customruns                                                                        tekton.dev/v1beta1                             true         CustomRun
pipelineruns                      pr,prs                                          tekton.dev/v1                                  true         PipelineRun
pipelines                                                                         tekton.dev/v1                                  true         Pipeline
stepactions                                                                       tekton.dev/v1alpha1                            true         StepAction
taskruns                          tr,trs                                          tekton.dev/v1                                  true         TaskRun
tasks                                                                             tekton.dev/v1                                  true         Task
verificationpolicies                                                              tekton.dev/v1alpha1                            true         VerificationPolicy
clusterinterceptors               ci                                              triggers.tekton.dev/v1alpha1                   false        ClusterInterceptor
clustertriggerbindings            ctb                                             triggers.tekton.dev/v1beta1                    false        ClusterTriggerBinding
eventlisteners                    el                                              triggers.tekton.dev/v1beta1                    true         EventListener
interceptors                      ni                                              triggers.tekton.dev/v1alpha1                   true         Interceptor
triggerbindings                   tb                                              triggers.tekton.dev/v1beta1                    true         TriggerBinding
triggers                          tri                                             triggers.tekton.dev/v1beta1                    true         Trigger
triggertemplates                  tt                                              triggers.tekton.dev/v1beta1                    true         TriggerTemplate

查看 ClusterInterceptor

# kubectl get ClusterInterceptor
NAME        AGE
bitbucket   10m
cel         10m
github      10m
gitlab      10m
slack       10m

参考文档

https://tekton.dev/docs/installation/triggers/

posted @ 2023-12-01 15:38  小吉猫  阅读(35)  评论(0编辑  收藏  举报