Skip to content

feat(helm): ingress#115

Open
Nold360 wants to merge 1 commit intoJont828:mainfrom
Nold360:feat/helm-ingress
Open

feat(helm): ingress#115
Nold360 wants to merge 1 commit intoJont828:mainfrom
Nold360:feat/helm-ingress

Conversation

@Nold360
Copy link
Copy Markdown

@Nold360 Nold360 commented Mar 27, 2026

Simple ingress addition to the helm chart.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

The pull request adds Ingress support to the cluster-api-visualizer Helm chart. A new Ingress template was created with conditional rendering, while configuration values were added to enable optional TLS, hostname, and class settings. The chart version was bumped to 1.6.0.

Changes

Cohort / File(s) Summary
Chart Metadata
helm/cluster-api-visualizer/Chart.yaml
Version updated from 1.5.0 to 1.6.0; appVersion remains at v1.5.0.
Ingress Configuration
helm/cluster-api-visualizer/templates/ingress.yaml, helm/cluster-api-visualizer/values.yaml
New Ingress template added with conditional rendering on ingress.enabled. Supports optional annotations, className, and TLS configuration. New values block defines ingress settings (hostname: capi-visualizer.local, disabled by default) with example configurations commented out.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A new gateway opens wide,
Ingress templates step with pride,
TLS secrets tucked away,
Routing traffic, come what may,
Version six hops down the hay! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(helm): ingress' accurately describes the main change: adding ingress support to the Helm chart with a new ingress template, values configuration, and version bump.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
helm/cluster-api-visualizer/templates/ingress.yaml (1)

29-29: Consider Prefix instead of ImplementationSpecific for predictable cross-controller behavior.

ImplementationSpecific leaves path matching semantics to the controller. NGINX Ingress treats it as equivalent to Prefix by default, but Traefik interprets it as flexible string prefix matching (unlike strict Prefix). For consistent, spec-compliant behavior across NGINX, Traefik, and other controllers, use Prefix for root path /.

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

In `@helm/cluster-api-visualizer/templates/ingress.yaml` at line 29, Change the
Ingress pathType from ImplementationSpecific to Prefix for the root path to
ensure consistent, spec-compliant prefix matching across controllers; locate the
Ingress resource where the pathType field is set (look for the path with "/" in
the ingress.yaml template) and replace the value "ImplementationSpecific" with
"Prefix" so controllers like NGINX and Traefik will behave predictably.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@helm/cluster-api-visualizer/templates/ingress.yaml`:
- Line 5: The templates currently hardcode the resource name "capi-visualizer",
causing collisions across releases; replace those hardcoded names (e.g., the
name field in ingress.yaml and the other templates that reference
"capi-visualizer") with a release-aware helper: add a fullname helper in
_helpers.tpl (or use {{ .Release.Name }}-capi-visualizer) and reference that
helper consistently across ingress.yaml (both occurrences), service.yaml,
deployment.yaml, clusterrole.yaml, clusterrolebinding.yaml, and
serviceaccount.yaml so every resource name uses the release-prefixed fullname
helper instead of the literal "capi-visualizer".

---

Nitpick comments:
In `@helm/cluster-api-visualizer/templates/ingress.yaml`:
- Line 29: Change the Ingress pathType from ImplementationSpecific to Prefix for
the root path to ensure consistent, spec-compliant prefix matching across
controllers; locate the Ingress resource where the pathType field is set (look
for the path with "/" in the ingress.yaml template) and replace the value
"ImplementationSpecific" with "Prefix" so controllers like NGINX and Traefik
will behave predictably.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dce007b4-a16e-42e0-a6c9-1519012ba17f

📥 Commits

Reviewing files that changed from the base of the PR and between b248008 and 9e4c77b.

📒 Files selected for processing (3)
  • helm/cluster-api-visualizer/Chart.yaml
  • helm/cluster-api-visualizer/templates/ingress.yaml
  • helm/cluster-api-visualizer/values.yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: capi-visualizer
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Mar 27, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify hardcoded naming usage and helper availability in chart templates (read-only).
rg -n -C2 'name:\s*capi-visualizer|serviceAccountName:\s*capi-visualizer' helm/cluster-api-visualizer/templates
fd '_helpers.tpl' helm/cluster-api-visualizer -x sed -n '1,220p' {}

Repository: Jont828/cluster-api-visualizer

Length of output: 4103


🏁 Script executed:

fd '_helpers.tpl' helm/cluster-api-visualizer

Repository: Jont828/cluster-api-visualizer

Length of output: 56


🏁 Script executed:

ls -la helm/cluster-api-visualizer/templates/
cat -n helm/cluster-api-visualizer/values.yaml

Repository: Jont828/cluster-api-visualizer

Length of output: 1154


🏁 Script executed:

cat -n helm/cluster-api-visualizer/templates/ingress.yaml
cat -n helm/cluster-api-visualizer/templates/service.yaml

Repository: Jont828/cluster-api-visualizer

Length of output: 1589


🏁 Script executed:

cat -n helm/cluster-api-visualizer/templates/deployment.yaml
cat -n helm/cluster-api-visualizer/templates/clusterrole.yaml

Repository: Jont828/cluster-api-visualizer

Length of output: 2084


Replace hardcoded capi-visualizer names with release-aware templating to support multi-release deployments.

Hardcoded resource names prevent proper release isolation. Multiple releases of this chart will collide on the same resource names (Ingress, Service, Deployment, ServiceAccount, ClusterRole, ClusterRoleBinding all hardcode capi-visualizer).

Use {{ .Release.Name }}-capi-visualizer or create a _helpers.tpl with a fullname template helper (standard Helm pattern) and reference it consistently across all templates. Apply to ingress.yaml (lines 5, 32), service.yaml, deployment.yaml, clusterrole.yaml, clusterrolebinding.yaml, and serveaccount.yaml.

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

In `@helm/cluster-api-visualizer/templates/ingress.yaml` at line 5, The templates
currently hardcode the resource name "capi-visualizer", causing collisions
across releases; replace those hardcoded names (e.g., the name field in
ingress.yaml and the other templates that reference "capi-visualizer") with a
release-aware helper: add a fullname helper in _helpers.tpl (or use {{
.Release.Name }}-capi-visualizer) and reference that helper consistently across
ingress.yaml (both occurrences), service.yaml, deployment.yaml,
clusterrole.yaml, clusterrolebinding.yaml, and serviceaccount.yaml so every
resource name uses the release-prefixed fullname helper instead of the literal
"capi-visualizer".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

that would be a good idea, but it's currently not implemented in the chart ;-)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Nold360, fair point — the hardcoded capi-visualizer naming is a pre-existing pattern across the whole chart (Deployment, Service, ClusterRole, etc.), so the new ingress template is simply following the established convention. This PR isn't the right place to refactor all of that.

Would you like me to open a follow-up GitHub issue to track adding a _helpers.tpl with a release-aware fullname helper and updating all templates consistently? That way it doesn't get lost.

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.

1 participant