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

Not possible to define stepOverrides in a PipelineRun element taskRunSpecs #4653

Closed
mrbq opened this issue Mar 7, 2022 · 2 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mrbq
Copy link

mrbq commented Mar 7, 2022

Expected Behavior

When in a PipelineRun, it should be possible to add the stepOverrides and sidecarOverrides element to the taskRunSpec

Actual Behavior

It is not possible to define the object stepOverrides

Steps to Reproduce the Problem

Create the following yaml:

apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  generateName: my-pipeline
spec:
  pipelineRef:
    name: my-pipeline
  taskRunSpecs:
  - pipelineTaskName: my-task-to-override
    stepOverrides:
    - name: build
      resources:
        requests:
          memory: 1Gi
  resources:
  - name: repository
    resourceRef:
      name: anything
  - name: image
    resourceRef:
      name: test
  serviceAccountName: pipeline
  workspaces:
  - name: my-builds
    persistentVolumeClaim:
      claimName: my-pvc

Object cannot be created:

 cannot decode incoming new object: json: unknown field "StepOverrides"

In the doc it is stated that this change should be possible:

If used with this `Pipeline`,  `build-task` will use the task specific `PodTemplate` (where `nodeSelector` has `disktype` equal to `ssd`).
`PipelineTaskRunSpec` may also contain `StepOverrides` and `SidecarOverrides`; see
[Overriding `Task` `Steps` and `Sidecars`](./taskruns.md#overriding-task-steps-and-sidecars) for more information.

However, I do not see the element defined in the type:

// PipelineTaskRunSpec holds task specific specs
type PipelineTaskRunSpec struct {
	PipelineTaskName       string       `json:"pipelineTaskName,omitempty"`
	TaskServiceAccountName string       `json:"taskServiceAccountName,omitempty"`
	TaskPodTemplate        *PodTemplate `json:"taskPodTemplate,omitempty"`
}
@mrbq mrbq added the kind/bug Categorizes issue or PR as related to a bug. label Mar 7, 2022
@lbernick
Copy link
Member

lbernick commented Mar 7, 2022

Hi @mrbq! I'm still in the process of implementing this (described as still under development in our docs). I have a PR out for this feature (#4598) so it should be available in our next release!

/close

@tekton-robot
Copy link
Collaborator

@lbernick: Closing this issue.

In response to this:

Hi @mrbq! I'm still in the process of implementing this (described as still under development in our docs). I have a PR out for this feature (#4598) so it should be available in our next release!

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants