-
Notifications
You must be signed in to change notification settings - Fork 110
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
feat: allow customizing spot allocation strategy #481
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,6 +251,7 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) | |
SpotTags: b.config.SpotTags, | ||
Tags: b.config.RunTags, | ||
SpotInstanceTypes: b.config.SpotInstanceTypes, | ||
SpotAllocationStrategy: b.config.RunConfig.SpotAllocationStrategy, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this setting should be replicated to other builders, assuming this is compatible with them.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: if the |
||
UserData: b.config.UserData, | ||
UserDataFile: b.config.UserDataFile, | ||
VolumeTags: b.config.VolumeRunTags, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I believe both
if
s can be mutualisedThere 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.
Also to reply to your question in a comment from a previous review: using
slices.Contains
is fine by my standards! No need to make it manual, I suspect those were made this way in other cases because either the function did not exist at the time it was added, or whomever implemented it wasn't aware it existed, functionally it is essentially the same, might as well use what the library offers us.