-
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
Add support for repeated PVC-claim but using subPath in AA-validation #3099
Conversation
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.
Thanks for the help!!
Looks good!
/lgtm
// ValidateOnlyOnePVCIsUsed checks that a list of WorkspaceBinding uses only | ||
// one persistent volume claim. This is useful to validate that WorkspaceBindings | ||
// are compatible with affinity rules enforced by the AffinityAssistant. | ||
func ValidateOnlyOnePVCIsUsed(wb []v1beta1.WorkspaceBinding) error { |
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.
nit: maybe add to the comment that this condition (multiple pvcs) is valid for WorkspaceBinding
in a PipelineRun, but not for a TaskRun
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.
good thinking; I've updated the comment to include that detail.
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.
This is useful to validate that WorkspaceBindings
// in PipelineRuns are compatible with affinity rules enforced by the
// AffinityAssistant.
It's the other way around :) . We only call this function from taskrun.go
because this condition is ok when declared in a PipelineRun
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.
Maybe
// This is only useful to validate that WorkspaceBindings
// in TaskRuns are compatible with affinity rules enforced by the
// AffinityAssistant.
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.
oops, hah, thanks I've corrected it with your wording.
The following is the coverage report on the affected files.
|
The validation for compatibility with the Affinity Assistant does not support the same PVC repeated, but using different subPaths. This patch adds support for this case and tests for the validation. Co-authored-by: Scott <[email protected]>
The following is the coverage report on the affected files.
|
Do we want this PR in the v0.16 release milestone? |
I think so, unless we want it in a patch. It should be in a v0.15.x also. |
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
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish, jlpettersson 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 |
Changes
Picks up from #3091 and adds some tests for the validation. Original commit message:
The validation for compatibility with the Affinity Assistant does not
support the same PVC repeated, but using different subPaths.
This patch adds support for this case and tests for the validation.
Co-authored-by: Scott [email protected]
Closes #3085
Closes #3091
/kind bug
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Release Notes