-
Notifications
You must be signed in to change notification settings - Fork 435
Closed
Description
When creating images for multiple builds (e.g. in a monorepo), the ldflags would have to be duplicated in each build in .ko.yaml. This creates a lot of boilerplate and potential for inconsistencies, etc.
Instead, a better experience would be to allow a global set of ldflags that will automatically be applied to each build as their generated. Additionally, they can have all the same template parameters that you would have under the build section, since they will be re-evaluated for each build.
There is one choice to make that comes to mind, however:
defaultLDFlags: This naming would be in keeping with some other values, likedefaultBaseImage. In this case, they would be a default that would simply be replaced ifldflagswere specified for a particular binary.ldflags: In this case, they're simply globally ldfags that would always be prepended to any per-buildldflags.
I think I'm fine either way. Happy to discuss.
Also, I'm happy to do the work and send a PR if folks think this is a good idea.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels