-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
wasm: add api for configuring environment variable in VmConfig #15136
Conversation
Signed-off-by: Takeshi Yoneda <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. @PiotrSikora could you take a first pass from Wasm perspective?
message EnvironmentVariables { | ||
// The keys of *Envoy's* environment variables exposed to this VM. In other words, if a key exists in Envoy's environment | ||
// variables, then that key-value pair will be injected. Note that if a key does not exist, it will be ignored. | ||
repeated string host_env_keys = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want some notion of env vars elsewhere in xDS as well, so we might want to factor this message to base types. @markdroth thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a note that it's not defined what happens if both host_env_keys
and key_values
define the same key. Should we reject such configurations?
Thanks, that's a good point. I think we should reject since that case may cause some unintended behavior in Wasm programs. WDYT? |
SGTM. |
Signed-off-by: Takeshi Yoneda <[email protected]>
/retest |
Retrying Azure Pipelines: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM modulo nits, do you want to add the implementation to this PR?
/wait
Signed-off-by: Takeshi Yoneda <[email protected]>
Signed-off-by: Takeshi Yoneda <[email protected]>
Will do. |
Signed-off-by: Takeshi Yoneda <[email protected]>
Signed-off-by: Takeshi Yoneda <[email protected]>
/lgtm deps |
Signed-off-by: Takeshi Yoneda <[email protected]>
Signed-off-by: Takeshi Yoneda <[email protected]>
Signed-off-by: Takeshi Yoneda <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! @htuch does this work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo a few small nits, ready to merge when fixed. Thanks!
Signed-off-by: Takeshi Yoneda <[email protected]>
@htuch Thanks for the review! PTAL 👍 |
/retest |
Retrying Azure Pipelines: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
/lgtm deps |
Commit Message: wasm: add api for configuring environment variables in VmConfig. This commit adds an API on VmConfig so that users can configure env vars to be injected to Wasm VMs. Resolves #14958
Signed-off-by: Takeshi Yoneda [email protected]