@@ -32,14 +32,49 @@ type ShimSpec struct {
3232}
3333
3434type FetchStrategy struct {
35- Type string `json:"type"`
36- AnonHTTP AnonHTTPSpec `json:"anonHttp"`
35+ // Type is the fetch strategy type.
36+ //
37+ // Deprecated: this field is ignored by the controller and exists only
38+ // for backward compatibility with existing manifests that specify it.
39+ //
40+ // +optional
41+ Type string `json:"type,omitempty"`
42+
43+ // AnonHTTP fetches a binary from a public HTTP(S) URL.
44+ // For backward compatibility with single-architecture deployments.
45+ // When Platforms is also specified, Platforms takes precedence.
46+ // +optional
47+ AnonHTTP * AnonHTTPSpec `json:"anonHttp,omitempty"`
48+
49+ // Platforms lists per-OS/architecture artifact sources.
50+ // The controller selects the matching entry for each target node.
51+ // When specified, this takes precedence over AnonHTTP.
52+ // +optional
53+ Platforms []PlatformArtifact `json:"platforms,omitempty"`
3754}
3855
56+ // AnonHTTPSpec defines a simple anonymous HTTP fetch (single URL, single architecture).
3957type AnonHTTPSpec struct {
58+ // Location is the direct URL to the artifact archive.
4059 Location string `json:"location"`
4160}
4261
62+ // PlatformArtifact maps a specific OS/Arch pair to an artifact URL.
63+ type PlatformArtifact struct {
64+ // OS is the operating system. Currently only "Linux" is supported.
65+ // +kubebuilder:validation:Enum=linux
66+ OS string `json:"os"`
67+ // Arch is the CPU architecture.
68+ // Accepts Go-style ("amd64", "arm64") or uname-style ("x86_64", "aarch64").
69+ // +kubebuilder:validation:Enum=amd64;arm64;x86_64;aarch64
70+ Arch string `json:"arch"`
71+ // Location is the URL to the artifact archive for this platform. Must be publicly accessible.
72+ Location string `json:"location"`
73+ // SHA256 is the optional hex-encoded SHA-256 digest for verification.
74+ // +optional
75+ SHA256 string `json:"sha256,omitempty"`
76+ }
77+
4378type RuntimeClassSpec struct {
4479 Name string `json:"name"`
4580 Handler string `json:"handler"`
0 commit comments