Fix Helm chart environment variable merging for groupFiltering.allowedGroups#209
Fix Helm chart environment variable merging for groupFiltering.allowedGroups#209aponcedeleonch merged 2 commits intomainfrom
Conversation
…dGroups - Fixed groupFiltering.allowedGroups not being applied to podTemplateSpec by implementing automatic env var merging - Created new template helper that merges ALLOWED_GROUPS, database URLs, and custom env vars into podTemplateSpec - Updated documentation to clarify that mcpserver.env is merged with podTemplateSpec defaults - Changed SQLite path from /tmp to /data for consistency with emptyDir volume mount - Bumped chart version to 0.1.1 and appVersion to 0.2.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
PR Review✅ StrengthsProblem Solved: Correctly fixes the groupFiltering.allowedGroups not being applied due to env var merging issue. Clean Implementation: The new
Documentation: Comprehensive README updates explain the env var merging behavior well. 🔍 Issues & Recommendations1. Potential Duplicate Environment Variables (Critical) The helper doesn't check for duplicates before appending. If Fix: Add deduplication logic (last value wins): {{- $finalEnv := list }}
{{- $envMap := dict }}
{{- range concat $container.env $additionalEnvs .Values.mcpserver.env }}
{{- $_ := set $envMap .name . }}
{{- end }}
{{- range $key, $val := $envMap }}
{{- $finalEnv = append $finalEnv $val }}
{{- end }}2. Silent Failure if podTemplateSpec is Missing Line 35 in mcpserver.yaml: Fix: Either remove the conditional (always require podTemplateSpec) or fail explicitly if missing. 3. SQLite Path Inconsistency values.yaml line 135 changed path from Recommendation: Either rename 4. Documentation Clarity README states custom env vars from 📊 SummaryMust Fix: Issue #1 (duplicate env vars) Overall solid fix, but needs duplicate handling to be production-ready. |
|
@claude please check if your comments have been addressed |
|
Claude finished @aponcedeleonch's task —— View job Review Comments StatusTodo List
✅ All Issues AddressedAll four issues from my previous review have been successfully addressed: Issue #1: Duplicate Environment Variables (Critical) ✅ FIXED
Issue #2: Silent Failure for Missing podTemplateSpec ✅ FIXED
Issue #3: SQLite Path Inconsistency ✅ FIXED
Issue #4: Documentation Clarity ✅ FIXED
SummaryThe PR is now production-ready. All critical and recommended issues have been properly addressed with clean implementations and comprehensive documentation. Job Run: https://github.com/StacklokLabs/mcp-optimizer/actions/runs/${{ github.run_id }} |
Closes: #199
🤖 Generated with Claude Code