Conversation
Signed-off-by: Dmitry Shmulevich <dshmulevich@nvidia.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #376 +/- ##
==========================================
+ Coverage 71.31% 71.52% +0.20%
==========================================
Files 86 88 +2
Lines 5574 5643 +69
==========================================
+ Hits 3975 4036 +61
- Misses 1403 1407 +4
- Partials 196 200 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThis PR fixes the
Confidence Score: 4/5Safe to merge; the fix corrects a clear misconfiguration in the node-observer ConfigMap and is well-covered by updated snapshot and subchart integration tests. The change is targeted and correct for the default deployment case. The one gap — the subchart branch hardcoding 'topograph' without consulting nameOverride or fullnameOverride — would cause the node-observer to point at the wrong service name if users set those overrides on the topograph subchart, but this scenario is uncommon and the previous code was already broken in all cases. charts/topograph/templates/_helpers.tpl — specifically the subchart branch of topograph.serviceName (lines 84–92) which skips override checks. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["include 'topograph.url' $"] --> B["include 'topograph.serviceName' ."]
B --> C{".Chart.Name == 'topograph'?"}
C -- Yes --> D["include 'topograph.fullname' .\n(honors fullnameOverride / nameOverride)"]
C -- No\nSubchart context --> E["hardcode name := 'topograph'"]
E --> F{".Release.Name contains 'topograph'?"}
F -- Yes --> G[".Release.Name | trunc 63 | trimSuffix '-'"]
F -- No --> H["printf '%s-%s' .Release.Name 'topograph' | trunc 63"]
D --> I["Assemble URL\nhttp://serviceName.namespace.svc.cluster.local:port"]
G --> I
H --> I
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["include 'topograph.url' $"] --> B["include 'topograph.serviceName' ."]
B --> C{".Chart.Name == 'topograph'?"}
C -- Yes --> D["include 'topograph.fullname' .\n(honors fullnameOverride / nameOverride)"]
C -- No\nSubchart context --> E["hardcode name := 'topograph'"]
E --> F{".Release.Name contains 'topograph'?"}
F -- Yes --> G[".Release.Name | trunc 63 | trimSuffix '-'"]
F -- No --> H["printf '%s-%s' .Release.Name 'topograph' | trunc 63"]
D --> I["Assemble URL\nhttp://serviceName.namespace.svc.cluster.local:port"]
G --> I
H --> I
Reviews (1): Last reviewed commit: "fix(helm): point node-observer at render..." | Re-trigger Greptile |
| {{- else }} | ||
| {{- /* Subcharts render with their own .Chart.Name, so use the parent chart name explicitly. */}} | ||
| {{- $name := "topograph" }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} |
There was a problem hiding this comment.
Subchart path ignores
nameOverride and fullnameOverride
When topograph.serviceName is evaluated from a subchart context (e.g., node-observer), it hardcodes "topograph" as the chart name and skips the fullnameOverride/nameOverride checks that topograph.fullname performs on lines 14–23. If a user sets fullnameOverride: my-svc (or nameOverride: my-svc) in the topograph chart's values.yaml, the actual Service will be named my-svc but the node-observer configmap will still resolve to <release>-topograph, breaking connectivity. One way to close the gap would be exposing global.topographServiceName so subcharts can consume it without needing to replicate parent-chart value scoping.
Description
Build generateTopologyUrl from the Topograph Service fullname so the
node-observer targets the Service actually rendered by the chart.
Checklist
git commit -s).