Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Configurable containerd-shim-spin Runtime Settings #166

Open
voigt opened this issue Oct 15, 2023 · 2 comments
Open

Feature Request: Configurable containerd-shim-spin Runtime Settings #166

voigt opened this issue Oct 15, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@voigt
Copy link

voigt commented Oct 15, 2023

Problem Description

Currently, the spin-shim imposes rigid preferences on the instantiation of the spin runtime. For instance, it starts spin on port 80 without any provision for configuration.

There exist several valuable spin up flags that could be applicable, even in Kubernetes environments. Some of these flags include:

Here are some flag options that are currently unavailable:

  • --direct-mounts

    • Description: When dealing with local applications featuring directory mounts and no excluded files, this option allows for direct mounting instead of utilizing a temporary directory.
    • Current State: The direct-mounts feature is not active, which limits the functionality of certain sidecar scenarios (e.g., sharing ephemeral volumes). It should be made optional.
  • --runtime-config-file <RUNTIME_CONFIG_FILE>

    • Description: This flag specifies a configuration file for config providers and Wasmtime config.
    • Current State: The absence of this option prevents the utilization of dynamic runtime configuration features of spin. Specifically, it hinders the use of Vault secrets or Redis as a substitute for the Spin-Internal KV-store.
  • Additional intriguing spin up flags may include <FOLLOW_ID> or <KEY_VALUES>.

Feature Request

The request is to empower users to leverage spin's configuration options, ideally through the use of environment variables.

One particularly interesting option is <ENV>, as the shim would need to differentiate between environment variables intended for the runtime and those meant for the spin application.

  • -e, --env <ENV>
    • Description: This flag allows for passing an environment variable (in the form of key=value) to all components of the application.

We therefore possibly would need to namespace env vars for runtime configuration.

I'm eager to hear about your opinion!

@Mossaka Mossaka added the enhancement New feature or request label Oct 21, 2023
@Mossaka
Copy link
Member

Mossaka commented Oct 21, 2023

Thanks for your detailed write-up for the feature request. The request sounds pretty reasonable to me.

@Mossaka
Copy link
Member

Mossaka commented Nov 14, 2023

Some updates:

  1. chore(spin): bump spin to 2.0.0 #177 uses FilesMountStrategy::Direct for loading spin components.
  2. feat(spin): conditionally load runtime config from root #179 supports runtime-config.toml from the rootfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants