tektoncd / triggers

Event triggering with Tekton!
Apache License 2.0
558 stars 420 forks source link

How to set the nodeselector and tolerances of the pipelinerun pod created by triggers #924

Closed lqy1992 closed 3 years ago

lqy1992 commented 3 years ago

How to set the node node selector and tolerances of the pipelinerun pod created by triggers

I refer to the official website examples to configure my CICD tasks. https://github.com/tektoncd/triggers/tree/master/examples But I found that I can't control the related configuration of nodeselector and tolerances of the generated cicd pod. I only found the configuration of EventListener in the official website instance document。

apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
   name: listener-tolerations
spec:
  serviceAccountName: tekton-triggers-example-sa
  resources:
    kubernetesResource:
      spec:
        template:
          spec:
            tolerations:
            - key: key
              value: value
              operator: Equal
              effect: NoSchedule
  triggers:
    - name: foo-trig
      bindings:
        - ref: pipeline-binding
        - ref: message-binding
      template:
        ref: pipeline-template

In too many cases, users need to set the nodeselector and tolerances configuration of the pod generated by the pipeline.

savitaashture commented 3 years ago

@lqy1992 if you want to specify nodeselector and tolerances for the pod created by pipeline you need to configure those as part of pipelinerun in TriggerTemplate as PodTemplate

lqy1992 commented 3 years ago

I succeeded, thank you very much for the answer.