-
Notifications
You must be signed in to change notification settings - Fork 77
feat: Compose file build options #2497
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
base: staging
Are you sure you want to change the base?
Conversation
Signed-off-by: Alex-Andrei Cioc <[email protected]>
Signed-off-by: Alex-Andrei Cioc <[email protected]>
Signed-off-by: Alex-Andrei Cioc <[email protected]>
9d060f3 to
3f94bb2
Compare
initrd/rootfs.go
Outdated
| // BuildRootfs generates a rootfs based on the provided working directory and | ||
| // the rootfs entrypoint for the provided target(s). | ||
| func BuildRootfs(ctx context.Context, workdir, rootfs string, compress bool, arch string) (initrd.Initrd, []string, []string, error) { | ||
| func BuildRootfs(ctx context.Context, workdir, rootfs string, compress bool, arch string, initrdOptions []InitrdOption) (Initrd, []string, []string, error) { |
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.
Let's turn the prototype into an options pattern:
- func BuildRootfs(ctx context.Context, workdir, rootfs string, compress bool, arch string, initrdOptions []InitrdOption) (Initrd, []string, []string, error) {
+ func BuildRootfs(ctx context.Context, opts ...InitrdOption) (Initrd, []string, []string, error) {Later:
var bopts InitrdOoptions
for _, opt := range opts {
if err := opt(&bopts); err != nil {
return nil, nil, nil, err
}
}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.
with these changes the processing of paths is moved to the callers, do you want me to move it inside WithOutput and WithCacheDir?
Signed-off-by: Alex-Andrei Cioc <[email protected]>
Prerequisite checklist
make fmton your commit series before opening this PR;Description of changes
Add support for specifying the following service build options in the
compose.yamlfile, when usingkraft cloud composeandkraft compose: