Skip to content

Commit

Permalink
Merge pull request #5 from aenix-io/fix-disk
Browse files Browse the repository at this point in the history
Fix: always specify disk, even if system_disk not found
  • Loading branch information
kvaps authored May 30, 2024
2 parents 5651f91 + e799168 commit c4aa52b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion charts/talm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{{- define "talm.discovered.system_disk_name" }}
{{- $disk := "" }}
{{- range .Disks }}
{{- if eq $disk "" }}
{{- $disk = .device_name }}
{{- end }}
{{- if .system_disk }}
{{- .device_name }}
{{- $disk = .device_name }}
{{- end }}
{{- end }}
{{- $disk }}
{{- end }}

{{- define "talm.discovered.machinetype" }}
Expand Down
7 changes: 6 additions & 1 deletion pkg/generated/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,16 @@ version: %s
description: A library Talm chart for Talos Linux
`,
"talm/templates/_helpers.tpl": `{{- define "talm.discovered.system_disk_name" }}
{{- $disk := "" }}
{{- range .Disks }}
{{- if eq $disk "" }}
{{- $disk = .device_name }}
{{- end }}
{{- if .system_disk }}
{{- .device_name }}
{{- $disk = .device_name }}
{{- end }}
{{- end }}
{{- $disk }}
{{- end }}
{{- define "talm.discovered.machinetype" }}
Expand Down

0 comments on commit c4aa52b

Please sign in to comment.