Skip to content

Reduce usage of //go:embed (containerd.yaml, networks.TEMPLATE.yaml, etc.) #5295

Description

@AkihiroSuda

As in regular template YAMLs (/usr/local/share/lima/templates/*.yaml), containerd.yaml, networks.TEMPLATE.yaml, etc. could be read from the local directory rather than from //go:embed?

https://github.com/search?q=repo%3Alima-vm%2Flima+%22%2F%2Fgo%3Aembed%22&type=code

//go:embed containerd.yaml
var defaultContainerdYAML []byte

//go:embed networks.TEMPLATE.yaml
var defaultConfigTemplate string

//go:embed cidata.TEMPLATE.d
var templateFS embed.FS
const templateFSRoot = "cidata.TEMPLATE.d"
//go:embed wincidata.TEMPLATE.d
var windowsTemplateFS embed.FS

//go:embed io.lima-vm.autostart.INSTANCE.plist
var Template string
//go:embed io.lima-vm.daemon.INSTANCE.plist
var DaemonTemplate string

//go:embed lima-vm@INSTANCE.service
var Template string

Driver-specific embeds (may stay embedded?)

//go:embed lima-init.TEMPLATE
var limaBoot string

//go:embed boot.Linux/*.sh
var bootLinuxFS embed.FS

//go:embed boot.Linux/*.sh
var bootLinuxFS embed.FS

//go:embed boot.Linux/*.sh
var bootLinuxFS embed.FS

Guest agent embeds (should stay embedded probably, as the guest agent binary has been expected to be a single file)

//go:embed lima-guestagent.TEMPLATE.service
var systemdUnitTemplate string

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions