fix: add istio resource defaults#33
Conversation
📝 WalkthroughWalkthroughThis PR refactors three Helm chart templates to establish explicit default values with resource request/limit settings, merge them consistently with user-provided overrides using ChangesHelm Chart Defaults and Merging
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test-render/main.k (1)
50-53: ⚡ Quick winAdd assertions for default resource limits in the minimal render test.
This test now checks default requests, but the new default limits are still unverified. Adding limits assertions here will better lock the defaults introduced by this PR.
✅ Suggested test update
values = { profile = "ambient" pilot.resources.requests = {cpu = "23m", memory = "121Mi"} + pilot.resources.limits = {cpu = "1000m", memory = "512Mi"} } @@ - values.resources.requests = {cpu = "35m", memory = "100Mi"} + values.resources.requests = {cpu = "35m", memory = "100Mi"} + values.resources.limits = {cpu = "250m", memory = "256Mi"} } }Also applies to: 64-64
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test-render/main.k` around lines 50 - 53, The minimal render test currently asserts default resource requests but not the new default limits; update the test to assert that pilot.resources.limits is present and equals the expected defaults (e.g., cpu and memory) alongside the existing pilot.resources.requests check. Locate the values block (the map containing profile = "ambient" and pilot.resources.requests) and add assertions for pilot.resources.limits = {cpu = "<expectedCpuLimit>", memory = "<expectedMemoryLimit>"}; duplicate the same addition for the other occurrence of the values block referenced in the comment (the one at the second location) so both minimal-render assertions lock the new defaults.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/test-render/main.k`:
- Around line 50-53: The minimal render test currently asserts default resource
requests but not the new default limits; update the test to assert that
pilot.resources.limits is present and equals the expected defaults (e.g., cpu
and memory) alongside the existing pilot.resources.requests check. Locate the
values block (the map containing profile = "ambient" and
pilot.resources.requests) and add assertions for pilot.resources.limits = {cpu =
"<expectedCpuLimit>", memory = "<expectedMemoryLimit>"}; duplicate the same
addition for the other occurrence of the values block referenced in the comment
(the one at the second location) so both minimal-render assertions lock the new
defaults.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0ded51ff-283c-4725-b852-50bfdd6ff5c0
📒 Files selected for processing (4)
functions/render/210-istiod.yaml.gotmplfunctions/render/215-istio-cni.yaml.gotmplfunctions/render/220-ztunnel.yaml.gotmpltests/test-render/main.k
Published Crossplane PackageThe following Crossplane package was published as part of this PR: Package: ghcr.io/hops-ops/istio-stack:pr-33-b5cc4c3c066c70cbebc1cf491a54626c41a19b6b |
Summary:
Verification:
Summary by CodeRabbit