fix: render NGINX service patches in helm chart #5857
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 231 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #5857"
general
weight: 0.35
devaniketh
Proposed changes
Problem: When specifying the
patcheslist in the NGINX Service section of the helm chart, patches were not being rendered properly becausefilterEmptyFieldsrelied onmerge(Sprig/mergo), which is intended for deep-merging maps and could encounter issues or drop slice elements.Solution: Updated the
filterEmptyFieldstemplate helper in_helpers.tplto useset $result $key $valueinstead ofmerge. Becausesetdirectly assigns key-value pairs into the dictionary, slices (likepatches,nodePorts, etc.) and complex fields are preserved cleanly without needing customomitworkarounds or template-level manual rendering.Testing:
helm lint charts/nginx-gateway-fabric(0 errors).- Default values (
patches: []correctly omitted)- Service
patcheswithStrategicMergeandJSONPatch(properly rendered underspec.kubernetes.service.patches)- Deployment and DaemonSet
patches(properly rendered under their respective sections)- Multi-field configurations (
loadBalancerIP,loadBalancerSourceRanges,nodePorts,patches)Closes #5817
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
```release-note
Fix NGINX Service patches rendering in Helm chart.