Skip to content

fix duplicated CreateIngressEx calls#9363

Open
matei wants to merge 2 commits intonginx:mainfrom
matei:fix/multiple-create-ingress-ex
Open

fix duplicated CreateIngressEx calls#9363
matei wants to merge 2 commits intonginx:mainfrom
matei:fix/multiple-create-ingress-ex

Conversation

@matei
Copy link

@matei matei commented Mar 16, 2026

Proposed changes

Problem:
when the ingress controller pods start, we have:

  1. Informers fire ADD events for every existing resource (every Service, every EndpointSlice, every Secret, etc.)
  2. Each one gets queued and processed individually via syncService(), syncEndpointSlices(), syncSecret(), etc.
  3. Each of those calls FindResourcesForService / FindResourcesForEndpoints / FindResourcesForSecret → all hitting
    findResourcesForResourceReference
  4. Each call returns the same Ingress duplicated N times (once per host)

Point 4 is the issue in findResourcesForResourceReference: if an ingress is serving 50 hosts, this method will duplicate the same IngressConfiguration / VirtualServerConfiguration / etc. object in result 50 times.
This is causing a big delay from container start to container ready (in our tests 2min+ for an ingress with 57 hosts).

Solution:
simple de-duplication in findResourcesForResourceReference. With the fix to de-duplicate, this time is reduced to 2-3s

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added bug An issue reporting a potential bug go Pull requests that update Go code labels Mar 16, 2026
@matei
Copy link
Author

matei commented Mar 16, 2026

I have hereby read the F5 CLA and agree to its terms

@AlexFenlon
Copy link
Contributor

Hi @matei, thank you for the PR.

Can you please rebase and commit again using the @matei user or accept the CLA using the @MateiStefanescu-MRM user to pass our F5 CLA.

@matei matei force-pushed the fix/multiple-create-ingress-ex branch 2 times, most recently from e202a78 to 17d0ca3 Compare March 16, 2026 13:11
@matei matei force-pushed the fix/multiple-create-ingress-ex branch from 17d0ca3 to b648175 Compare March 16, 2026 13:34
@vepatel
Copy link
Contributor

vepatel commented Mar 16, 2026

Hey @matei thanks for the PR, can you please create an issue in the repo with the same description as the PR and attach it to the PR please,
this'll help us prioritise this in our community calls

@matei
Copy link
Author

matei commented Mar 16, 2026

Hey @matei thanks for the PR, can you please create an issue in the repo with the same description as the PR and attach it to the PR please, this'll help us prioritise this in our community calls

Hey @vepatel, this is related to this issue

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

Labels

bug An issue reporting a potential bug go Pull requests that update Go code

Projects

Status: Todo ☑

Development

Successfully merging this pull request may close these issues.

3 participants