Skip to content

Inspect loadbalancer address from Envoy ingress objects#7595

Draft
tsaarni wants to merge 3 commits into
projectcontour:mainfrom
Nordix:ingress-status-from-ingress-object
Draft

Inspect loadbalancer address from Envoy ingress objects#7595
tsaarni wants to merge 3 commits into
projectcontour:mainfrom
Nordix:ingress-status-from-ingress-object

Conversation

@tsaarni

@tsaarni tsaarni commented Jun 12, 2026

Copy link
Copy Markdown
Member

This PR is continuation of #5987 by @hligit and @kahirokunn.

Contour propagates load balancer addresses to Ingress/HTTPProxy status. Currently the address source is always a Service. This PR adds a --load-balancer-status flag that unifies address source configuration:

  • address:<addr,...>: static addresses (IP or FQDN)
  • service:<namespace>/<name>: watch a Service's LoadBalancer status
  • ingress:<namespace>/<name>: watch an Ingress object's LoadBalancer status (new)

Also available as spec.envoy.loadBalancer in ContourConfiguration CRD or load-balancer-status in config file.

Changes compared to #5987:

  • Renamed hostname: kind to address: to support both IP and FQDN
  • Updated docs and error messages
  • Refactored tests
  • Stop initializing Service watcher unconditionally, to avoid it fighting with the Ingress watcher

TODO

  • Create new specific types for CRD and config file: (1) namespaced service name ref, (2) namespaced ingress name ref and (3) list of addresses. This is the way how we have handled all existing fields as well and we had no precedence of using single string to multiplex resource references, so I think we should use <kind>:<value> only for --load-balancer-status flag (or simply not support CLI option for ingress at all)
  • Untangle how different load balancer status source parameters are passed around internally to reduce duplication and confusion

Fixes #4952

kahirokunn and others added 2 commits June 12, 2026 17:05
@tsaarni tsaarni requested a review from a team as a code owner June 12, 2026 15:31
@tsaarni tsaarni requested review from sunjayBhatia and removed request for a team June 12, 2026 15:31
@tsaarni tsaarni force-pushed the ingress-status-from-ingress-object branch from 4eb607d to bca643d Compare June 12, 2026 16:30
@tsaarni tsaarni added the release-note/minor A minor change that needs about a paragraph of explanation in the release notes. label Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.86466% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.14%. Comparing base (a172ab8) to head (eb0780c).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cmd/contour/serve.go 29.41% 60 Missing ⚠️
internal/k8s/statusaddress.go 76.08% 7 Missing and 4 partials ⚠️
cmd/contour/ingressstatus.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7595      +/-   ##
==========================================
- Coverage   82.35%   82.14%   -0.22%     
==========================================
  Files         130      130              
  Lines       15873    15994     +121     
==========================================
+ Hits        13073    13138      +65     
- Misses       2513     2566      +53     
- Partials      287      290       +3     
Files with missing lines Coverage Δ
cmd/contour/servecontext.go 86.60% <100.00%> (+0.03%) ⬆️
pkg/config/parameters.go 87.10% <ø> (ø)
cmd/contour/ingressstatus.go 26.96% <0.00%> (ø)
internal/k8s/statusaddress.go 80.54% <76.08%> (-1.48%) ⬇️
cmd/contour/serve.go 25.00% <29.41%> (+0.98%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tsaarni tsaarni force-pushed the ingress-status-from-ingress-object branch 2 times, most recently from d13ccd5 to eb0780c Compare June 12, 2026 19:27
…r-status

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
@tsaarni tsaarni force-pushed the ingress-status-from-ingress-object branch from eb0780c to 3c4b453 Compare June 16, 2026 05:45
@tsaarni tsaarni marked this pull request as draft June 16, 2026 05:45
@tsaarni

tsaarni commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

I am marking this PR as a draft because there is more work to do than I initially anticipated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

support getting LoadBalancerStatus from an Ingress (e.g. AWS ALB) or Gateway

3 participants