Skip to content

Commit 4c02bf7

Browse files
authored
envoyfilter: add bootstrap patch (#1974)
* envoyfilter: add bootstrap patch Signed-off-by: Kuat Yessenov <kuat@google.com> * review Signed-off-by: Kuat Yessenov <kuat@google.com>
1 parent 5f382a0 commit 4c02bf7

File tree

8 files changed

+297
-103
lines changed

8 files changed

+297
-103
lines changed

kubernetes/customresourcedefinitions.gen.yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter.gen.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter.pb.go

Lines changed: 136 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter.pb.html

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,41 @@ import "networking/v1alpha3/sidecar.proto";
370370
// cluster_name: xds-grpc
371371
// type_urls: ["envoy.extensions.filters.http.wasm.v3.Wasm"]
372372
// ```
373+
//
374+
// The following example adds a Wasm service extension for all proxies using a locally available Wasm file.
375+
// The singleton Wasm extension is used to maintain a shared state between workers executing Wasm filters.
376+
// For example, a local rate limit extension would rely on a singleton to limit requests across all workers.
377+
// As another example, an authorization Wasm extension can use a singleton to maintain a database of accounts.
378+
//
379+
// ```yaml
380+
// apiVersion: networking.istio.io/v1alpha3
381+
// kind: EnvoyFilter
382+
// metadata:
383+
// name: wasm-service
384+
// namespace: myns
385+
// spec:
386+
// configPatches:
387+
// - applyTo: BOOTSTRAP
388+
// patch:
389+
// operation: MERGE
390+
// value:
391+
// bootstrap_extensions:
392+
// - name: envoy.bootstrap.wasm
393+
// typed_config:
394+
// "@type": type.googleapis.com/envoy.extensions.wasm.v3.WasmService
395+
// singleton: true
396+
// config:
397+
// name: my_plugin
398+
// configuration:
399+
// "@type": type.googleapis.com/google.protobuf.StringValue
400+
// value: |
401+
// {}
402+
// vm_config:
403+
// runtime: "envoy.wasm.runtime.v8"
404+
// code:
405+
// local:
406+
// filename: "/etc/envoy_filter_http_wasm_example.wasm"
407+
// ```
373408
package istio.networking.v1alpha3;
374409

375410
option go_package = "istio.io/api/networking/v1alpha3";
@@ -435,6 +470,9 @@ message EnvoyFilter {
435470
// Applies the patch to or adds an extension config in ECDS output. Note that ECDS
436471
// is only supported by HTTP filters.
437472
EXTENSION_CONFIG = 9;
473+
474+
// Applies the patch to bootstrap configuration.
475+
BOOTSTRAP = 10;
438476
};
439477

440478
// PatchContext selects a class of configurations based on the

networking/v1alpha3/envoy_filter_deepcopy.gen.go

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/envoy_filter_json.gen.go

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/istio_api/networking/v1alpha3/envoy_filter_pb2.py

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)