-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Conversation
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
cc: @kyessenov |
@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: |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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.
Closing this as this does not completely solve all use cases. envoyproxy/envoy#28463 should help to build complicated matcher conditions with ECDS |
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.