Add NetworkPolicy helm conditional wrapping to chart generation - #164
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dislbenn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: stolostron/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✨ 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 |
1d977b7 to
2abc038
Compare
Wrap generated NetworkPolicy templates with
{{- if .Values.global.networkPolicies.enabled }} so NetworkPolicies
are only deployed when explicitly enabled. Applied in both
generate-charts.py and bundles-to-charts.py after all other template
processing completes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: dislbenn <dbennett@redhat.com>
2abc038 to
5a34d2b
Compare
Summary
wrapNetworkPoliciesWithConditionfunction togenerate-charts.pyandbundles-to-charts.py{{- if .Values.global.networkPolicies.enabled }}/{{- end }}injectRequirementsto avoid interfering with YAML parsing stepsContext
Automated chart regeneration was stripping the
networkPolicies.enabledconditional from NetworkPolicy templates. This ensures all generated NetworkPolicy resources are gated behind the flag, matching the existing pattern used in hand-maintained templates (e.g. hypershift-addon-manager-networkpolicy.yaml).Companion PRs:
Test plan
make regenerate-chartsin backplane-operator and verify NetworkPolicy templates have the{{- if }}wrappermake regenerate-charts-from-bundlesand verify same🤖 Generated with Claude Code