Improve Error Message with Reservation Validation #3174
Merged
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.
About the Change
We already have validation on the reservation usage in GKE clusters. However, that error message can improved.
With this PR, the error message provides more information about which properties mismatch, the values configured on the reservation and the node pool, the relevant node pool settings, their defaults. So that, the user knows what is wrong and they can make corrections to the blueprint accordingly.
This PR, also, adds README instructions about using the reservations.
Tests
Manually tested different scenarios:
For a concrete example, consider a scenario where the reservation has 1 nvidia-l4 accelerator, 0 disks and the machine type is g2-standard-4. Whereas, the node pool config from the blueprint is as shown below
The error message will look like the following as all of the machine type, local ssds and guest accelerators settings mismatch.
Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.