-
Notifications
You must be signed in to change notification settings - Fork 112
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
Build-273 Volumes support to Build Strategies #1035
Conversation
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 this start @alicerum. I think it uncovers some imprecisions in the ship that I point out in my comments.
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.
I believe I need to update the original proposal and drop the optional
and type
fields. Some of the API assumed a more "restrictive" approach to persistent volumes, and yet the "Risks and Mitigations" section clearly implies that we'll allow any volume source, including hostPath
. Passing through the core k8s VolumeSource
object is the correct approach.
The proposal recommends that admins enable the PodSecurity
admission plugin. This is default on k8s 1.23. This PR (or a follow-up) should make this recommendation clear to users/admins.
Updated the SHIP here: shipwright-io/community#77 |
fd21f00
to
0ec7241
Compare
Re-running the e2e test - it looked like all but one e2e test passed. The buildah test failed, looked like it hanged pulling the base image. |
@alicerum success! I think the buildah issue was a test flake - if it continues to crop up we'll address in a separate PR. Please update the Volume mounts section of the Build Strategies doc with the new API, then squash your commits. |
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 progress. :-)
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.
Three more items, beside the two comments, please also extend the build.md and buildrun.md in the documentation.
4546a78
to
5170f35
Compare
This commit adds Volumes support to Build Strategies, Builds and BuildRuns, allowing user to configure volumes and volume mounts used by the future tekton TaskRun object. Volumes can be overridden by Build and BuildRun objects.
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SaschaSchwarze0 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 |
/lgtm |
Changes
This PR adds Volumes support to Build Strategies, allowing user to configure volumes and volume mounts used by the future tekton
TaskRun
object. Allowing eventually to add config maps, secrets and persistent storage to builds and build runs.Volumes can be overriden by
Build
andBuildRun
objects.Tests have not been implemented yet, I am working hard to deliver them during the rest of today.
Duscussion topics
In the original SHIP only
emptyDir
volumes are defined in theBuildStrategy
. In this PR anyVolumeSource
is supported there. In case we want to only implementemptyDir
s in the Build Strategies and all the rest in Builds and BuildRins, we could possibly removeemptyDir
definition from strategies and rename field asvolumeTemplate
or something. Clearly stating that this is not aVolumeSource
as defined byk8s
.I moved
overridable
one level higher, to whereoptional
is. Somehow it makes more sense, but I can move it back.I did not implement the
VolumeSource
type, because it is not there in the originalk8s
type, and I figured there are other means of checking the type.It is claimed in the SHIP that
Secret
andBuildConfig
volume mounts must be read only andBuildRun
must fail otherwise. I have never encountered this before, but I implemented it anyways.Should I fail the
BuildRun
in caseSecret
orConfigMap
required by the build does not exist? I have not implemented this yet, and pod hangs indefinitely until resource appears.Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes