Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap flag for connection limit overload manager resource monitor #6794

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

seth-epps
Copy link
Contributor

@seth-epps seth-epps commented Dec 6, 2024

Overview

Fixes #6309

Manual testing

Setting the configuration parameters for the enforced connection limit listener and the connection limits

diff --git a/examples/contour/01-contour-config.yaml b/examples/contour/01-contour-config.yaml
index 6eb7720b..d56b811c 100644
--- a/examples/contour/01-contour-config.yaml
+++ b/examples/contour/01-contour-config.yaml
@@ -184,3 +184,7 @@ data:
     #  socket-options:
     #    tos: 64
     #    traffic-class: 64
+    #
+    omEnforcedHealthListener:
+      address: 0.0.0.0
+      port: 8003
diff --git a/examples/contour/03-envoy.yaml b/examples/contour/03-envoy.yaml
index b9c71f39..6e4e474d 100644
--- a/examples/contour/03-envoy.yaml
+++ b/examples/contour/03-envoy.yaml
@@ -105,6 +105,7 @@ spec:
         - --envoy-cafile=/certs/ca.crt
         - --envoy-cert-file=/certs/tls.crt
         - --envoy-key-file=/certs/tls.key
+        - --overload-dowstream-max-conn=100 # arbitrary value
         command:
         - contour
         image: ghcr.io/projectcontour/contour:main

After running make install-contour-working

# kubectl -n projectcontour port-forward envoy-hq4bj 9001:9001
#
# check listener configs
#
# default stats listner (should ignore -- this is for liveness)
❯ curl -s localhost:9001/config_dump | jq '.configs[] |
  select(."@type" == "type.googleapis.com/envoy.admin.v3.ListenersConfigDump") |
  .dynamic_listeners[] | select(.name == "stats-health").active_state.listener |
  "port: \(.address.socket_address.port_value), ignore_conn_limit: \(.ignore_global_conn_limit)"'
"port: 8002, ignore_conn_limit: true"
#
# enforced connection limit listener (should enforce [null] -- this is for readiness)
#
❯ curl -s localhost:9001/config_dump | jq '.configs[] |
  select(."@type" == "type.googleapis.com/envoy.admin.v3.ListenersConfigDump") |
  .dynamic_listeners[] | select(.name == "health-om-enforced").active_state.listener |
  "port: \(.address.socket_address.port_value), ignore_conn_limit: \(.ignore_global_conn_limit)"'
"port: 8003, ignore_conn_limit: null"
#
# check bootstrap OM config
#
❯ curl -s localhost:9001/config_dump | jq '.configs[] | select(."@type" == "type.googleapis.com/envoy.admin.v3.BootstrapConfigDump") | .bootstrap.overload_manager'
{
  "refresh_interval": "0.250s",
  "resource_monitors": [
    {
      "name": "envoy.resource_monitors.global_downstream_max_connections",
      "typed_config": {
        "@type": "type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig",
        "max_active_downstream_connections": "100"
      }
    }
  ]
}

@seth-epps seth-epps requested a review from a team as a code owner December 6, 2024 19:27
@seth-epps seth-epps requested review from tsaarni and sunjayBhatia and removed request for a team December 6, 2024 19:27
@sunjayBhatia sunjayBhatia requested review from a team, rajatvig and izturn and removed request for a team December 6, 2024 19:28
@tsaarni tsaarni added the release-note/minor A minor change that needs about a paragraph of explanation in the release notes. label Dec 6, 2024
Signed-off-by: Seth Epps <[email protected]>
Signed-off-by: Seth Epps <[email protected]>
Signed-off-by: Seth Epps <[email protected]>
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 96.39640% with 4 lines in your changes missing coverage. Please review.

Project coverage is 81.08%. Comparing base (da03924) to head (1680909).
Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
cmd/contour/contour.go 0.00% 3 Missing ⚠️
cmd/contour/serve.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6794      +/-   ##
==========================================
+ Coverage   81.05%   81.08%   +0.02%     
==========================================
  Files         133      133              
  Lines       20026    20073      +47     
==========================================
+ Hits        16232    16276      +44     
- Misses       3500     3503       +3     
  Partials      294      294              
Files with missing lines Coverage Δ
cmd/contour/bootstrap.go 100.00% <100.00%> (ø)
cmd/contour/servecontext.go 84.54% <100.00%> (+0.03%) ⬆️
internal/envoy/bootstrap.go 57.14% <100.00%> (+4.87%) ⬆️
internal/envoy/v3/bootstrap.go 92.70% <100.00%> (+0.41%) ⬆️
internal/envoy/v3/stats.go 100.00% <100.00%> (ø)
internal/featuretests/v3/envoy.go 99.13% <100.00%> (+<0.01%) ⬆️
internal/featuretests/v3/featuretests.go 86.68% <100.00%> (+0.04%) ⬆️
internal/xdscache/v3/listener.go 91.98% <100.00%> (ø)
pkg/config/parameters.go 88.05% <ø> (ø)
cmd/contour/serve.go 21.74% <0.00%> (ø)
... and 1 more

Signed-off-by: Seth Epps <[email protected]>
Signed-off-by: Seth Epps <[email protected]>
@seth-epps seth-epps changed the title Add new bootstrap flag for connection limit Bootstrap flag for connection limit overload manager resource monitor Dec 19, 2024
Copy link

github-actions bot commented Jan 9, 2025

The Contour project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 14d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the PR is closed

You can:

  • Ensure your PR is passing all CI checks. PRs that are fully green are more likely to be reviewed. If you are having trouble with CI checks, reach out to the #contour channel in the Kubernetes Slack workspace.
  • Mark this PR as fresh by commenting or pushing a commit
  • Close this PR
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. release-note/minor A minor change that needs about a paragraph of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overload Manager - Max Global Downstream Connections
2 participants