Skip to content

Commit 71c50ca

Browse files
authored
Merge branch 'main' into feat-tcp-security-policy-e2e
2 parents 1ed0614 + fa9f9c3 commit 71c50ca

File tree

278 files changed

+67303
-42235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+67303
-42235
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ jobs:
9696
with:
9797
fetch-depth: 0 # Need main branch access for benchmark comparison
9898
- uses: ./tools/github-actions/setup-deps
99-
100-
- name: Install benchstat
101-
run: go install golang.org/x/perf/cmd/benchstat@latest
10299
- name: Run Benchmark Comparison
103100
continue-on-error: true
104101
run: |

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ jobs:
3636
- uses: ./tools/github-actions/setup-deps
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v3.29.5
39+
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
4040
with:
4141
languages: ${{ matrix.language }}
4242

4343
- name: Autobuild
44-
uses: github/codeql-action/autobuild@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v3.29.5
44+
uses: github/codeql-action/autobuild@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v3.29.5
47+
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
4848
with:
4949
category: "/language:${{matrix.language}}"

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
extended: true
6161

6262
- name: Setup Node
63-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
63+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
6464
with:
6565
node-version: '18'
6666

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
retention-days: 5
4141

4242
- name: "Upload to code-scanning"
43-
uses: github/codeql-action/upload-sarif@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v3.29.5
43+
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
4444
with:
4545
sarif_file: results.sarif

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.5.3
1+
v1.5.4

api/v1alpha1/backend_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package v1alpha1
88
import (
99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
11-
gwapiv1a3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
1211
)
1312

1413
const (
@@ -196,7 +195,7 @@ type BackendTLSSettings struct {
196195
// CACertificateRefs or WellKnownCACertificates may be specified, not both.
197196
//
198197
// +optional
199-
WellKnownCACertificates *gwapiv1a3.WellKnownCACertificatesType `json:"wellKnownCACertificates,omitempty"`
198+
WellKnownCACertificates *gwapiv1.WellKnownCACertificatesType `json:"wellKnownCACertificates,omitempty"`
200199

201200
// InsecureSkipVerify indicates whether the upstream's certificate verification
202201
// should be skipped. Defaults to "false".

api/v1alpha1/backendtrafficpolicy_types.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package v1alpha1
88
import (
99
"k8s.io/apimachinery/pkg/api/resource"
1010
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
11-
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
11+
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
1212
)
1313

1414
const (
@@ -31,7 +31,7 @@ type BackendTrafficPolicy struct {
3131
Spec BackendTrafficPolicySpec `json:"spec"`
3232

3333
// status defines the current status of BackendTrafficPolicy.
34-
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
34+
Status gwapiv1.PolicyStatus `json:"status,omitempty"`
3535
}
3636

3737
// BackendTrafficPolicySpec defines the desired state of BackendTrafficPolicy.
@@ -43,6 +43,7 @@ type BackendTrafficPolicy struct {
4343
// +kubebuilder:validation:XValidation:rule="has(self.targetRefs) ? self.targetRefs.all(ref, ref.group == 'gateway.networking.k8s.io') : true ", message="this policy can only have a targetRefs[*].group of gateway.networking.k8s.io"
4444
// +kubebuilder:validation:XValidation:rule="has(self.targetRefs) ? self.targetRefs.all(ref, ref.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute', 'UDPRoute', 'TCPRoute', 'TLSRoute']) : true ", message="this policy can only have a targetRefs[*].kind of Gateway/HTTPRoute/GRPCRoute/TCPRoute/UDPRoute/TLSRoute"
4545
// +kubebuilder:validation:XValidation:rule="has(self.targetRefs) ? self.targetRefs.all(ref, !has(ref.sectionName)) : true",message="this policy does not yet support the sectionName field"
46+
// +kubebuilder:validation:XValidation:rule="!has(self.compression) || !has(self.compressor)", message="either compression or compressor can be set, not both"
4647
type BackendTrafficPolicySpec struct {
4748
PolicyTargetReferences `json:",inline"`
4849
ClusterSettings `json:",inline"`
@@ -73,13 +74,23 @@ type BackendTrafficPolicySpec struct {
7374
UseClientProtocol *bool `json:"useClientProtocol,omitempty"`
7475

7576
// The compression config for the http streams.
77+
// Deprecated: Use Compressor instead.
7678
//
7779
// +patchMergeKey=type
7880
// +patchStrategy=merge
7981
//
8082
// +optional
8183
Compression []*Compression `json:"compression,omitempty" patchMergeKey:"type" patchStrategy:"merge"`
8284

85+
// The compressor config for the http streams.
86+
// This provides more granular control over compression configuration.
87+
//
88+
// +patchMergeKey=type
89+
// +patchStrategy=merge
90+
//
91+
// +optional
92+
Compressor []*Compression `json:"compressor,omitempty" patchMergeKey:"type" patchStrategy:"merge"`
93+
8394
// ResponseOverride defines the configuration to override specific responses with a custom one.
8495
// If multiple configurations are specified, the first one to match wins.
8596
//

api/v1alpha1/clienttrafficpolicy_types.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package v1alpha1
77

88
import (
99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10-
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
10+
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
1111
)
1212

1313
const (
@@ -30,17 +30,16 @@ type ClientTrafficPolicy struct {
3030
Spec ClientTrafficPolicySpec `json:"spec"`
3131

3232
// Status defines the current status of ClientTrafficPolicy.
33-
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
33+
Status gwapiv1.PolicyStatus `json:"status,omitempty"`
3434
}
3535

36-
// +kubebuilder:validation:XValidation:rule="(has(self.targetRef) && !has(self.targetRefs)) || (!has(self.targetRef) && has(self.targetRefs)) || (has(self.targetSelectors) && self.targetSelectors.size() > 0) ", message="either targetRef or targetRefs must be used"
36+
// ClientTrafficPolicySpec defines the desired state of ClientTrafficPolicy.
3737
//
38+
// +kubebuilder:validation:XValidation:rule="(has(self.targetRef) && !has(self.targetRefs)) || (!has(self.targetRef) && has(self.targetRefs)) || (has(self.targetSelectors) && self.targetSelectors.size() > 0) ", message="either targetRef or targetRefs must be used"
3839
// +kubebuilder:validation:XValidation:rule="has(self.targetRef) ? self.targetRef.group == 'gateway.networking.k8s.io' : true", message="this policy can only have a targetRef.group of gateway.networking.k8s.io"
3940
// +kubebuilder:validation:XValidation:rule="has(self.targetRef) ? self.targetRef.kind == 'Gateway' : true", message="this policy can only have a targetRef.kind of Gateway"
4041
// +kubebuilder:validation:XValidation:rule="has(self.targetRefs) ? self.targetRefs.all(ref, ref.group == 'gateway.networking.k8s.io') : true", message="this policy can only have a targetRefs[*].group of gateway.networking.k8s.io"
4142
// +kubebuilder:validation:XValidation:rule="has(self.targetRefs) ? self.targetRefs.all(ref, ref.kind == 'Gateway') : true", message="this policy can only have a targetRefs[*].kind of Gateway"
42-
//
43-
// ClientTrafficPolicySpec defines the desired state of ClientTrafficPolicy.
4443
type ClientTrafficPolicySpec struct {
4544
PolicyTargetReferences `json:",inline"`
4645

api/v1alpha1/compression_types.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ package v1alpha1
77

88
// CompressorType defines the types of compressor library supported by Envoy Gateway.
99
//
10-
// +kubebuilder:validation:Enum=Gzip;Brotli
10+
// +kubebuilder:validation:Enum=Gzip;Brotli;Zstd
1111
type CompressorType string
1212

1313
const (
1414
GzipCompressorType CompressorType = "Gzip"
1515

1616
BrotliCompressorType CompressorType = "Brotli"
17+
18+
ZstdCompressorType CompressorType = "Zstd"
1719
)
1820

1921
// GzipCompressor defines the config for the Gzip compressor.
@@ -26,6 +28,11 @@ type GzipCompressor struct{}
2628
// https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/compression/brotli/compressor/v3/brotli.proto#extension-envoy-compression-brotli-compressor
2729
type BrotliCompressor struct{}
2830

31+
// ZstdCompressor defines the config for the Zstd compressor.
32+
// The default values can be found here:
33+
// https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/compression/zstd/compressor/v3/zstd.proto#extension-envoy-compression-zstd-compressor
34+
type ZstdCompressor struct{}
35+
2936
// Compression defines the config of enabling compression.
3037
// This can help reduce the bandwidth at the expense of higher CPU.
3138
type Compression struct {
@@ -43,4 +50,9 @@ type Compression struct {
4350
//
4451
// +optional
4552
Gzip *GzipCompressor `json:"gzip,omitempty"`
53+
54+
// The configuration for Zstd compressor.
55+
//
56+
// +optional
57+
Zstd *ZstdCompressor `json:"zstd,omitempty"`
4658
}

api/v1alpha1/envoyextensionypolicy_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package v1alpha1
77

88
import (
99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10-
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
10+
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
1111
)
1212

1313
const (
@@ -29,7 +29,7 @@ type EnvoyExtensionPolicy struct {
2929
Spec EnvoyExtensionPolicySpec `json:"spec"`
3030

3131
// Status defines the current status of EnvoyExtensionPolicy.
32-
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
32+
Status gwapiv1.PolicyStatus `json:"status,omitempty"`
3333
}
3434

3535
// EnvoyExtensionPolicySpec defines the desired state of EnvoyExtensionPolicy.

0 commit comments

Comments
 (0)