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

Start Ingress cache Controller immediately #2269

Closed
wants to merge 1 commit into from
Closed

Start Ingress cache Controller immediately #2269

wants to merge 1 commit into from

Conversation

antoineco
Copy link
Contributor

What this PR does / why we need it:

Waiting 1 extra second before starting the cache Controller for Ingress objects seems unnecessary because the call to n.store.Run() is blocking until all caches are synced.

Special notes for your reviewer:

The change was originally introduced as part of #1891, but doesn't seem relevant anymore (unless I missed some evil detail).

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: antoineco
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: caseydavenport

Assign the PR to them by writing /assign @caseydavenport in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 28, 2018
@codecov-io
Copy link

Codecov Report

Merging #2269 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2269      +/-   ##
==========================================
- Coverage   37.13%   37.12%   -0.02%     
==========================================
  Files          71       71              
  Lines        5025     5021       -4     
==========================================
- Hits         1866     1864       -2     
+ Misses       2874     2873       -1     
+ Partials      285      284       -1
Impacted Files Coverage Δ
internal/ingress/controller/store/store.go 44.08% <100%> (-0.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bc4dad...b42dcbe. Read the comment docs.

@antoineco
Copy link
Contributor Author

/assign @aledbf

@aledbf
Copy link
Member

aledbf commented Mar 28, 2018

(unless I missed some evil detail).

This 😄

As you know the controllers are independent (secrets, configmap, endpoints, services, ingress). The issue here is that the Ingress cache controller requires (in some cases) content from the others controllers (listers actually) like secrets. That is the reason why we cannot start the controllers on the same block. If you checked the linked issue in 1891 you will see one of the problems when we start at the same time (503 when an Ingress cannot fetch a secret)

@antoineco
Copy link
Contributor Author

But at that stage we only populate caches don't we?

@aledbf
Copy link
Member

aledbf commented Mar 28, 2018

But at that stage we only populate caches don't we?

We start the controllers and that will populate the local caches (listers)

@antoineco
Copy link
Contributor Author

Clarified on Slack with @aledbf:

Please don't assume the initial sync contains everything, I've seen some cases where the informer starts receiving deltas after the initial sync.

My assumption was that the initial caches were always fully populated.

@antoineco antoineco closed this Mar 28, 2018
@antoineco antoineco deleted the no-cache-sync-wait branch March 28, 2018 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants