FEAT: CNAPP-23269 Add wasm-plugin support for istio-ingressgateway ,… #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
wasm32-unknown-unknownto wasm32-wasip1` to integrate wasm-plugin in istio-gateway with sentryflow.istio-ingressgatewayKey Achievement: A single codebase now compiles to both sidecar and gateway versions with zero runtime overhead via compile-time feature flags.
Ticket # (ticket)
What's New
Feature Flags (
Cargo.toml):sidecar(default) - Compiles withreceiver_name = "Istio-Sidecar"gateway- Compiles withreceiver_name = "Istio-Gateway"Conditional Compilation (
src/lib.rs):update_metadata()to use#[cfg(feature = "...")]attributesBuild Automation (
Makefile):make build-sidecar/make build-gateway- Build binariesmake image-sidecar/make image-gateway- Build Docker imagesmake all- Build both variantsmake push-all- Push both to ECR (v0.4-sidecar, v0.4-gateway)Multi-stage Docker Build (
Dockerfile):ARG PLUGIN_TYPE=sidecarfor build-time variant selectionKubernetes Deployment (New manifests):
wasm-plugin-sidecar.yaml- Deploys to client-side workload proxieswasm-plugin-gateway.yaml- Deploys to ingress gatewaysDoes this PR introduce a breaking change? No
Additional information for reviewer
Usage
Approach for adding both plugins for
sidecarandgateway:The gateway has now two plugins,
Sidecars for rest of the pods only get the sidecar plugin as the gateway plugin has the ingressgateway selector.