-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into merge-gateways-e2e-test
- Loading branch information
Showing
92 changed files
with
2,825 additions
and
473 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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" | ||
|
||
// Connection allows users to configure connection-level settings | ||
type Connection struct { | ||
// Limit defines limits related to connections | ||
// | ||
// +optional | ||
Limit *ConnectionLimit `json:"limit,omitempty"` | ||
} | ||
|
||
type ConnectionLimit struct { | ||
// Value of the maximum concurrent connections limit. | ||
// When the limit is reached, incoming connections will be closed after the CloseDelay duration. | ||
// Default: unlimited. | ||
// | ||
// +optional | ||
// +kubebuilder:validation:Minimum=0 | ||
Value *int64 `json:"value,omitempty"` | ||
|
||
// CloseDelay defines the delay to use before closing connections that are rejected | ||
// once the limit value is reached. | ||
// Default: none. | ||
// | ||
// +optional | ||
CloseDelay *gwapiv1.Duration `json:"closeDelay,omitempty"` | ||
} |
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,71 @@ | ||
// 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 ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" | ||
) | ||
|
||
const ( | ||
// KindEnvoyExtensionPolicy is the name of the EnvoyExtensionPolicy kind. | ||
KindEnvoyExtensionPolicy = "EnvoyExtensionPolicy" | ||
) | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:shortName=eep | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].reason` | ||
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` | ||
|
||
// EnvoyExtensionPolicy allows the user to configure various envoy extensibility options for the Gateway. | ||
type EnvoyExtensionPolicy struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// Spec defines the desired state of EnvoyExtensionPolicy. | ||
Spec EnvoyExtensionPolicySpec `json:"spec"` | ||
|
||
// Status defines the current status of EnvoyExtensionPolicy. | ||
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"` | ||
} | ||
|
||
// EnvoyExtensionPolicySpec defines the desired state of EnvoyExtensionPolicy. | ||
type EnvoyExtensionPolicySpec struct { | ||
// +kubebuilder:validation:XValidation:rule="self.group == 'gateway.networking.k8s.io'", message="this policy can only have a targetRef.group of gateway.networking.k8s.io" | ||
// +kubebuilder:validation:XValidation:rule="self.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute', 'UDPRoute', 'TCPRoute', 'TLSRoute']", message="this policy can only have a targetRef.kind of Gateway/HTTPRoute/GRPCRoute/TCPRoute/UDPRoute/TLSRoute" | ||
// +kubebuilder:validation:XValidation:rule="!has(self.sectionName)",message="this policy does not yet support the sectionName field" | ||
// | ||
// TargetRef is the name of the Gateway resource this policy | ||
// is being attached to. | ||
// This Policy and the TargetRef MUST be in the same namespace | ||
// for this Policy to have effect and be applied to the Gateway. | ||
// TargetRef | ||
TargetRef gwapiv1a2.PolicyTargetReferenceWithSectionName `json:"targetRef"` | ||
|
||
// Priority of the EnvoyExtensionPolicy. | ||
// If multiple EnvoyExtensionPolices are applied to the same | ||
// TargetRef, extensions will execute in the ascending order of | ||
// the priority i.e. int32.min has the highest priority and | ||
// int32.max has the lowest priority. | ||
// Defaults to 0. | ||
// | ||
// +optional | ||
Priority int32 `json:"priority,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// EnvoyExtensionPolicyList contains a list of EnvoyExtensionPolicy resources. | ||
type EnvoyExtensionPolicyList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []EnvoyExtensionPolicy `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&EnvoyExtensionPolicy{}, &EnvoyExtensionPolicyList{}) | ||
} |
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.