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

Support environment variables defined in Knative manifests when spawning MicroVMs #324

Open
ustiugov opened this issue Jul 1, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ustiugov
Copy link
Member

ustiugov commented Jul 1, 2021

Currently, ctriface/ doesn't pick up environment variables from the knative manifests. Firecracker-containerd supports it at a the container creation time as a runtime argument to the corresponding API call.

Example:

	container, err := o.client.NewContainer(
		ctx,
		vmID,
		containerd.WithSnapshotter(o.snapshotter),
		containerd.WithNewSnapshot(vmID, *vm.Image),
		containerd.WithNewSpec(
			oci.WithEnv([]string{fmt.Sprintf("%s=%s", minioEnvVarKey, o.minioAddress)}),
			oci.WithImageConfig(*vm.Image),
			firecrackeroci.WithVMID(vmID),
			firecrackeroci.WithVMNetwork,
		),

The use case is to enable and disable tracing when running vHive with Firecracker MicroVMs. As of now, this must be hardcoded in each function image.

@ustiugov ustiugov added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant