Skip to content

Shim fetchStrategy: support arch-agnostic config #574

@vdice

Description

@vdice

Currently a Shim's fetchStrategy supports only anonymousHttp and under this configuration a static location is expected, representing the URL to the shim binary location to fetch/download. This means the location is specific to a given architecture. This in turn means the entire Shim resource itself is tied to a particular shim architecture.

It would be preferable to allow specifying architecture-agnostic configuration for where to fetch the shim binary from. Since the actual download logic is currently in the form of the download_shim.sh script, it is able to introspect the arch it is running in (currently, in the form of a Docker image, in which we ship linux/amd64 and linux/arm64 flavors as of writing).

If one surveys the test shims, a common pattern emerges of supplying a GitHub release URL as the location. Extending this, one idea could be to add a new githubRelease fetchStrategy wherein the release URL would be provided (either location or url), e.g. https://github.com/spinframework/containerd-shim-spin/releases/tag/v0.22.0 and an artifact/asset prefix or regex/splat, something like e.g. artifactSplat: containerd-shim-spin-v2-* (continuing the example using containerd-shim-spin).

That last bit just represents a first idea off the top of my head. The general goal here is to uncouple a Shim resource (specifically its shim binary download configuration) from node architecture -- in other words, let the shim-downloader logic figure out which binary suits the architecture it is running on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions