Allow setting spec.router.instances to zero #26
Closed
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.
InnoDBCluster
resource can have zero router instances. However, Helmconsiders zero to be an empty value (see
default
function), so wecannot rely on
coalesce
Helm function to sourcespec.router.instances
from one of the following values:
routerInstances
router.instances
We change implementation which relies on Helm functions which use
“emptiness” to the implementation which checks if a value is defined in
parent dict. We do not introduce any additional validation like checking
if the value is an integer zero or any other value or type. This has
been validated by Kubernetes using CRD so far, Helm properly reports
this back, and we do not change this.
We also fix validation of source for
spec.router.instances
which can be of different types by converting them to strings.