diff --git a/modules/ossm-extensions-wasm-deploy.adoc b/modules/ossm-extensions-wasm-deploy.adoc index 0a18296484ba..82278d0466ac 100644 --- a/modules/ossm-extensions-wasm-deploy.adoc +++ b/modules/ossm-extensions-wasm-deploy.adoc @@ -19,8 +19,10 @@ spec: workloadSelector: labels: app: httpbin - config: test - image: quay.io/maistra-dev/header-append-filter:2.0 + config: + first-header: some-value + another-header: another-value + image: quay.io/maistra-dev/header-append-filter:2.1 phase: PostAuthZ priority: 100 ---- diff --git a/modules/ossm-extensions-wasm-support.adoc b/modules/ossm-extensions-wasm-support.adoc deleted file mode 100644 index 34d027b5d718..000000000000 --- a/modules/ossm-extensions-wasm-support.adoc +++ /dev/null @@ -1,33 +0,0 @@ -[id="ossm-extensions-support_{context}"] -= Enabling WebAssembly extension support - -Support for WebAssembly extensions to {ProductName} is currently in link:https://access.redhat.com/support/offerings/techpreview[Technology Preview], so it must be explicitly enabled for your `ServiceMeshControlPlane`. In this example, `istio-system` is the name of the control plane project. - -.Procedure - -. In the {product-title} web console, click *Operators* -> *Installed Operators*. - -. From the *Project* menu, select the project where you installed the control plane, for example `istio-system`. - -. Click the {ProductName} Operator. In the *Istio Service Mesh Control Plane* column, click the name of your `ServiceMeshControlPlane` resource, for example `basic`. - -. Click the *YAML* tab. - -. Set `spec.techPreview.wasmExtensions.enabled` in your `ServiceMeshControlPlane` resource to `true`. For example: -+ -[source,yaml] ----- -apiVersion: maistra.io/v2 -kind: ServiceMeshControlPlane -metadata: - name: openid-connect - namespace: istio-system -spec: - techPreview: - wasmExtensions: - enabled: true ----- - -. Click *Save*. - -. Click *Reload* to verify the `ServiceMeshControlPlane` resource was configured correctly. diff --git a/service_mesh/v2x/ossm-extensions.adoc b/service_mesh/v2x/ossm-extensions.adoc index 940ed2bcff9d..ebd236bec6db 100644 --- a/service_mesh/v2x/ossm-extensions.adoc +++ b/service_mesh/v2x/ossm-extensions.adoc @@ -91,9 +91,7 @@ module: extension.wasm === Example Rust extension -For a complete example that was built using the Rust SDK, take a look at the link:https://github.com/maistra/header-append-filter[header-append-filter]. The filter appends a header, called `custom-header`, to all responses, with the value depending on its configuration. - -include::modules/ossm-extensions-wasm-support.adoc[leveloffset=+2] +For a complete example that was built using the Rust SDK, take a look at the link:https://github.com/maistra/header-append-filter[header-append-filter]. It is a simple filter that appends one or more headers to the HTTP responses, with their names and values taken out from the `config` field of the extension. See a sample configuration in the snippet below. include::modules/ossm-extensions-wasm-deploy.adoc[leveloffset=+2] @@ -108,7 +106,7 @@ include::modules/ossm-extensions-wasm-deploy.adoc[leveloffset=+2] |The `spec.workloadSelector` field has the same semantic as the `spec.selector` field of the link:https://istio.io/v1.6/docs/reference/config/networking/gateway/#Gateway[Istio Gateway resource]. It will match a workload based on its Pod labels. If no `workloadSelector` is specified, the extension will be applied to all workloads in the namespace. |spec.config -|This is a pass-through string field that is handed over to the extension. Syntax and semantics are dependent on the extension that you are deploying. +|This is a structured field that will be handed over to the extension, with the semantics dependent on the extension you are deploying. |spec.image |A container image URI pointing to the image that holds the extension.