Skip to content

fix(ext-proxy): remove hardcoded ports in ext-proxy helm chart#368

Merged
verbotenj merged 1 commit intomainfrom
fix-ext-proxy-hardcoded-ports
Apr 9, 2026
Merged

fix(ext-proxy): remove hardcoded ports in ext-proxy helm chart#368
verbotenj merged 1 commit intomainfrom
fix-ext-proxy-hardcoded-ports

Conversation

@verbotenj
Copy link
Copy Markdown
Contributor

@verbotenj verbotenj commented Apr 9, 2026


Summary by cubic

Replaced hardcoded ports in the ext-proxy Helm chart with a values-driven loop so ports are configurable and can include multiple entries. Made PodMonitor metrics port configurable via podMonitor.metricsPort; bumped chart version to 0.0.7.

Written for commit 7380963. Summary will update on new commits.

Summary by CodeRabbit

  • Chores

    • Release version bumped to 0.0.7
    • Added a configurable metrics port for pod monitoring
  • Refactor

    • Container port entries are now generated dynamically from customizable values, allowing flexible port configuration without template edits

@verbotenj verbotenj requested review from a team as code owners April 9, 2026 00:39
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 822117a4-dc58-4d71-be79-f06f1af4a509

📥 Commits

Reviewing files that changed from the base of the PR and between 5a0c24a and 7380963.

📒 Files selected for processing (4)
  • charts/ext-proxy/Chart.yaml
  • charts/ext-proxy/templates/podmonitor.yaml
  • charts/ext-proxy/templates/proxy.yaml
  • charts/ext-proxy/values.yaml
✅ Files skipped from review due to trivial changes (4)
  • charts/ext-proxy/templates/podmonitor.yaml
  • charts/ext-proxy/values.yaml
  • charts/ext-proxy/templates/proxy.yaml
  • charts/ext-proxy/Chart.yaml

📝 Walkthrough

Walkthrough

The PR updates the ext-proxy Helm chart: Chart.yaml version bumped 0.0.6 → 0.0.7. The Deployment template (proxy.yaml) replaces hardcoded container ports with a loop over .Values.proxy.ports, emitting a name and containerPort per map entry with protocol: TCP. The PodMonitor template uses {{ .Values.podMonitor.metricsPort }} for its endpoint port, and values.yaml adds podMonitor.metricsPort: metrics.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: removing hardcoded ports from the ext-proxy Helm chart and making them values-driven, which is the primary objective of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ext-proxy-hardcoded-ports

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.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
charts/ext-proxy/templates/proxy.yaml (1)

46-50: Add fail-fast validation for the metrics port when PodMonitor is enabled.

The container ports on Lines 46-50 are rendered dynamically from .Values.proxy.ports, but podmonitor.yaml:16 has a hardcoded dependency on port: metrics. Users who remove metrics from custom values while keeping podMonitor.enabled: true will silently create a broken configuration. Add validation to require the metrics port key whenever PodMonitor is enabled.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/ext-proxy/templates/proxy.yaml` around lines 46 - 50, The template
renders container ports from .Values.proxy.ports but doesn't validate presence
of the "metrics" key while podMonitor.enabled can reference it; add a Helm
template guard that checks podMonitor.enabled and ensures hasKey
.Values.proxy.ports "metrics" (or use required on .Values.proxy.ports.metrics)
and fail early with a clear message if missing, placing this check before the
range in the proxy.yaml template so PodMonitor (podmonitor) won't be generated
against a non-existent metrics port.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@charts/ext-proxy/templates/proxy.yaml`:
- Around line 46-50: The template renders container ports from
.Values.proxy.ports but doesn't validate presence of the "metrics" key while
podMonitor.enabled can reference it; add a Helm template guard that checks
podMonitor.enabled and ensures hasKey .Values.proxy.ports "metrics" (or use
required on .Values.proxy.ports.metrics) and fail early with a clear message if
missing, placing this check before the range in the proxy.yaml template so
PodMonitor (podmonitor) won't be generated against a non-existent metrics port.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: feb60374-cb58-4df2-828a-5c3fc5ba7857

📥 Commits

Reviewing files that changed from the base of the PR and between 809561a and 5a0c24a.

📒 Files selected for processing (2)
  • charts/ext-proxy/Chart.yaml
  • charts/ext-proxy/templates/proxy.yaml

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Signed-off-by: Ales Verbic <verbotenj@blinklabs.io>
@verbotenj verbotenj force-pushed the fix-ext-proxy-hardcoded-ports branch from 5a0c24a to 7380963 Compare April 9, 2026 01:00
@verbotenj verbotenj merged commit f5e8db2 into main Apr 9, 2026
6 checks passed
@verbotenj verbotenj deleted the fix-ext-proxy-hardcoded-ports branch April 9, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants