-
Notifications
You must be signed in to change notification settings - Fork 703
feat: introduce validation levels for lua #6355
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,12 +158,27 @@ type EnvoyProxySpec struct { | |
| // +optional | ||
| PreserveRouteOrder *bool `json:"preserveRouteOrder,omitempty"` | ||
|
|
||
| // DisableLuaValidation disables the Lua script validation for Lua EnvoyExtensionPolicies | ||
| // +kubebuilder:default=false | ||
| // LuaValidation determines strictness of the Lua script validation for Lua EnvoyExtensionPolicies | ||
| // Default: Strict | ||
| // +optional | ||
| DisableLuaValidation *bool `json:"disableLuaValidation,omitempty"` | ||
| LuaValidation *LuaValidation `json:"luaValidation,omitempty"` | ||
| } | ||
|
|
||
| // +kubebuilder:validation:Enum=Strict;Disabled | ||
| type LuaValidation string | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: would it make sense to name it LuaValidationLevel? |
||
|
|
||
| const ( | ||
| // LuaValidationStrict is the default level and checks for issues during script execution. | ||
| // Recommended if your scripts only use the standard Envoy Lua stream handle API. | ||
| // For supported APIs, see: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter#stream-handle-api | ||
| LuaValidationStrict LuaValidation = "Strict" | ||
|
|
||
| // LuaValidationDisabled disables all validation of Lua scripts. | ||
| // Scripts will be accepted and executed without any validation checks. | ||
| // This is not recommended unless your scripts import libraries that are not supported by Lua runtime validation. | ||
| LuaValidationDisabled LuaValidation = "Disabled" | ||
|
||
| ) | ||
|
|
||
| // RoutingType defines the type of routing of this Envoy proxy. | ||
| type RoutingType string | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.