-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Validate missing volume configs in Workspace Bindings #3096
Conversation
When a PipelineRun specifies a Workspace Binding, it is required to submit the volume configuration as part of that Binding. Currently the volume details aren't validated and so a PipelineRun with a Workspace Binding that only includes a "name" field will validate. The end result is that the Workspace is passed to the TaskRun and fails validation there instead. This commit adds validation to PipelineRuns to ensure that any Workspaces passed include some correct volume configuration data.
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dlorenc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
"workspace.emptydir", | ||
"workspace.configmap", | ||
"workspace.secret", | ||
"persistentvolumeclaim", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch!
Changes
Contributes to #3089 but doesn't completely fix it. There's another bug hidden in there that a PipelineRun submitting a TaskRun with invalid workspace is not entering a failed state even though the TaskRun reconciler is loudly complaining about the workspace config.
When a PipelineRun specifies a Workspace Binding, it is required to
submit the volume configuration as part of that Binding. Currently
the volume details aren't validated and so a PipelineRun with a Workspace
Binding that only includes a "name" field will validate. The end
result is that the Workspace is passed to the TaskRun and fails
validation there instead.
This commit adds validation to PipelineRuns to ensure that any
Workspaces passed include some correct volume configuration data.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them: