Skip to content

Commit

Permalink
feat: refactor platform metadata
Browse files Browse the repository at this point in the history
Updates the wizard to be more correct, handle SecureBoot for !metal
choice, etc.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Jan 20, 2025
1 parent 4bb43ef commit b80192a
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 557 deletions.
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ require (
github.com/siderolabs/gen v0.8.0
github.com/siderolabs/go-debug v0.4.0
github.com/siderolabs/go-pointer v1.0.0
github.com/siderolabs/talos v1.10.0-alpha.0.0.20250116132416-4310b290d5cf
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0.0.20250116132416-4310b290d5cf
github.com/siderolabs/talos v1.10.0-alpha.0.0.20250120132938-e1efbf656ae9
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0.0.20250120132938-e1efbf656ae9
github.com/sigstore/cosign/v2 v2.4.1
github.com/sigstore/sigstore v1.8.10
github.com/slok/go-http-metrics v0.13.0
Expand Down Expand Up @@ -103,17 +103,17 @@ require (
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/containerd/cgroups/v3 v3.0.5 // indirect
github.com/containerd/containerd/api v1.8.0 // indirect
github.com/containerd/containerd/v2 v2.0.1 // indirect
github.com/containerd/containerd/v2 v2.0.2 // indirect
github.com/containerd/continuity v0.4.4 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/go-cni v1.1.11 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.0 // indirect
github.com/containerd/platforms v1.0.0-rc.1 // indirect
github.com/containerd/plugin v1.0.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/containerd/ttrpc v1.2.6 // indirect
github.com/containerd/ttrpc v1.2.7 // indirect
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/containernetworking/cni v1.2.3 // indirect
github.com/coreos/go-oidc/v3 v3.11.0 // indirect
Expand Down Expand Up @@ -156,7 +156,7 @@ require (
github.com/go-resty/resty/v2 v2.15.3 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
Expand Down Expand Up @@ -228,7 +228,7 @@ require (
github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
Expand Down Expand Up @@ -304,9 +304,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.32.0 // indirect
k8s.io/apimachinery v0.32.0 // indirect
k8s.io/client-go v0.32.0 // indirect
k8s.io/api v0.32.1 // indirect
k8s.io/apimachinery v0.32.1 // indirect
k8s.io/client-go v0.32.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
Expand Down
39 changes: 20 additions & 19 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJ
github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins=
github.com/containerd/containerd/api v1.8.0 h1:hVTNJKR8fMc/2Tiw60ZRijntNMd1U+JVMyTRdsD2bS0=
github.com/containerd/containerd/api v1.8.0/go.mod h1:dFv4lt6S20wTu/hMcP4350RL87qPWLVa/OHOwmmdnYc=
github.com/containerd/containerd/v2 v2.0.1 h1:xqSar9cjkGhfQ2YvanCu7FMLk6+pNCFMCAroM2ALPp0=
github.com/containerd/containerd/v2 v2.0.1/go.mod h1:A9DyAg+lXTiSBOsBTqQtJL4O3AGaM1aa4UHmVh4uFhM=
github.com/containerd/containerd/v2 v2.0.2 h1:GmH/tRBlTvrXOLwSpWE2vNAm8+MqI6nmxKpKBNKY8Wc=
github.com/containerd/containerd/v2 v2.0.2/go.mod h1:wIqEvQ/6cyPFUGJ5yMFanspPabMLor+bF865OHvNTTI=
github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII=
github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
Expand All @@ -246,14 +246,14 @@ github.com/containerd/go-cni v1.1.11 h1:fWt1K15AmSLsEfa57N+qYw4NeGPiQKYq1pjNGJwV
github.com/containerd/go-cni v1.1.11/go.mod h1:/Y/sL8yqYQn1ZG1om1OncJB1W4zN3YmjfP/ShCzG/OY=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/platforms v1.0.0-rc.0 h1:GuHWSKgVVO3POn6nRBB4sH63uPOLa87yuuhsGLWaXAA=
github.com/containerd/platforms v1.0.0-rc.0/go.mod h1:T1XAzzOdYs3it7l073MNXyxRwQofJfqwi/8cRjufIk4=
github.com/containerd/platforms v1.0.0-rc.1 h1:83KIq4yy1erSRgOVHNk1HYdPvzdJ5CnsWaRoJX4C41E=
github.com/containerd/platforms v1.0.0-rc.1/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVRzJGXfNuWCZCllLA4=
github.com/containerd/plugin v1.0.0 h1:c8Kf1TNl6+e2TtMHZt+39yAPDbouRH9WAToRjex483Y=
github.com/containerd/plugin v1.0.0/go.mod h1:hQfJe5nmWfImiqT1q8Si3jLv3ynMUIBB47bQ+KexvO8=
github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k=
github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o=
github.com/containerd/ttrpc v1.2.6 h1:zG+Kn5EZ6MUYCS1t2Hmt2J4tMVaLSFEJVOraDQwNPC4=
github.com/containerd/ttrpc v1.2.6/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o=
github.com/containerd/ttrpc v1.2.7 h1:qIrroQvuOL9HQ1X6KHe2ohc7p+HP/0VE6XPU7elJRqQ=
github.com/containerd/ttrpc v1.2.7/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o=
github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40=
github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk=
github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8FuJbEslXM=
Expand Down Expand Up @@ -385,8 +385,9 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
Expand Down Expand Up @@ -667,8 +668,8 @@ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/j
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0=
github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0=
github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc=
github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf h1:014O62zIzQwvoD7Ekj3ePDF5bv9Xxy0w6AZk0qYbjUk=
Expand Down Expand Up @@ -734,10 +735,10 @@ github.com/siderolabs/net v0.4.0 h1:1bOgVay/ijPkJz4qct98nHsiB/ysLQU0KLoBC4qLm7I=
github.com/siderolabs/net v0.4.0/go.mod h1:/ibG+Hm9HU27agp5r9Q3eZicEfjquzNzQNux5uEk0kM=
github.com/siderolabs/protoenc v0.2.1 h1:BqxEmeWQeMpNP3R6WrPqDatX8sM/r4t97OP8mFmg6GA=
github.com/siderolabs/protoenc v0.2.1/go.mod h1:StTHxjet1g11GpNAWiATgc8K0HMKiFSEVVFOa/H0otc=
github.com/siderolabs/talos v1.10.0-alpha.0.0.20250116132416-4310b290d5cf h1:zD6Dcm/g60RmD4kt9AGNDRVRO26WSrvFUbZyPXj7p7U=
github.com/siderolabs/talos v1.10.0-alpha.0.0.20250116132416-4310b290d5cf/go.mod h1:IqY8uRcCR285Wd9HYtTsZ+n+abOQrgo5MBG943pFNXk=
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0.0.20250116132416-4310b290d5cf h1:YHQUND41hZKlWuM1ZgaqRnA3pRxJg8Jp7RO682imzJk=
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0.0.20250116132416-4310b290d5cf/go.mod h1:fMr/HqObJzfWjrSoBRWLyB7qnzDzIsN6IkmSbrokQKk=
github.com/siderolabs/talos v1.10.0-alpha.0.0.20250120132938-e1efbf656ae9 h1:G3EetVig8f/ubVlgD/9LnjvOWLzd/xmqDd+1StaTWrY=
github.com/siderolabs/talos v1.10.0-alpha.0.0.20250120132938-e1efbf656ae9/go.mod h1:6H79Zi7KsPeNzjKpU5DEkSe9+VAhk1T2J7PMWSjE4Dg=
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0.0.20250120132938-e1efbf656ae9 h1:yoYkVGc43QbBwSkm71VzlM7DlyEnc2VtYQk+NnfALTs=
github.com/siderolabs/talos/pkg/machinery v1.10.0-alpha.0.0.20250120132938-e1efbf656ae9/go.mod h1:fMr/HqObJzfWjrSoBRWLyB7qnzDzIsN6IkmSbrokQKk=
github.com/sigstore/cosign/v2 v2.4.1 h1:b8UXEfJFks3hmTwyxrRNrn6racpmccUycBHxDMkEPvU=
github.com/sigstore/cosign/v2 v2.4.1/go.mod h1:GvzjBeUKigI+XYnsoVQDmMAsMMc6engxztRSuxE+x9I=
github.com/sigstore/fulcio v1.6.3 h1:Mvm/bP6ELHgazqZehL8TANS1maAkRoM23CRAdkM4xQI=
Expand Down Expand Up @@ -1109,12 +1110,12 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE=
k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0=
k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg=
k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8=
k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8=
k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc=
k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k=
k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs=
k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU=
k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y=
Expand Down
120 changes: 61 additions & 59 deletions internal/frontend/http/templates/wizard-final.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,10 @@ <h2>First Boot</h2>
<p>Use the following disk image for {{ .BoardMeta.Label }}:</p>
{{ end }}
<dl>
{{ if eq .Target "metal" }}
{{ if eq .SecureBoot "true" }}
{{ template "secureboot-iso" . }}
{{ template "secureboot-metal-image" . }}
{{ else }}
{{ template "iso" . }}
{{ template "metal-image" . }}
{{ template "pxe-boot" . }}
{{ end }}
{{ else if eq .Target "cloud" }}
{{ if or (eq .Target "metal") (eq .Target "cloud") }}
{{ range .PlatformMeta.BootMethods }}
{{ if eq . "disk-image" }}
{{ template "cloud-image" $ }}
{{ template "disk-image" $ }}
{{ else if eq . "iso" }}
{{ template "iso" $ }}
{{ else if eq . "pxe" }}
Expand Down Expand Up @@ -100,64 +91,75 @@ <h2>Extra Assets</h2>
{{ end }}

{{ define "iso" }}
<dt>ISO</dt>
<dd><a href="{{ printf "%s-%s.iso" .Platform .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "%s-%s.iso" .Platform .Arch | $.ImageBaseURL.JoinPath }}</a>
{{ if eq .SecureBoot "true" }}
<dt>SecureBoot ISO</dt>
<dd><a href="{{ .PlatformMeta.SecureBootISOPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.SecureBootISOPath .Arch | $.ImageBaseURL.JoinPath }}</a>
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/secureboot/" target="_blank">SecureBoot documentation</a>)
</dd>
{{ else}}
<dt>ISO</dt>
<dd><a href="{{ .PlatformMeta.ISOPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.ISOPath .Arch | $.ImageBaseURL.JoinPath }}</a>

{{ if eq .Target "metal" }}
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/iso/" target="_blank">ISO documentation</a>)
{{ if eq .Target "metal" }}
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/iso/" target="_blank">ISO documentation</a>)
{{ end }}
</dd>
{{ end }}
</dd>
{{ end }}

{{ define "secureboot-iso" }}
<dt>SecureBoot ISO</dt>
<dd><a href="{{ printf "%s-%s-secureboot.iso" .Platform .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "%s-%s-secureboot.iso" .Platform .Arch | $.ImageBaseURL.JoinPath }}</a>
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/secureboot/" target="_blank">SecureBoot documentation</a>)
</dd>
{{ define "disk-image" }}
{{ if eq .SecureBoot "true" }}
<dt>SecureBoot Disk Image</dt>
<dd><a href="{{ .PlatformMeta.SecureBootDiskImageDefaultPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.SecureBootDiskImageDefaultPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
{{ if eq .Target "metal" }}
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/secureboot/" target="_blank">SecureBoot documentation</a>)
{{ end }}
</dd>
{{ else }}
{{ if eq .Target "metal" }}
<dt>Disk Image (raw)</dt>
<dd><a href="{{ .PlatformMeta.DiskImageDefaultPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.DiskImageDefaultPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
<dt>Disk Image (qcow2)</dt>
<dd><a href="{{ .PlatformMeta.DiskImagePath .Arch "qcow2" | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.DiskImagePath .Arch "qcow2" |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ else }}
<dt>Disk Image</dt>
<dd><a href="{{ .PlatformMeta.DiskImageDefaultPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.DiskImageDefaultPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ end }}
{{ end}}
{{ end }}

{{ define "metal-image" }}
<dt>Disk Image (raw)</dt>
<dd><a href="{{ printf "metal-%s.raw.zst" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "metal-%s.raw.zst" .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
<dt>Disk Image (qcow2)</dt>
<dd><a href="{{ printf "metal-%s.qcow2" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "metal-%s.qcow2" .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ end }}
{{ define "pxe-boot" }}
{{ if eq .SecureBoot "true" }}
<dt>SecureBoot PXE (iPXE script)</dt>
<dd>{{ .PlatformMeta.SecureBootPXEScriptPath .Arch | $.PXEBaseURL.JoinPath }}</dd>

{{ define "cloud-image" }}
<dt>Disk Image</dt>
<dd><a href="{{ printf "%s-%s.%s" .Platform .Arch .PlatformMeta.DiskImageSuffix | $.ImageBaseURL.JoinPath }}">{{ printf "%s-%s.%s" .Platform .Arch .PlatformMeta.DiskImageSuffix |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ if eq .Target "metal" }}
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/pxe/" target="_blank">PXE documentation</a>)
{{ end }}
{{ else }}
<dt>PXE boot (iPXE script)</dt>
<dd>{{ .PlatformMeta.PXEScriptPath .Arch | $.PXEBaseURL.JoinPath }}</dd>

{{ if eq .Target "metal" }}
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/pxe/" target="_blank">PXE documentation</a>)
{{ end }}
{{ end }}
{{ end }}

{{ define "board-image" }}
<dt>Disk Image</dt>
<dd><a href="{{ printf "metal%s-arm64.raw.xz" .LegacyBoard | $.ImageBaseURL.JoinPath }}">{{ printf "metal%s-arm64.raw.xz" .LegacyBoard |
<dd><a href="{{ .BoardMeta.DiskImagePath .Version | $.ImageBaseURL.JoinPath }}">{{ .BoardMeta.DiskImagePath .Version |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ end }}

{{ define "secureboot-metal-image" }}
<dt>SecureBoot Disk Image</dt>
<dd><a href="{{ printf "metal-%s-secureboot.raw.zst" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "metal-%s-secureboot.raw.zst" .Arch |
$.ImageBaseURL.JoinPath }}</a>
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/secureboot/" target="_blank">SecureBoot documentation</a>)
</dd>
{{ end }}

{{ define "pxe-boot" }}
<dt>PXE boot (iPXE script)</dt>
<dd>{{ printf "%s-%s" .Platform .Arch | $.PXEBaseURL.JoinPath }}</dd>

{{ if eq .Target "metal" }}
(<a href="https://www.talos.dev/{{ short_version .Version }}/talos-guides/install/bare-metal-platforms/pxe/" target="_blank">PXE documentation</a>)
{{ end }}
{{ end }}

{{ define "installer-image" }}
<span class="font-mono bg-slate-200 dark:bg-slate-700 p-1">
{{ if eq .SecureBoot "true"}}
Expand All @@ -170,26 +172,26 @@ <h2>Extra Assets</h2>

{{ define "extra-assets" }}
<dt>Kernel Image</dt>
<dd><a href="{{ printf "kernel-%s" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "kernel-%s" .Arch |
<dd><a href="{{ .PlatformMeta.KernelPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.KernelPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
<dt>Kernel Command Line</dt>
<dd><a href="{{ printf "cmdline-metal-%s" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "cmdline-metal-%s" .Arch |
<dd><a href="{{ .PlatformMeta.CmdlinePath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.CmdlinePath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
<dt>Initramfs Image</dt>
<dd><a href="{{ printf "initramfs-%s.xz" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "initramfs-%s.xz" .Arch |
<dd><a href="{{ .PlatformMeta.InitramfsPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.InitramfsPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
<dt>UKI</dt>
<dd><a href="{{ printf "metal-%s-uki.efi" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "metal-%s-uki.efi" .Arch |
<dd><a href="{{ .PlatformMeta.UKIPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.UKIPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ end }}

{{ define "secureboot-extra-assets" }}
<dt>SecureBoot UKI</dt>
<dd><a href="{{ printf "metal-%s-secureboot-uki.efi" .Arch | $.ImageBaseURL.JoinPath }}">{{ printf "metal-%s-secureboot-uki.efi" .Arch |
<dd><a href="{{ .PlatformMeta.SecureBootUKIPath .Arch | $.ImageBaseURL.JoinPath }}">{{ .PlatformMeta.SecureBootUKIPath .Arch |
$.ImageBaseURL.JoinPath }}</a>
</dd>
{{ end }}
Expand Down
Loading

0 comments on commit b80192a

Please sign in to comment.