Skip to content

Commit

Permalink
Merge branch 'main' into fix-printable
Browse files Browse the repository at this point in the history
  • Loading branch information
zirain authored Jan 27, 2024
2 parents d008806 + 2feae69 commit ec95fc7
Show file tree
Hide file tree
Showing 9 changed files with 703 additions and 393 deletions.
5 changes: 5 additions & 0 deletions api/v1alpha1/backendtrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ type BackendTrafficPolicySpec struct {
//
// +optional
Timeout *Timeout `json:"timeout,omitempty"`

// The compression config for the http streams.
//
// +optional
Compression []*Compression `json:"compression,omitempty"`
}

// BackendTrafficPolicyStatus defines the state of BackendTrafficPolicy
Expand Down
31 changes: 31 additions & 0 deletions api/v1alpha1/compression_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 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

// CompressorType defines the types of compressor library supported by Envoy Gateway.
//
// +kubebuilder:validation:Enum=Gzip
type CompressorType string

// GzipCompressor defines the config for the Gzip compressor.
// The default values can be found here:
// https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/compression/gzip/compressor/v3/gzip.proto#extension-envoy-compression-gzip-compressor
type GzipCompressor struct {
}

// Compression defines the config of enabling compression.
// This can help reduce the bandwidth at the expense of higher CPU.
type Compression struct {
// CompressorType defines the compressor type to use for compression.
//
// +required
Type CompressorType `json:"type"`

// The configuration for GZIP compressor.
//
// +optional
Gzip *GzipCompressor `json:"gzip,omitempty"`
}
46 changes: 46 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,25 @@ spec:
minimum: 0
type: integer
type: object
compression:
description: The compression config for the http streams.
items:
description: Compression defines the config of enabling compression.
This can help reduce the bandwidth at the expense of higher CPU.
properties:
gzip:
description: The configuration for GZIP compressor.
type: object
type:
description: CompressorType defines the compressor type to use
for compression.
enum:
- Gzip
type: string
required:
- type
type: object
type: array
faultInjection:
description: FaultInjection defines the fault injection policy to
be applied. This configuration can be used to inject delays and
Expand Down
Loading

0 comments on commit ec95fc7

Please sign in to comment.