Skip to content

fix(discount-bandit): align template standards#658

Open
mberlofa wants to merge 2 commits into
mainfrom
fix/discount-bandit-template-standards
Open

fix(discount-bandit): align template standards#658
mberlofa wants to merge 2 commits into
mainfrom
fix/discount-bandit-template-standards

Conversation

@mberlofa

@mberlofa mberlofa commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • align Discount Bandit NOTES with the numbered HelmForge operational sections
  • add canonical networkPolicy.egress.extraEgress support while preserving existing extraTo peers
  • document the new NetworkPolicy egress surface in values schema and helm-unittest coverage

Validation

  • make template-standards-check CHART=discount-bandit
  • helm unittest charts/discount-bandit
  • helm lint --strict charts/discount-bandit
  • make standards-check CHART=discount-bandit
  • make validate-chart CHART=discount-bandit TIMEOUT=900: FULLY VALIDATED (19 layers)
  • make site-sync-check CHART=discount-bandit
  • make release-check REPO=charts
  • make attribution-check REPO=charts

Site PR: helmforgedev/site#337
Issue: #633

Summary by CodeRabbit

  • New Features

    • Added support for networkPolicy.egress.extraEgress, allowing custom full egress rules (including to/ports) to be appended to the rendered NetworkPolicy.
  • Documentation

    • Reformatted and reorganized the chart notes into a clearer, markdown-style layout.
  • Tests

    • Added a test to confirm extraEgress is correctly rendered in the NetworkPolicy output.
  • Chores

    • Expanded values.schema.json and updated values.yaml to document the new networkPolicy egress options.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Standards Check (GR-079) — PASS

Every changed chart fully passes standards-check.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e29d44d-6dc0-4742-95e6-a995f22d08af

📥 Commits

Reviewing files that changed from the base of the PR and between 27baa6b and 33dfbde.

📒 Files selected for processing (1)
  • charts/discount-bandit/values.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/discount-bandit/values.yaml

📝 Walkthrough

Walkthrough

Adds extraEgress support to the chart’s NetworkPolicy values, schema, template rendering, and test coverage. Separately, NOTES.txt is reformatted into clearer sections without changing its rendered logic.

Changes

NetworkPolicy extraEgress support

Layer / File(s) Summary
Values and schema for extraEgress
charts/discount-bandit/values.yaml, charts/discount-bandit/values.schema.json
Adds extraEgress to chart values and expands the networkPolicy schema into structured ingress and egress properties.
Template rendering of extraEgress
charts/discount-bandit/templates/networkpolicy.yaml
Includes extraEgress in the egress enablement condition and renders the provided egress rules into the NetworkPolicy output.
Test coverage for extraEgress
charts/discount-bandit/tests/networkpolicy_test.yaml
Adds a test that checks rendered spec.egress includes the configured ipBlock.cidr and TCP port.

NOTES.txt reformat

Layer / File(s) Summary
Sectioned NOTES.txt restructuring
charts/discount-bandit/templates/NOTES.txt
Reformats the chart notes into sectioned installation, runtime, access, configuration, health, database, troubleshooting, production, and resources blocks.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • helmforgedev/charts#641 — Adds the same networkPolicy.egress.extraEgress chart support and related test/values updates.

Suggested labels: area:docs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: updating the discount-bandit chart to better align with template and standards conventions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/discount-bandit-template-standards

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🟢 Security Scan: discount-bandit

Framework Score
MITRE + NSA + SOC2 91.21212%

✅ Security posture acceptable.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
charts/discount-bandit/values.yaml (1)

338-339: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify the distinction from extraTo.

extraEgress accepts full rule objects (to + ports) whereas extraTo only injects peer entries under a shared to: block. A one-line comment clarifying this difference would help users pick the right field.

✏️ Suggested comment tweak
-    # -- Additional complete NetworkPolicy egress rules
+    # -- Additional complete NetworkPolicy egress rules (each entry needs its own `to`/`ports`, unlike extraTo which shares one `to:` block)
     extraEgress: []
🤖 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 `@charts/discount-bandit/values.yaml` around lines 338 - 339, Update the values
documentation comment for extraEgress in the NetworkPolicy config to explicitly
distinguish it from extraTo: note that extraEgress takes complete egress rule
objects including both to and ports, while extraTo only adds peer entries under
a shared to block. Keep the wording concise and place it next to the extraEgress
field so users can choose the correct setting.
🤖 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 `@charts/discount-bandit/values.yaml`:
- Around line 338-339: Update the values documentation comment for extraEgress
in the NetworkPolicy config to explicitly distinguish it from extraTo: note that
extraEgress takes complete egress rule objects including both to and ports,
while extraTo only adds peer entries under a shared to block. Keep the wording
concise and place it next to the extraEgress field so users can choose the
correct setting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 68bc0279-c526-4e29-b6ab-4bf42d78a120

📥 Commits

Reviewing files that changed from the base of the PR and between 870b4c7 and 35008c0.

📒 Files selected for processing (5)
  • charts/discount-bandit/templates/NOTES.txt
  • charts/discount-bandit/templates/networkpolicy.yaml
  • charts/discount-bandit/tests/networkpolicy_test.yaml
  • charts/discount-bandit/values.schema.json
  • charts/discount-bandit/values.yaml

@mberlofa mberlofa force-pushed the fix/discount-bandit-template-standards branch from 35008c0 to 27baa6b Compare July 4, 2026 16:10
@mberlofa

mberlofa commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the CodeRabbit review-summary nitpick for networkPolicy.egress.extraEgress documentation.

Change:

  • Clarified in values.yaml that extraEgress accepts complete egress rules with their own to/ports blocks, while extraTo only adds peers under one shared to block.

Validation:

  • make validate-chart CHART=discount-bandit passed
  • Result: discount-bandit: FULLY VALIDATED (19 layers), including all k3d GR-027 scenarios
  • make release-check REPO=charts passed with only the expected post-merge release confirmation warning
  • make attribution-check REPO=charts passed
  • git diff --check passed

Note: this CodeRabbit item was posted in the review summary/body, not as an active review thread, so there is no thread ID to reply to or resolve for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant