Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEP-0061, Allow custom task to be embedded. #3901

Merged
merged 4 commits into from
May 25, 2021

Commits on May 25, 2021

  1. TEP-0061, Allow custom task to be embedded.

        It is now possible to embed the spec of a custom task in a Run resource, whether stand-alone in Run or embedded in a Pipeline.
    
    e.g. in a Run using example TaskLoop controller in tektoncd/experimental/task-loop/
    
              apiVersion: tekton.dev/v1alpha1
              kind: Run
              metadata:
                name: simpletasklooprun
              spec:
                params:
                  - name: word
                    value:
                      - jump
                      - land
                  - name: suffix
                    value: ing
                spec:
                  apiVersion: custom.tekton.dev/v1alpha1
                  kind: TaskLoop
                  spec:
                    # This is a new field, which comprises of custom-task spec.
                    taskRef:
                      name: simpletask
                    iterateParam: word
                    timeout: 60s
                    retries: 2
    
    1. API changes, This PR adds new APIs i.e. adds a field `Spec EmbeddedRunSpec` to `RunSpec`
    2. An embedded task will accepts new field `Spec` with type `runtime.RawExtension` in addition to
        `ApiVersion` and `Kind` fields of type string (as part of `runtime.TypeMeta`)
    3. Validation changes, in addition to adding support for `Run.RunSpec.Spec` the validations will be changed
        to support "One of `Run.RunSpec.Spec` or `Run.RunSpec.Ref` " only and not both as part of a single
        API request to kubernetes.
    
        Developers of custom controllers (existing and new), who would
        like to support embedded spec for their custom task,
         need to implement the logic required to extract, validate
        and use the custom task spec from the new RunSpec.Spec field.
        Please review the documentation in docs/runs.md and docs/pipelines.md
    ScrapCodes committed May 25, 2021
    Configuration menu
    Copy the full SHA
    d779a31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dcdfe07 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    239f98c View commit details
    Browse the repository at this point in the history
  4. Ran hack/update-codegen.sh

    ScrapCodes committed May 25, 2021
    Configuration menu
    Copy the full SHA
    4e7a9ff View commit details
    Browse the repository at this point in the history