Skip to content

Commit 2ba7459

Browse files
kvapsclaude
andauthored
fix(chart): cast metadata.id to string for regexMatch in physical_links_info (#110)
After the metadata extraction refactor in 2b5746e, metadata fields are stored as interface{} in map[string]interface{}. The regexMatch Sprig function strictly requires a string argument, causing template rendering to fail with "expected string; got interface {}". Signed-off-by: Andrei Kvapil <kvapss@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 79a15eb commit 2ba7459

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

charts/talm/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
{{- define "talm.discovered.physical_links_info" }}
8686
# -- Discovered interfaces:
8787
{{- range (lookup "links" "" "").items }}
88-
{{- if and .spec.busPath (regexMatch "^(eno|eth|enp|enx|ens)" .metadata.id) }}
88+
{{- if and .spec.busPath (regexMatch "^(eno|eth|enp|enx|ens)" (.metadata.id | toString)) }}
8989
# {{ .metadata.id }}:
9090
# hardwareAddr:{{ .spec.hardwareAddr }}
9191
# busPath: {{ .spec.busPath }}

0 commit comments

Comments
 (0)