Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5889638
provisioner: add field overloadMaxHeapSize for envoy (#5699)
yangyy93 Sep 21, 2023
9ad7ac5
build(deps): bump sigs.k8s.io/gateway-api from 0.8.0 to 0.8.1 (#5757)
dependabot[bot] Sep 21, 2023
2731ac6
build(deps): bump github.com/onsi/ginkgo/v2 from 2.12.0 to 2.12.1 (#5…
dependabot[bot] Sep 25, 2023
e28dfc6
build(deps): bump google.golang.org/grpc from 1.58.1 to 1.58.2 (#5780)
dependabot[bot] Sep 25, 2023
6219d90
build(deps): bump github.com/vektra/mockery/v2 from 2.33.2 to 2.34.0 …
dependabot[bot] Sep 25, 2023
1d0a774
Setting `disabled = true` on a route should disable the virtual host …
shadialtarsha Sep 25, 2023
a9885b0
update Go to 1.21.1 (#5783)
skriss Sep 28, 2023
bbccbff
Fixup: Sort path matches based on length rather than lexi (#5752)
davinci26 Sep 28, 2023
3e80677
build(deps): bump github.com/onsi/gomega from 1.27.10 to 1.28.0 (#5792)
dependabot[bot] Oct 2, 2023
a1718cb
build(deps): bump github.com/cert-manager/cert-manager (#5791)
dependabot[bot] Oct 2, 2023
8a4f11e
build(deps): bump github.com/vektra/mockery/v2 from 2.34.0 to 2.34.2 …
dependabot[bot] Oct 2, 2023
3f6a7cd
build(deps): bump github.com/prometheus/client_golang (#5790)
dependabot[bot] Oct 2, 2023
cc10bc8
HTTPProxy: allow dynamic Host header rewrite (#5678)
clayton-gonsalves Oct 3, 2023
13c2bd0
fix spelling errors (#5798)
skriss Oct 3, 2023
7feb49e
hack: bump codespell version to match GH action (#5799)
skriss Oct 3, 2023
e6f33bf
gateway provisioner: add flags to enable running provisioner out of c…
izturn Oct 4, 2023
b865f33
site: Bump Hugo to 0.119.0 (#5795)
sunjayBhatia Oct 5, 2023
f03665e
internal/dag: default Listener ResolvedRefs to true (#5804)
skriss Oct 5, 2023
f54599c
build(deps): bump golang.org/x/oauth2 from 0.12.0 to 0.13.0 (#5810)
dependabot[bot] Oct 9, 2023
9b2514e
build(deps): bump github.com/vektra/mockery/v2 from 2.34.2 to 2.35.2 …
dependabot[bot] Oct 9, 2023
49eee41
build(deps): bump github.com/prometheus/client_model (#5811)
dependabot[bot] Oct 9, 2023
81c8438
switch to github.com/distribution/parse (#5818)
skriss Oct 9, 2023
51c0021
deps: Bump logrusr to v4.0.0 (#5806)
sunjayBhatia Oct 9, 2023
2765c72
wait for cache sync and DAG build before starting xDS server (#5672)
therealak12 Oct 10, 2023
8f6aff1
internal/xdscache: Generate uuid for snapshot version (#5819)
sunjayBhatia Oct 10, 2023
d09bba1
Bump Envoy to 1.27.1 (#5821)
sunjayBhatia Oct 11, 2023
207de64
build(deps): bump golang.org/x/net from 0.16.0 to 0.17.0 (#5829)
dependabot[bot] Oct 11, 2023
ef24ff2
build(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#5833)
dependabot[bot] Oct 12, 2023
3b23231
build(deps): bump github.com/onsi/ginkgo/v2 from 2.12.1 to 2.13.0 (#5…
dependabot[bot] Oct 12, 2023
f8bccd9
build(deps): bump github.com/vektra/mockery/v2 from 2.35.2 to 2.35.4 …
dependabot[bot] Oct 12, 2023
0c31571
build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0 (#5832)
dependabot[bot] Oct 12, 2023
f52ad06
Bump go to 1.21.3 (#5841)
sunjayBhatia Oct 12, 2023
641535f
Add configurability for HTTP requests per IO cycle (#5827)
sunjayBhatia Oct 12, 2023
af938e6
provisioner: fix envoy-max-heapsize not set (#5814)
yangyy93 Oct 13, 2023
62db87e
HTTP/2 max concurrent streams can be configured (#5850)
sunjayBhatia Oct 13, 2023
449c92d
Bump Envoy to v1.27.2 (#5863)
sunjayBhatia Oct 17, 2023
d53f2a3
site: 1.26.1, 1.25.3, 1.24.6 patch releases (#5859)
sunjayBhatia Oct 17, 2023
d99ca25
test/e2e: Add race detection in e2e tests (#5805)
sunjayBhatia Oct 18, 2023
dfb9aef
golangci-lint: Fix revive rules (#5857)
sunjayBhatia Oct 18, 2023
9d708a5
crd/ContourDeployment: Add field 'podLabels' for contour (#2)
izturn Sep 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codespell.ignorewords
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ od
als
wit
aks
immediatedly
2 changes: 1 addition & 1 deletion .github/workflows/build_daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
GOPROXY: https://proxy.golang.org/
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
GO_VERSION: 1.21.0
GO_VERSION: 1.21.3
jobs:
e2e-envoy-xds:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
GOPROXY: https://proxy.golang.org/
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
GO_VERSION: 1.21.0
GO_VERSION: 1.21.3
jobs:
lint:
runs-on: ubuntu-latest
Expand Down
25 changes: 24 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,30 @@ linters-settings:
- http.DefaultTransport
revive:
rules:
- name: use-any
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: use-any
- name: var-declaration
- name: var-naming

issues:
exclude-rules:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ IMAGE := $(REGISTRY)/$(PROJECT)
SRCDIRS := ./cmd ./internal ./apis
LOCAL_BOOTSTRAP_CONFIG = localenvoyconfig.yaml
SECURE_LOCAL_BOOTSTRAP_CONFIG = securelocalenvoyconfig.yaml
ENVOY_IMAGE = docker.io/envoyproxy/envoy:v1.27.0
ENVOY_IMAGE = docker.io/envoyproxy/envoy:v1.27.2
GATEWAY_API_VERSION ?= $(shell grep "sigs.k8s.io/gateway-api" go.mod | awk '{print $$2}')

# Used to supply a local Envoy docker container an IP to connect to that is running
Expand Down Expand Up @@ -44,7 +44,7 @@ endif
IMAGE_PLATFORMS ?= linux/amd64,linux/arm64

# Base build image to use.
BUILD_BASE_IMAGE ?= golang:1.21.0
BUILD_BASE_IMAGE ?= golang:1.21.3

# Enable build with CGO.
BUILD_CGO_ENABLED ?= 0
Expand Down
14 changes: 13 additions & 1 deletion apis/projectcontour/v1/httpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,18 @@ type Route struct {
// +optional
PathRewritePolicy *PathRewritePolicy `json:"pathRewritePolicy,omitempty"`
// The policy for managing request headers during proxying.
//
// You may dynamically rewrite the Host header to be forwarded
// upstream to the content of a request header using
// the below format "%REQ(X-Header-Name)%". If the value of the header
// is empty, it is ignored.
//
// *NOTE: Pay attention to the potential security implications of using this option.
// Provided header must come from trusted source.
//
// **NOTE: The header rewrite is only done while forwarding and has no bearing
// on the routing decision.
//
// +optional
RequestHeadersPolicy *HeadersPolicy `json:"requestHeadersPolicy,omitempty"`
// The policy for managing response headers during proxying.
Expand Down Expand Up @@ -1268,7 +1280,7 @@ type LoadBalancerPolicy struct {
}

// HeadersPolicy defines how headers are managed during forwarding.
// The `Host` header is treated specially and if set in a HTTP response
// The `Host` header is treated specially and if set in a HTTP request
// will be used as the SNI server name when forwarding over TLS. It is an
// error to attempt to set the `Host` header in a HTTP response.
type HeadersPolicy struct {
Expand Down
21 changes: 21 additions & 0 deletions apis/projectcontour/v1alpha1/contourconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,27 @@ type EnvoyListenerConfig struct {
// Single set of options are applied to all listeners.
// +optional
SocketOptions *SocketOptions `json:"socketOptions,omitempty"`

// Defines the limit on number of HTTP requests that Envoy will process from a single
// connection in a single I/O cycle. Requests over this limit are processed in subsequent
// I/O cycles. Can be used as a mitigation for CVE-2023-44487 when abusive traffic is
// detected. Configures the http.max_requests_per_io_cycle Envoy runtime setting. The default
// value when this is not set is no limit.
//
// +kubebuilder:validation:Minimum=1
// +optional
MaxRequestsPerIOCycle *uint32 `json:"maxRequestsPerIOCycle,omitempty"`

// Defines the value for SETTINGS_MAX_CONCURRENT_STREAMS Envoy will advertise in the
// SETTINGS frame in HTTP/2 connections and the limit for concurrent streams allowed
// for a peer on a single HTTP/2 connection. It is recommended to not set this lower
// than 100 but this field can be used to bound resource usage by HTTP/2 connections
// and mitigate attacks like CVE-2023-44487. The default value when this is not set is
// unlimited.
//
// +kubebuilder:validation:Minimum=1
// +optional
HTTP2MaxConcurrentStreams *uint32 `json:"httpMaxConcurrentStreams,omitempty"`
}

// SocketOptions defines configurable socket options for Envoy listeners.
Expand Down
21 changes: 21 additions & 0 deletions apis/projectcontour/v1alpha1/contourdeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ type ContourSettings struct {
// the annotations for Prometheus will be appended or overwritten with predefined value.
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`

// PodLabels defines labels to add to the Contour pods.
// If there is a label with the same key as in `ContourDeploymentSpec.ResourceLabels`,
// the one here has a higher priority.
// +optional
PodLabels map[string]string `json:"podLabels,omitempty"`
}

// DeploymentSettings contains settings for Deployment resources.
Expand Down Expand Up @@ -185,6 +191,12 @@ type EnvoySettings struct {
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`

// PodLabels defines labels to add to the Envoy pods.
// If there is a label with the same key as in `ContourDeploymentSpec.ResourceLabels`,
// the one here has a higher priority.
// +optional
PodLabels map[string]string `json:"podLabels,omitempty"`

// Compute Resources required by envoy container.
// Cannot be updated.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -215,6 +227,15 @@ type EnvoySettings struct {
// +kubebuilder:validation:Minimum=0
// +optional
BaseID int32 `json:"baseID,omitempty"`

// OverloadMaxHeapSize defines the maximum heap memory of the envoy controlled by the overload manager.
// When the value is greater than 0, the overload manager is enabled,
// and when envoy reaches 95% of the maximum heap size, it performs a shrink heap operation,
// When it reaches 98% of the maximum heap size, Envoy Will stop accepting requests.
// More info: https://projectcontour.io/docs/main/config/overload-manager/
//
// +optional
OverloadMaxHeapSize uint64 `json:"overloadMaxHeapSize,omitempty"`
}

// WorkloadType is the type of Kubernetes workload to use for a component.
Expand Down
24 changes: 24 additions & 0 deletions apis/projectcontour/v1alpha1/zz_generated.deepcopy.go

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

57 changes: 57 additions & 0 deletions changelogs/CHANGELOG-v1.24.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
We are delighted to present version v1.24.6 of Contour, our layer 7 HTTP reverse proxy for Kubernetes clusters.

- [All Changes](#all-changes)
- [Installing/Upgrading](#installing-and-upgrading)
- [Compatible Kubernetes Versions](#compatible-kubernetes-versions)

# All Changes

This release includes various dependency bumps and fixes for [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487), including:

- Update to Envoy v1.25.11. See the release notes for v1.25.10 [here](https://www.envoyproxy.io/docs/envoy/v1.25.10/version_history/v1.25/v1.25.10) and v1.25.11 [here](https://www.envoyproxy.io/docs/envoy/v1.25.11/version_history/v1.25/v1.25.11).
- Update to Go v1.20.10. See the [Go release notes](https://go.dev/doc/devel/release#go1.20.minor) for more information.

Additional mitigations have been added for CVE-2023-44487 in the form of new configuration fields:

## Max HTTP requests per IO cycle is configurable as an additional mitigation for HTTP/2 CVE-2023-44487

Envoy mitigates CVE-2023-44487 with some default runtime settings, however the `http.max_requests_per_io_cycle` does not have a default value.
This change allows configuring this runtime setting via Contour configuration to allow administrators of Contour to prevent abusive connections from starving resources from other valid connections.
The default is left as the existing behavior (no limit) so as not to impact existing valid traffic.

The Contour ConfigMap can be modified similar to the following (and Contour restarted) to set this value:

```
listener:
max-requests-per-io-cycle: 10
```

(Note this can be used in addition to the existing Listener configuration field `listener.max-requests-per-connection` which is used primarily for HTTP/1.1 connections and is an approximate limit for HTTP/2)

## HTTP/2 max concurrent streams is configurable

This field can be used to limit the number of concurrent streams Envoy will allow on a single connection from a downstream peer.
It can be used to tune resource usage and as a mitigation for DOS attacks arising from vulnerabilities like CVE-2023-44487.

The Contour ConfigMap can be modified similar to the following (and Contour restarted) to set this value:

```
listener:
http2-max-concurrent-streams: 50
```


# Installing and Upgrading

For a fresh install of Contour, consult the [getting started documentation](https://projectcontour.io/getting-started/).

To upgrade an existing Contour installation, please consult the [upgrade documentation](https://projectcontour.io/resources/upgrading/).


# Compatible Kubernetes Versions

Contour v1.24.6 is tested against Kubernetes 1.24 through 1.26.


# Are you a Contour user? We would love to know!
If you're using Contour and want to add your organization to our adopters list, please visit this [page](https://github.com/projectcontour/contour/blob/master/ADOPTERS.md). If you prefer to keep your organization name anonymous but still give us feedback into your usage and scenarios for Contour, please post on this [GitHub thread](https://github.com/projectcontour/contour/issues/1269).
57 changes: 57 additions & 0 deletions changelogs/CHANGELOG-v1.25.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
We are delighted to present version v1.25.3 of Contour, our layer 7 HTTP reverse proxy for Kubernetes clusters.

- [All Changes](#all-changes)
- [Installing/Upgrading](#installing-and-upgrading)
- [Compatible Kubernetes Versions](#compatible-kubernetes-versions)

# All Changes

This release includes various dependency bumps and fixes for [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487), including:

- Update to Envoy v1.26.6. See the release notes for v1.26.5 [here](https://www.envoyproxy.io/docs/envoy/v1.26.5/version_history/v1.26/v1.26.5) and v1.26.6 [here](https://www.envoyproxy.io/docs/envoy/v1.26.6/version_history/v1.26/v1.26.6).
- Update to Go v1.20.10. See the [Go release notes](https://go.dev/doc/devel/release#go1.20.minor) for more information.

Additional mitigations have been added for CVE-2023-44487 in the form of new configuration fields:

## Max HTTP requests per IO cycle is configurable as an additional mitigation for HTTP/2 CVE-2023-44487

Envoy mitigates CVE-2023-44487 with some default runtime settings, however the `http.max_requests_per_io_cycle` does not have a default value.
This change allows configuring this runtime setting via Contour configuration to allow administrators of Contour to prevent abusive connections from starving resources from other valid connections.
The default is left as the existing behavior (no limit) so as not to impact existing valid traffic.

The Contour ConfigMap can be modified similar to the following (and Contour restarted) to set this value:

```
listener:
max-requests-per-io-cycle: 10
```

(Note this can be used in addition to the existing Listener configuration field `listener.max-requests-per-connection` which is used primarily for HTTP/1.1 connections and is an approximate limit for HTTP/2)

## HTTP/2 max concurrent streams is configurable

This field can be used to limit the number of concurrent streams Envoy will allow on a single connection from a downstream peer.
It can be used to tune resource usage and as a mitigation for DOS attacks arising from vulnerabilities like CVE-2023-44487.

The Contour ConfigMap can be modified similar to the following (and Contour restarted) to set this value:

```
listener:
http2-max-concurrent-streams: 50
```


# Installing and Upgrading

For a fresh install of Contour, consult the [getting started documentation](https://projectcontour.io/getting-started/).

To upgrade an existing Contour installation, please consult the [upgrade documentation](https://projectcontour.io/resources/upgrading/).


# Compatible Kubernetes Versions

Contour v1.25.3 is tested against Kubernetes 1.25 through 1.27.


# Are you a Contour user? We would love to know!
If you're using Contour and want to add your organization to our adopters list, please visit this [page](https://github.com/projectcontour/contour/blob/master/ADOPTERS.md). If you prefer to keep your organization name anonymous but still give us feedback into your usage and scenarios for Contour, please post on this [GitHub thread](https://github.com/projectcontour/contour/issues/1269).
57 changes: 57 additions & 0 deletions changelogs/CHANGELOG-v1.26.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
We are delighted to present version v1.26.1 of Contour, our layer 7 HTTP reverse proxy for Kubernetes clusters.

- [All Changes](#all-changes)
- [Installing/Upgrading](#installing-and-upgrading)
- [Compatible Kubernetes Versions](#compatible-kubernetes-versions)

# All Changes

This release includes various dependency bumps and fixes for [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487), including:

- Updates Envoy to v1.27.2. See the release notes for v1.27.1 [here](https://www.envoyproxy.io/docs/envoy/v1.27.1/version_history/v1.27/v1.27.1) and v1.27.2 [here](https://www.envoyproxy.io/docs/envoy/v1.27.2/version_history/v1.27/v1.27.2).
- Update to Go v1.20.10. See the [Go release notes](https://go.dev/doc/devel/release#go1.20.minor) for more information.

Additional mitigations have been added for CVE-2023-44487 in the form of new configuration fields:

## Max HTTP requests per IO cycle is configurable as an additional mitigation for HTTP/2 CVE-2023-44487

Envoy mitigates CVE-2023-44487 with some default runtime settings, however the `http.max_requests_per_io_cycle` does not have a default value.
This change allows configuring this runtime setting via Contour configuration to allow administrators of Contour to prevent abusive connections from starving resources from other valid connections.
The default is left as the existing behavior (no limit) so as not to impact existing valid traffic.

The Contour ConfigMap can be modified similar to the following (and Contour restarted) to set this value:

```
listener:
max-requests-per-io-cycle: 10
```

(Note this can be used in addition to the existing Listener configuration field `listener.max-requests-per-connection` which is used primarily for HTTP/1.1 connections and is an approximate limit for HTTP/2)

## HTTP/2 max concurrent streams is configurable

This field can be used to limit the number of concurrent streams Envoy will allow on a single connection from a downstream peer.
It can be used to tune resource usage and as a mitigation for DOS attacks arising from vulnerabilities like CVE-2023-44487.

The Contour ConfigMap can be modified similar to the following (and Contour restarted) to set this value:

```
listener:
http2-max-concurrent-streams: 50
```


# Installing and Upgrading

For a fresh install of Contour, consult the [getting started documentation](https://projectcontour.io/getting-started/).

To upgrade an existing Contour installation, please consult the [upgrade documentation](https://projectcontour.io/resources/upgrading/).


# Compatible Kubernetes Versions

Contour v1.26.1 is tested against Kubernetes 1.26 through 1.28.


# Are you a Contour user? We would love to know!
If you're using Contour and want to add your organization to our adopters list, please visit this [page](https://github.com/projectcontour/contour/blob/master/ADOPTERS.md). If you prefer to keep your organization name anonymous but still give us feedback into your usage and scenarios for Contour, please post on this [GitHub thread](https://github.com/projectcontour/contour/issues/1269).
1 change: 1 addition & 0 deletions changelogs/unreleased/5543-izturn-small.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Kubernetes labels configurability to ContourDeployment resource. to enable customize pod labels for pod/contour & pod/envoy
Loading