Skip to content

Commit

Permalink
WasmPlugin add VmConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
zirain committed Jan 27, 2022
1 parent b9c4eee commit 1677940
Show file tree
Hide file tree
Showing 8 changed files with 1,030 additions and 47 deletions.
31 changes: 31 additions & 0 deletions extensions/v1alpha1/wasm.gen.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

695 changes: 657 additions & 38 deletions extensions/v1alpha1/wasm.pb.go

Large diffs are not rendered by default.

83 changes: 82 additions & 1 deletion extensions/v1alpha1/wasm.pb.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions extensions/v1alpha1/wasm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

syntax = "proto3";

import "google/protobuf/any.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/struct.proto";
import "type/v1beta1/selector.proto";
Expand Down Expand Up @@ -241,6 +242,9 @@ message WasmPlugin {
// value, the ordering will be deterministically derived from name and
// namespace of the `WasmPlugins`. Defaults to `0`.
google.protobuf.Int64Value priority = 10;

// Configuration for finding or starting VM.
VmConfig vm_config = 11;
}

// The phase in the filter chain where the plugin will be injected.
Expand Down Expand Up @@ -280,3 +284,22 @@ enum PullPolicy {
// this plugin.
Always = 2;
}

// Configuration for a Wasm VM.
message VmConfig {
// Specifies environment variables to be injected to this VM which will be available through
// WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions are mostly implicitly
// called in your language's standard library, so you do not need to call them directly and you can access to env
// vars just like when you do on native platforms.
// Warning: Envoy rejects the configuration if there's conflict of key space.
EnvironmentVariables environment_variables = 4;
}

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;

// Explicitly given key-value pairs to be injected to this VM in the form of "KEY=VALUE".
map<string, string> key_values = 2;
}
42 changes: 42 additions & 0 deletions extensions/v1alpha1/wasm_deepcopy.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions extensions/v1alpha1/wasm_json.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions kubernetes/customresourcedefinitions.gen.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1677940

Please sign in to comment.