-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refine ko builder behavior for main packages #6437
Refine ko builder behavior for main packages #6437
Conversation
Decide on how ko builder users should specify the location of `package main` for their images. Previous discussion: GoogleContainerTools#6054 (comment) Tracking: GoogleContainerTools#6041 Related: GoogleContainerTools#6054, GoogleContainerTools#6286
Codecov Report
@@ Coverage Diff @@
## main #6437 +/- ##
==========================================
+ Coverage 70.40% 70.41% +0.01%
==========================================
Files 505 505
Lines 22840 22840
==========================================
+ Hits 16080 16083 +3
+ Misses 5708 5705 -3
Partials 1052 1052
Continue to review full report at Codecov.
|
@@ -263,6 +291,13 @@ Adding the ko builder requires making config changes to the Skaffold schema. | |||
// You can override this value by setting the `SOURCE_DATE_EPOCH` | |||
// environment variable. | |||
SourceDateEpoch uint64 `yaml:"sourceDateEpoch,omitempty"` | |||
|
|||
// Target is the location of the main package. | |||
// If target is specified as a relative path, it is relative to the `context` directory. |
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.
Wld ko
error out if two main are found in the context dir?
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 except for nit.
Clarify how a blank value works, and also how users can use a pattern with wildcards.
Thanks @tejal29! I pushed a commit with an improved explanation. |
Thanks for the quick turn-around! |
This implements support for the Target config field for the ko builder. The Target field allows users to specify a target for `go build`. This is necessary where the main package is not in the context directory. Tracking: GoogleContainerTools#6041 Related: GoogleContainerTools#6054, GoogleContainerTools#6437
Description
Decide on how ko builder users should specify the location of
package main
.Previous discussion: #6054 (comment)
Tracking: #6041
Related: #6054, #6286