talos-extensions/hack/catalog.template
Andrey Smirnov 263f699ea4
chore: annotate extensions with tiers
Fixes #10940

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-26 20:58:30 +04:00

59 lines
2.0 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ define "description" }}
{{- range .TemplatedFiles -}}
{{- if eq .Path "manifest.yaml" -}}
{{- $manifest := .Content | toString | mustFromYAML -}}
{{- $description := index $manifest "metadata" "description" | replace "\n" " " -}}
{{- regexReplaceAll "\\[\\w+\\]" $description "" -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ define "extension-list" }}
| Name | Tier | Image | Version | Description |
| ---- | ---- | ----- | ------- | ----------- |
{{- $tiers := (dict "core" ":green_square:" "extra" ":yellow_square:" "contrib" ":white_large_square:") }}
{{ range .Pkgs -}}
{{ if hasPrefix $.BaseDir .Pkg.BaseDir -}}
{{ if not .Pkg.Context.INTERNAL_PACKAGE -}}
| [{{ .Pkg.Name }}]({{ .Pkg.BaseDir }}) | {{ index $tiers .Pkg.Context.TIER }} {{ .Pkg.Context.TIER }} | [ghcr.io/siderolabs/{{ .Pkg.Name }}](https://github.com/siderolabs/extensions/pkgs/container/{{ .Pkg.Name }}) | `{{ .Pkg.Context.VERSION }}` | {{ template "description" .Pkg -}} |
{{ end }}
{{- end }}
{{- end }}
{{ end -}}
### Container Runtimes
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "container-runtime/") -}}
### Firmware
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "firmware/") -}}
### Direct Rendering Manager (DRM)
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "drm/") -}}
### Drivers
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "drivers/") -}}
### Digital Video Broadcasting (DVB)
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "dvb/") -}}
### Miscellaneous
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "misc/") -}}
### Network
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "network/") -}}
### Storage
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "storage/") -}}
### Power
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "power/") -}}
### Guest Agents
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "guest-agents/") -}}
### NVIDIA GPU
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "nvidia-gpu/") -}}
### Tools
{{ template "extension-list" (dict "Pkgs" . "BaseDir" "tools/") -}}