Skip to content
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

add support for extension with matcher in wasm conversion #45889

Closed

Conversation

ramaraochavali
Copy link
Contributor

@ramaraochavali ramaraochavali commented Jul 7, 2023

Currently we only support WASM directly under extension config. This PR adds support for ExtensionWithMatcher so that we can use conditional WASM using Envoy filters.

  • Ambient
  • Configuration Infrastructure
  • Docs
  • Installation
  • Networking
  • Performance and Scalability
  • Policies and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali ramaraochavali requested review from a team as code owners July 7, 2023 08:47
@istio-policy-bot istio-policy-bot added the release-notes-none Indicates a PR that does not require release notes. label Jul 7, 2023
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 7, 2023
@ramaraochavali
Copy link
Contributor Author

cc: @kyessenov

@ramaraochavali
Copy link
Contributor Author

@istio/wg-policies-and-telemetry-maintainers can you PTAL?

@@ -144,6 +145,20 @@ func tryUnmarshal(resource *anypb.Any) (*core.TypedExtensionConfig, *wasm.Wasm,
wasmLog.Debugf("typed extension config %+v does not contain wasm http filter", typedStruct)
return nil, nil, nil
}
case ec.GetTypedConfig().TypeUrl == xds.ExtensionWithMatcher:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused how this works end-to-end? We need to preserve the matcher and rewrite Wasm config, so I expect the matcher to be somehow re-created?

@@ -418,6 +429,23 @@ var extensionConfigMap = map[string]*core.TypedExtensionConfig{
},
},
}),
"remote-load-success-extension-matcher": buildAnyExtensionConfig("remote-load-success", &matcher.ExtensionWithMatcher{
ExtensionConfig: buildAnyExtensionConfig("remote-load-success", &wasm.Wasm{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a realistic config, you need a matcher as well.

@ramaraochavali
Copy link
Contributor Author

Closing this as this does not completely solve all use cases. envoyproxy/envoy#28463 should help to build complicated matcher conditions with ECDS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants