Skip to content

update controllers watching all pods to share an informer#24470

Merged
k8s-github-robot merged 3 commits intokubernetes:masterfrom
deads2k:shared-cache-02
Apr 24, 2016
Merged

update controllers watching all pods to share an informer#24470
k8s-github-robot merged 3 commits intokubernetes:masterfrom
deads2k:shared-cache-02

Conversation

@deads2k
Copy link
Copy Markdown
Contributor

@deads2k deads2k commented Apr 19, 2016

This plumbs the shared pod informer through the various controllers to avoid duplicated watches.

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels Apr 19, 2016
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derekwaynecarr creating at point of use if one doesn't already exist. Is this factory supposed to be threadsafe, because clearly this is not.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not intended to be thread-safe.

@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Apr 19, 2016

@wojtek-t follow-up to #23575 for pods.

@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Apr 19, 2016

GCE e2e build/test passed for commit 1bf310124e5d41b602cef6110cf70942036c5140.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume the plan is to continue this for other object types?

at what point can we bite the bullet and have a informer registry tied to a particular type of resource so we can avoid passing in multiple informers in this operation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at what point can we bite the bullet and have a informer registry tied to a particular type of resource so we can avoid passing in multiple informers in this operation?

Probably two.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok,will hold you to that :-)

On Tuesday, April 19, 2016, David Eads notifications@github.com wrote:

In pkg/controller/resourcequota/replenishment_controller.go
#24470 (comment)
:

}

// NewReplenishmentControllerFactory returns a factory that knows how to build controllers
// to replenish resources when updated or deleted
-func NewReplenishmentControllerFactory(kubeClient clientset.Interface) ReplenishmentControllerFactory {
+func NewReplenishmentControllerFactory(podInformer framework.SharedInformer, kubeClient clientset.Interface) ReplenishmentControllerFactory {

at what point can we bite the bullet and have a informer registry tied to
a particular type of resource so we can avoid passing in multiple informers
in this operation?

Probably two.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/kubernetes/kubernetes/pull/24470/files/1bf310124e5d41b602cef6110cf70942036c5140#r60270619

@derekwaynecarr
Copy link
Copy Markdown
Member

This lgtm will let @wojtek-t take a pass as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jm.podController = podInformer.GetController()

is missing here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jm.podController = podInformer.GetController()

is missing here.

There is no such field in this controller. Turns out it we don't need it for this one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - I missed that you removed it :)

@wojtek-t
Copy link
Copy Markdown
Member

I added some comments - once applied, this lgtm.

@wojtek-t wojtek-t added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Apr 20, 2016
Copy link
Copy Markdown
Contributor

@soltysh soltysh Apr 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/NewReplicationManager/NewJobController

@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented Apr 20, 2016

Some nits, but overall LGTM.

@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Apr 20, 2016

comments addressed.

@wojtek-t
Copy link
Copy Markdown
Member

LGTM (it seems that everyone is fine with that, so applying label).

@wojtek-t wojtek-t added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 20, 2016
@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Apr 20, 2016

GCE e2e build/test passed for commit 3b93f7d0f0316234c56e9551e7a3376838079f57.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2016
@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Apr 21, 2016

GCE e2e build/test passed for commit 60fe17d.

@deads2k deads2k added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2016
@smarterclayton
Copy link
Copy Markdown
Contributor

e2e tests took 350s, whereas I've seen runs ~460s on average. Will be interested to see impact on load tests

@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Apr 23, 2016

GCE e2e build/test passed for commit 60fe17d.

@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Apr 23, 2016

GCE e2e build/test passed for commit 60fe17d.

@k8s-github-robot
Copy link
Copy Markdown

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Apr 24, 2016

GCE e2e build/test passed for commit 60fe17d.

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit ea15d79 into kubernetes:master Apr 24, 2016
k8s-github-robot pushed a commit that referenced this pull request Aug 2, 2016
Automatic merge from submit-queue

update node controller to use shared pod informer

continuing work from #24470 and #23575
@deads2k deads2k deleted the shared-cache-02 branch September 6, 2016 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants