Add ExtensionFilter API to extensions#3650
Conversation
|
😊 Welcome @liamawhite! This is either your first contribution to the Istio api repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
- Move top-level TrafficSelector to extension_filter.proto - Keep WasmPlugin.TrafficSelector nested for backward compat - Remove targetRef from ExtensionFilter - Add release notes
…mment - Renumber ExtensionFilter fields to be contiguous (targetRefs=2, phase=3, priority=4, match=5) - Wrap wasm/lua in oneof filter_config for type-safe mutual exclusion - Clarify priority tiebreaker ordering (creationTimestamp, then name/namespace) - Regenerate pb.go, pb.html, and CRD YAML
ramaraochavali
left a comment
There was a problem hiding this comment.
LGTM. Couple of naming questions for discussion
| // --> | ||
| // +kubebuilder:validation:XValidation:message="only one of targetRefs or selector can be set",rule="(has(self.selector)?1:0)+(has(self.targetRefs)?1:0)<=1" | ||
| // +kubebuilder:validation:XValidation:message="exactly one of wasm or lua must be set",rule="has(self.wasm) != has(self.lua)" | ||
| message ExtensionFilter { |
There was a problem hiding this comment.
Filter in the name seems an implementation detail. Can we call it more generic like TrafficExtension/MeshExtension/ProxyExtensoin/ExtensionPolicy?
| // +kubebuilder:validation:XValidation:message="exactly one of wasm or lua must be set",rule="has(self.wasm) != has(self.lua)" | ||
| message ExtensionFilter { | ||
| // Optional. Criteria used to select the specific set of pods/VMs on which | ||
| // this plugin configuration should be applied. If omitted, this |
There was a problem hiding this comment.
nit: "this plugin" needs to change
| repeated istio.type.v1beta1.PolicyTargetReference targetRefs = 2; | ||
|
|
||
| // Determines where in the filter chain this `ExtensionFilter` is to be injected. | ||
| PluginPhase phase = 3; |
There was a problem hiding this comment.
Again the PluginPhase seems WASM plugin specific. Should we call ExecutionPhase or Phase?
Please provide a description of this PR:
Adds native support for Lua filters as described in the following design doc.
Related implementation PR is here.