Skip to content

validator: allow pack values.yaml to add cpu/memory resource limits - #321

Open
vishwanaths wants to merge 1 commit into
mainfrom
fix/validator-allow-added-resource-limits
Open

validator: allow pack values.yaml to add cpu/memory resource limits#321
vishwanaths wants to merge 1 commit into
mainfrom
fix/validator-allow-added-resource-limits

Conversation

@vishwanaths

Copy link
Copy Markdown
Collaborator

Summary

  • check-values-structure.py's structural subset check rejected any key present in a pack's values.yaml but absent from the chart's own values.yaml — including the common, intentional case of a pack adding a resources.limits.cpu or resources.limits.memory override that the chart doesn't ship by default.
  • Adds a narrow exception: when the enclosing mapping's path ends in limits and the missing key is cpu or memory, it's allowed. All other structural mismatches (renamed/removed keys, other added keys, requests.*, etc.) still fail exactly as before.
  • Ports the fix landed in spectrocloud/pax#4635, surfaced there by a csi-aws-ebs pack that sets limits.cpu while its chart only defines limits.memory.

Test plan

  • Verified the identical logic locally against synthetic pack/chart values.yaml pairs in the pax repo: added limits.cpu/limits.memory pass; unrelated added keys and added requests.cpu still correctly fail.
  • CI (Packs Validation) passes on this PR.

🤖 Generated with Claude Code

check-values-structure.py rejected any key present in a pack's values.yaml
but absent from the chart's own values.yaml, including the common case of
a pack adding a resources.limits.cpu or resources.limits.memory override
that the chart doesn't define by default. Tightening resource limits at
the pack level is an intentional, allowed override, not a structural
defect, so it should not fail validation.

Ported from the same fix in spectrocloud/pax (PR #4635).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants