Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
OADP-1067: Design for Batching VSM CRs #179
OADP-1067: Design for Batching VSM CRs #179
Changes from 2 commits
00f13c0
3c3c819
8e6f1eb
88b9977
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Hmm. I'm wondering how this would work if a user wants to set it to zero, meaning "no limit". For example, if the default is 12, then a user setting this to 0 will result in the default of 12 being used. Maybe we don't allow "no limit" -- but practically speaking, the user can still have "no limit" by setting it to 1000 or something similarly huge.
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 guess one way to allow unlimited would be to implement the setting as an int pointer rather than an int -- that way we can distinguish between "not present; use default" (i.e. value is nil) and "unlimited" (value is 0; use this rather than default)" Thinking more about it, I'm leaning towards this. If we want "not specified" to mean "use the default" then we want the spec field to be
*int64
rather thanint64
, so that 0 won't be overridden by the default.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 agree, this approach sounds more reasonable. Will update with these details.
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.
If
0
means "unlimited" then we don't really need to know which option we're using in the design -- when we decide the default value, then it's just a matter of assigning the const in the golang file. If the default is zero, then it's unlimited -- if it's another number, then it's limited to that.