-
Notifications
You must be signed in to change notification settings - Fork 33
Include .git in image builds #92
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qbarrand 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 |
Can we use Also, can you describe in the commit message (and PR description) why this change is required (we are using .git for getting the commit sha in our logs bla bla, prow need to clone It would be nice to get it directly instead of going to the link and trying to figure out what the author needed. |
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
To include VCS data in the controller binary, our image build process requires .git to be present in the working directory. Google Cloud Build, the system used by the Kubernetes project to build container images, ignores .git by default. Explicitly include .git in the GCB environment through a .gcloudignore file. Reference: GoogleCloudPlatform/cloud-builders#236 (comment)
89c1013
to
6e58c00
Compare
@ybettan PTAL |
Codecov ReportBase: 72.90% // Head: 73.46% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
==========================================
+ Coverage 72.90% 73.46% +0.55%
==========================================
Files 16 17 +1
Lines 1705 1771 +66
==========================================
+ Hits 1243 1301 +58
- Misses 398 404 +6
- Partials 64 66 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Thank you! |
Use Background context instead of TODO Following the good practices of Golang, we should use context.Background() function in test files instead of context.TODO()
…gs#92) this add four fields to the crd in their own subsection: FileList - a list of kmod files within the container to sign KeySecret and CertSecret - these are the names of secrets containing the private and public keys respectivly that will be used to sign the kmods. The public key should be the one added into the uefi moklist for secureboot, and KeySecret is its private component. (See the kernel docs e.g. https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#manually-signing-modules for details of this process) unsignedImage - the optional name of a dtk image containing the unsigned knods, used only if their is no build stage. The expected workflow will be (not implemented in this commit): if there is only a kernelmapping.build section it will produce the image kernelmapping.containerImage (for the non-secureboot case) if there is both km.build and km.sign then build will produce an intermediate image and sign will consume that to produce km.containerImage if there is only km.sign signing will consumse km.sign.unsignedImage and produce km.containerImage (this is for the case where a vendor supplies prebuilt images that need signing) the generation of the intermediate image name will be handled automatically within the controller (again in a different commit) but will probably be something like km.containerImage + "-unsigned" Co-authored-by: Chris Procter <[email protected]>
Use Background context instead of TODO Following the good practices of Golang, we should use context.Background() function in test files instead of context.TODO()
Explicitly include .git in Google Cloud Builds
To include VCS data in the controller binary, our image build process
requires .git to be present in the working directory.
Google Cloud Build, the system used by the Kubernetes project to build
container images, ignores .git by default.
Explicitly include .git in the GCB environment through a .gcloudignore
file.
Reference: GoogleCloudPlatform/cloud-builders#236 (comment)