Skip to content

Commit

Permalink
Merge branch 'main' into local-rate-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohuabing committed Dec 21, 2023
2 parents 5ac3836 + d7d411c commit c0bc74a
Show file tree
Hide file tree
Showing 16 changed files with 433 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
needs: [build]
strategy:
matrix:
version: [ v1.26.6, v1.27.3, v1.28.0 ]
version: [ v1.27.3, v1.28.0, v1.29.0 ]
steps:
- uses: actions/checkout@v4
- uses: ./tools/github-actions/setup-deps
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
needs: [build]
strategy:
matrix:
version: [ v1.26.6, v1.27.3, v1.28.0 ]
version: [ v1.27.3, v1.28.0, v1.29.0 ]
steps:
- uses: actions/checkout@v4
- uses: ./tools/github-actions/setup-deps
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/issue-comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Issue and PR comment commands

permissions: {}

on:
issue_comment:
types:
- created
- edited

jobs:
execute:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: jpmcb/[email protected]
with:
prow-commands: '/assign
/unassign
/area
/kind
/priority
/remove
/close
/reopen
/lock
/milestone
/hold
/cc
/uncc'
github-token: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 4 additions & 0 deletions api/v1alpha1/backendtrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ type BackendTrafficPolicySpec struct {
// +optional
TCPKeepalive *TCPKeepalive `json:"tcpKeepalive,omitempty"`

// FaultInjection defines the fault injection policy to be applied. This configuration can be used to
// inject delays and abort requests to mimic failure scenarios such as service failures and overloads
// +optional
FaultInjection *FaultInjection `json:"faultInjection,omitempty"`
// Circuit Breaker settings for the upstream connections and requests.
// If not set, circuit breakers will be enabled with the default thresholds
//
Expand Down
62 changes: 62 additions & 0 deletions api/v1alpha1/fault_injection.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// 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"

// FaultInjection defines the fault injection policy to be applied. This configuration can be used to
// inject delays and abort requests to mimic failure scenarios such as service failures and overloads
// +union
//
// +kubebuilder:validation:XValidation:rule=" has(self.delay) || has(self.abort) ",message="Delay and abort faults are set at least one."
type FaultInjection struct {

// If specified, a delay will be injected into the request.
//
// +optional
Delay *FaultInjectionDelay `json:"delay,omitempty"`

// If specified, the request will be aborted if it meets the configuration criteria.
//
// +optional
Abort *FaultInjectionAbort `json:"abort,omitempty"`
}

// FaultInjectionDelay defines the delay fault injection configuration
type FaultInjectionDelay struct {
// FixedDelay specifies the fixed delay duration
//
// +required
FixedDelay *metav1.Duration `json:"fixedDelay"`

// Percentage specifies the percentage of requests to be delayed. Default 100%, if set 0, no requests will be delayed. Accuracy to 0.0001%.
// +optional
// +kubebuilder:default=100
Percentage *float32 `json:"percentage,omitempty"`
}

// FaultInjectionAbort defines the abort fault injection configuration
// +union
//
// +kubebuilder:validation:XValidation:rule=" !(has(self.httpStatus) && has(self.grpcStatus)) ",message="httpStatus and grpcStatus cannot be simultaneously defined."
// +kubebuilder:validation:XValidation:rule=" has(self.httpStatus) || has(self.grpcStatus) ",message="httpStatus and grpcStatus are set at least one."
type FaultInjectionAbort struct {
// StatusCode specifies the HTTP status code to be returned
//
// +optional
// +kubebuilder:validation:Minimum=200
// +kubebuilder:validation:Maximum=600
HTTPStatus *int32 `json:"httpStatus,omitempty"`

// GrpcStatus specifies the GRPC status code to be returned
//
// +optional
GrpcStatus *int32 `json:"grpcStatus,omitempty"`

// Percentage specifies the percentage of requests to be aborted. Default 100%, if set 0, no requests will be aborted. Accuracy to 0.0001%.
// +optional
Percentage *float32 `json:"percentage,omitempty"`
}
85 changes: 85 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,59 @@ spec:
minimum: 0
type: integer
type: object
faultInjection:
description: FaultInjection defines the fault injection policy to
be applied. This configuration can be used to inject delays and
abort requests to mimic failure scenarios such as service failures
and overloads
properties:
abort:
description: If specified, the request will be aborted if it meets
the configuration criteria.
properties:
grpcStatus:
description: GrpcStatus specifies the GRPC status code to
be returned
format: int32
type: integer
httpStatus:
description: StatusCode specifies the HTTP status code to
be returned
format: int32
maximum: 600
minimum: 200
type: integer
percentage:
description: Percentage specifies the percentage of requests
to be aborted. Default 100%, if set 0, no requests will
be aborted. Accuracy to 0.0001%.
type: number
type: object
x-kubernetes-validations:
- message: httpStatus and grpcStatus cannot be simultaneously
defined.
rule: ' !(has(self.httpStatus) && has(self.grpcStatus)) '
- message: httpStatus and grpcStatus are set at least one.
rule: ' has(self.httpStatus) || has(self.grpcStatus) '
delay:
description: If specified, a delay will be injected into the request.
properties:
fixedDelay:
description: FixedDelay specifies the fixed delay duration
type: string
percentage:
default: 100
description: Percentage specifies the percentage of requests
to be delayed. Default 100%, if set 0, no requests will
be delayed. Accuracy to 0.0001%.
type: number
required:
- fixedDelay
type: object
type: object
x-kubernetes-validations:
- message: Delay and abort faults are set at least one.
rule: ' has(self.delay) || has(self.abort) '
loadBalancer:
description: LoadBalancer policy to apply when routing traffic from
the gateway to the backend endpoints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: ""
- address: null
name: envoy-gateway/gateway-1/http
ports:
- containerPort: 10080
name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: ""
- address: null
name: envoy-gateway/gateway-1/http
ports:
- containerPort: 10080
name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: ""
- address: null
name: envoy-gateway/gateway-1/http
ports:
- containerPort: 10080
name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: ""
- address: null
name: envoy-gateway/gateway-1/http
ports:
- containerPort: 10080
name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: ""
- address: null
name: envoy-gateway/gateway-1/http
ports:
- containerPort: 10080
name: http
Expand Down
14 changes: 7 additions & 7 deletions site/content/en/announcements/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ communications with the Envoy Gateway community, and the mechanics of the releas
In order to align with the Envoy Proxy [release schedule][], Envoy Gateway releases are produced on a fixed schedule
(the 22nd day of each quarter), with an acceptable delay of up to 2 weeks, and a hard deadline of 3 weeks.

| Version | Expected | Actual | Difference | End of Life |
|:-------:|:-----------:|:-----------:|:----------:|:-----------:|
| 0.2.0 | 2022/10/22 | 2022/10/20 | -2 day | 2023/4/20 |
| 0.3.0 | 2023/01/22 | 2023/02/09 | +17 day | 2023/08/09 |
| 0.4.0 | 2023/04/22 | 2023/04/24 | +2 day | 2023/10/24 |
| 0.5.0 | 2023/07/22 | 2023/08/02 | +10 day | 2024/01/02 |
| 0.6.0 | 2023/11/01 | 2023/11/02 | +1 day | 2024/05/02 |
| Version | Expected | Actual | Difference | End of Life |
|:-------:|:-----------:|:-----------:|:-----------:|:-----------:|
| 0.2.0 | 2022/10/22 | 2022/10/20 | -2 days | 2023/4/20 |
| 0.3.0 | 2023/01/22 | 2023/02/09 | +17 days | 2023/08/09 |
| 0.4.0 | 2023/04/22 | 2023/04/24 | +2 days | 2023/10/24 |
| 0.5.0 | 2023/07/22 | 2023/08/02 | +10 days | 2024/01/02 |
| 0.6.0 | 2023/10/22 | 2023/11/02 | +10 days | 2024/05/02 |

[v2.0.0 spec]: https://semver.org/spec/v2.0.0.html
[release guide]: ../dev/releasing.md
Expand Down
Loading

0 comments on commit c0bc74a

Please sign in to comment.