Skip to content

Fix broken Ingress service name and port configuration#429

Open
RafsanNeloy wants to merge 1 commit intokarmada-io:mainfrom
RafsanNeloy:ingress-service-and-port-config
Open

Fix broken Ingress service name and port configuration#429
RafsanNeloy wants to merge 1 commit intokarmada-io:mainfrom
RafsanNeloy:ingress-service-and-port-config

Conversation

@RafsanNeloy
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it: Fixes two issues in the ingress.yaml that were preventing the Ingress resource from correctly routing traffic to the Karmada Dashboard.
##Fixed Port Reference
Changed .Values.service.port (which does not exist) to .Values.web.service.port to correctly reference the web service port as defined.
##Updated Backend service name
The Ingress backend was targeting {{ .Release.Name }}-karmada-dashboard, while the actual service created by the chart includes a -web suffix ({{ .Release.Name }}-karmada-dashboard-web). Also Updated the $fullName variable to include the -web suffix so it targets the correct backend service.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Signed-off-by: rafsanneloy <rafsanneloy@gmail.com>
@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 14, 2026
@karmada-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign samzong for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot requested a review from jhnine February 14, 2026 11:06
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @RafsanNeloy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves two critical configuration issues within the ingress.yaml template for the Karmada Dashboard Helm chart. The changes ensure that the Ingress resource correctly routes external traffic to the dashboard's web service by rectifying an incorrect port reference and aligning the backend service name with the actual deployed service, thereby fixing traffic routing failures.

Highlights

  • Fixed Port Reference: Changed the service port variable from .Values.service.port to .Values.web.service.port to correctly reference the web service port as defined in the Helm chart values.
  • Updated Backend Service Name: Modified the $fullName variable to include the -web suffix, ensuring the Ingress backend targets the correct service name, which is {{ .Release.Name }}-karmada-dashboard-web.
Changelog
  • charts/karmada-dashboard/templates/ingress.yaml
    • Updated the $fullName variable to include the -web suffix for the service name.
    • Corrected the service port variable reference from .Values.service.port to .Values.web.service.port.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 14, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes two bugs in the Ingress configuration: it points to the correct service port and updates the service name to match the karmada-dashboard-web service. While the fix is functional, the approach for correcting the service name deviates from Helm best practices by not using the full release name. This could lead to issues with fullnameOverride and potential resource name conflicts in the future. I have added a comment with a recommendation for a more robust long-term solution.

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "karmada-dashboard.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- $fullName := printf "%s-web" (include "karmada-dashboard.name" .) -}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

While this change correctly targets the karmada-dashboard-web service, it switches from using the karmada-dashboard.fullname helper to karmada-dashboard.name. The name helper does not include the Helm release name and ignores the fullnameOverride value. This is a deviation from Helm best practices and can lead to resource name collisions if multiple instances of this chart are deployed in the same namespace.

The underlying issue is that the target service in karmada-dashboard-web-service.yaml is also named using karmada-dashboard.name. A more robust fix would involve updating both the service and this Ingress to use fullname as the base for their names (e.g., {{ include "karmada-dashboard.fullname" . }}-web).

Although this change fixes the immediate connectivity bug, I recommend creating a follow-up issue to address this naming inconsistency to improve chart maintainability.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@warjiang should i update the line with
{{ include "karmada-dashboard.fullname" . }}-web) ? what do u think?

@warjiang
Copy link
Copy Markdown
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants