-
Notifications
You must be signed in to change notification settings - Fork 164
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 project descriptor #690
Add support for project descriptor #690
Conversation
9225331
to
6f95ddc
Compare
Codecov Report
@@ Coverage Diff @@
## main #690 +/- ##
==========================================
+ Coverage 66.93% 67.03% +0.10%
==========================================
Files 89 91 +2
Lines 3638 3680 +42
==========================================
+ Hits 2435 2467 +32
- Misses 853 858 +5
- Partials 350 355 +5
Continue to review full report at Codecov.
|
dcfcec2
to
e689be8
Compare
Excellent work @samj1912! I wanted to call out the some questions I had:
|
I am not sure how to handle this. Currently pack creates an ephemeral builder with the specified buildpacks. As a cluster operator providing cluster builders, I may not want users to skip buildpacks intended for them. For example, let's say a cluster builder includes some buildpack that runs some security checks as a part of the build process. Users could possibly bypass this buildpack. The other issue is users handling buildpack version updates. Let's say a user specifies a certain buildpack and it's version and on the cluster builder side, this buildpack version is updated. Suddenly a completely valid app may stop building as it can't find the specified buildpack. Given that the spec says a platform should account for the buildpack keys but not must and given that kpack as a platform handles a longer term lifecycle of an application than something like pack, I'm tempted not to say that this might be too much of a support burden and may open up possible security issues on the operator side with users skipping important updates/buildpacks. I think what we can instead do is log a warning. But I'm open to suggestions on how to handle this.
Makes sense to me. Again with the above caveat. Currently pack overrides the builder key in the project descriptor with what is explicitly provided by the user as a command line flag. The current implementation in this PR assumes anything provided by the user in the resource manifest overrides what is specified by the project descriptor (for example environment variables) . Given that the user already chose a builder to use, it makes sense that the builder in the resource manifest override the one in the project descriptor. A similar argument could be made for the above case of buildpacks.
Possibly, we currently don't parse any project fields at all. But we can if we want to expose that to the project source label maybe?
Yup, makes sense to add support for this. I wanted to get something in without spec changes. |
863c9aa
to
f813e53
Compare
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
f813e53
to
22cae38
Compare
I think long term we should have a solution to the |
To document the discussion from our May 24th, OSS WG: Questions 1/2 (How to handle build.buildpacks build.builder?). It is unclear how we will handle Question 3 (Should we validate the project.toml license?). At this time due to the passive nature of scheduled kpack's builds we feel like that validating this unused field will lead to unnecessary build failures. Question 4 (Should we support setting an alternative path to the descriptor?) Yes, we plan on providing this and it coinciding it with the release of the next api version. |
This PR adds support for the following attributes of a project descriptor -
The implementation of the project descriptor is pretty similar to the pack implementation.
Fixes #288