-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: lua support in EnvoyExtensionPolicy and HTTPRouteFilter
Signed-off-by: Rudrakh Panigrahi <[email protected]>
- Loading branch information
Showing
8 changed files
with
392 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright Envoy Gateway Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// The full text of the Apache license is available in the LICENSE file at | ||
// the root of the repo. | ||
|
||
package v1alpha1 | ||
|
||
import gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" | ||
|
||
// Lua defines a Lua extension that applies globally | ||
// to all requests passing through the filter chain. | ||
// | ||
// +kubebuilder:validation:XValidation:rule="has(self.source) ? (!has(self.disabled) || self.disabled == false) : (has(self.disabled) && self.disabled == true)",message="Exactly one of source or disabled must be set." | ||
type Lua struct { | ||
// Source is the default LuaSource that will be executed | ||
// | ||
// +optional | ||
Source *LuaSource `json:"source"` | ||
// Disabled is the status of the Lua filter for a particular route. | ||
// | ||
// +optional | ||
Disabled *bool `json:"disabled,omitempty"` | ||
} | ||
|
||
// LuaSource contains source code information for a user defined Lua script | ||
// Only one of Inline or ValueRef must be set | ||
// | ||
// +kubebuilder:validation:XValidation:rule="has(self.inline) ? !has(self.valueRef) : has(self.valueRef)",message="Exactly one of inline or valueRef must be set." | ||
type LuaSource struct { | ||
// Inline contains the value as an inline string. | ||
// | ||
// +optional | ||
Inline *string `json:"inline,omitempty"` | ||
// ValueRef contains the contents of the body | ||
// specified as a local object reference. | ||
// Only a reference to ConfigMap is supported. | ||
// | ||
// +optional | ||
ValueRef *gwapiv1.LocalObjectReference `json:"valueRef,omitempty"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.