fix(curator): make the prod resource sizing branch reachable - #78
Open
austinderrick wants to merge 1 commit into
Open
fix(curator): make the prod resource sizing branch reachable#78austinderrick wants to merge 1 commit into
austinderrick wants to merge 1 commit into
Conversation
curator.resources compared environment to "production", but values.schema.json restricts environment to dev, qa, or prod, so the comparison could never be true and a prod release with no explicit resources fell through to the 500m/512Mi block. Compare against "prod" and add deployment tests pinning both sizing branches plus the override path, so the schema enum and the template can't drift apart again unnoticed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The bug
curator.resourcesin_helpers.tplpicks a sizing block by environment when a release doesn't setresourcesitself:But
values.schema.jsonrestrictsenvironmenttodev | qa | prod, and the schema is enforced at render."production"is a value the chart will not accept, so the production branch was unreachable — a prod release with no explicitresourcessilently got the small block (500m/512Mi requests and limits) instead of the intended 1 CPU / 1Gi requests and 1500m / 2Gi limits.Blast radius: none today
All 19
prod-*-helmrelease.yamlfiles iniac-interworks(plus the.templates/stub they're generated from) setresourcesexplicitly, so every prod site today takes the override branch and never reaches this code. The fix corrects a latent default: it changes what a future prod site gets if it omitsresources, and nothing about the current fleet.The fix
"prod", the value the schema actually permits.environmentenum, since that drift is what caused this.deployment_test.yaml: prod sizing, non-prod sizing, and an explicitresourcesoverride winning over both.Testing
Ran the suite locally with the pinned helm 4.2.3 and helm-unittest v1.1.1:
Expected to equal: 1 / Actual: 500m.Found while writing
REVIEW.mdin #77, which cites this as the reference example of schema/template drift.