Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/karmada-dashboard/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- 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?

{{- $svcPort := .Values.web.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
Expand Down