Skip to content

Commit

Permalink
Merge branch 'main' into ctp-for-tcp
Browse files Browse the repository at this point in the history
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
  • Loading branch information
aoledk committed May 8, 2024
2 parents 013bfe8 + 239fdd7 commit d936594
Show file tree
Hide file tree
Showing 404 changed files with 16,048 additions and 9,255 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/backendtrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type BackendTrafficPolicySpec struct {
// 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 gwapiv1a2.PolicyTargetReferenceWithSectionName `json:"targetRef"`
TargetRef gwapiv1a2.LocalPolicyTargetReferenceWithSectionName `json:"targetRef"`

// RateLimit allows the user to limit the number of incoming requests
// to a predefined value based on attributes within the traffic flow.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/clienttrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type ClientTrafficPolicySpec struct {
// 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"`
TargetRef gwapiv1a2.LocalPolicyTargetReferenceWithSectionName `json:"targetRef"`
// TcpKeepalive settings associated with the downstream client connection.
// If defined, sets SO_KEEPALIVE on the listener socket to enable TCP Keepalives.
// Disabled by default.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/envoyextensionypolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type EnvoyExtensionPolicySpec struct {
// 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 or xRoute.
TargetRef gwapiv1a2.PolicyTargetReferenceWithSectionName `json:"targetRef"`
TargetRef gwapiv1a2.LocalPolicyTargetReferenceWithSectionName `json:"targetRef"`

// Wasm is a list of Wasm extensions to be loaded by the Gateway.
// Order matters, as the extensions will be loaded in the order they are
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha1/envoygateway_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ func (r *EnvoyGatewayProvider) GetEnvoyGatewayKubeProvider() *EnvoyGatewayKubern

r.Kubernetes.RateLimitDeployment.defaultKubernetesDeploymentSpec(DefaultRateLimitImage)

if r.Kubernetes.ShutdownManager == nil {
r.Kubernetes.ShutdownManager = &ShutdownManager{Image: ptr.To(DefaultShutdownManagerImage)}
}
return r.Kubernetes
}

Expand Down
10 changes: 10 additions & 0 deletions api/v1alpha1/envoygateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ type EnvoyGatewayKubernetesProvider struct {
// If it's not set up, leader election will be active by default, using Kubernetes' standard settings.
// +optional
LeaderElection *LeaderElection `json:"leaderElection,omitempty"`

// ShutdownManager defines the configuration for the shutdown manager.
// +optional
ShutdownManager *ShutdownManager `json:"shutdownManager,omitempty"`
}

const (
Expand Down Expand Up @@ -535,6 +539,12 @@ type EnvoyGatewayAdminAddress struct {
Host string `json:"host,omitempty"`
}

// ShutdownManager defines the configuration for the shutdown manager.
type ShutdownManager struct {
// Image specifies the ShutdownManager container image to be used, instead of the default image.
Image *string `json:"image,omitempty"`
}

func init() {
SchemeBuilder.Register(&EnvoyGateway{})
}
4 changes: 2 additions & 2 deletions api/v1alpha1/envoypatchpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ type EnvoyPatchPolicySpec struct {
JSONPatches []EnvoyJSONPatchConfig `json:"jsonPatches,omitempty"`
// TargetRef is the name of the Gateway API resource this policy
// is being attached to.
// By default attaching to Gateway is supported and
// By default, attaching to Gateway is supported and
// when mergeGateways is enabled it should attach to GatewayClass.
// 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.PolicyTargetReference `json:"targetRef"`
TargetRef gwapiv1a2.LocalPolicyTargetReference `json:"targetRef"`
// Priority of the EnvoyPatchPolicy.
// If multiple EnvoyPatchPolicies are applied to the same
// TargetRef, they will be applied in the ascending order of
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/securitypolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type SecurityPolicySpec struct {
// 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 gwapiv1a2.PolicyTargetReferenceWithSectionName `json:"targetRef"`
TargetRef gwapiv1a2.LocalPolicyTargetReferenceWithSectionName `json:"targetRef"`

// CORS defines the configuration for Cross-Origin Resource Sharing (CORS).
//
Expand Down
27 changes: 26 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d936594

Please sign in to comment.