-
Notifications
You must be signed in to change notification settings - Fork 65
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
Introduce environmental variable handling to kraft build
and kraft run
#787
Labels
kind/enhancement
New feature or request
priority/medium
Issue which is important, but KraftKit is usable without it also.
Comments
nderjung
changed the title
Introduce
Introduce environmental variable handling to Sep 8, 2023
-e
flag to kraft build
and kraft run
for passing environmental variableskraft build
and kraft run
craciunoiuc
added
the
priority/medium
Issue which is important, but KraftKit is usable without it also.
label
Feb 29, 2024
Is anyone working on this at the moment? If not, can you please assign it to me? |
@LucaSeri can you also introduce See:
Please & thank you! :) |
This draft PR may be interesting for you too see all the bits that need touching: #1286 |
4 tasks
github-project-automation
bot
moved this from Ready
to Done
in KraftKit Issue Priority List
Apr 9, 2024
github-project-automation
bot
moved this from 🏗 In Progress
to 🚀 Done
in KraftKit Roadmap
Apr 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/enhancement
New feature or request
priority/medium
Issue which is important, but KraftKit is usable without it also.
Feature request summary
This issue tracks allowing the parsing and passing of environmental variables from
kraft build
andkraft run
via the command-line flag-e
flag and anenv
element in theKraftfile
specification such that these key-values are correctly passed intoposix-environ
In the case of
kraft build
, these can be statically set at compile-time such that these variables are persistent with the unikernel.In the case of
kraft run
, they are passed viauklibparam
via the syntax and requiring the KConfig optionCONFIG_LIBPOSIX_ENVIRON_LIBPARAM
:When no key is provided, for example
kraft run -e HOME
, the value should be automatically determined from the host environment viaos.Getenv
.A new wrapper library should be introduced in
unikraft/export/v0/posix-environ
to accommodate handling the list of key-value environmental variables and the correct format to be used when instantiating the VM.To statically serialize environmental variables, a new top-level
env
element should be added to theKraftfile
specification such that these are passed in the same way tokraft build
andkraft run
.Map form:
List form:
Describe alternatives
No response
Related architectures
None
Related platforms
None
Additional context
See posix-environ: Handling Environmental Variables for additional details.
The text was updated successfully, but these errors were encountered: