为什么这些 Tekton 资源需要放在单独的 YAML 文件中?

为什么这些 Tekton 资源需要放在单独的 YAML 文件中?

有谁知道为什么将这些资源放入一个文件中不起作用,而将它们放在单独的文件中却可以正常工作?

运行oc apply -f big_file.yaml此程序不起作用:

apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
  name: http-get-translater
spec:
  params:
  - name: placeholder
    value: nothing

apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
  name: http-get-listener
spec:
  serviceAccountName: pipeline
  triggers:
    - name: http-get-trigger 
      bindings:
      - ref: http-get-translater
      template:
        ref: http-get-dispatcher

apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
  name: http-get-dispatcher
spec:
  resourcetemplates:
  - apiVersion: tekton.dev/v1beta1
    kind: PipelineRun
    metadata:
      generateName: http-get-run-by-listener
    spec:
      pipelineRef:
        name: http-get

但跑步oc apply -f folder_with_resources_in_separate_files/有效。

我尝试更改文件中资源的顺序,以查看是否存在依赖关系问题,但无法解决问题。有什么想法吗?

感谢您的时间

相关内容