-
Notifications
You must be signed in to change notification settings - Fork 604
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
Reduce mt-broker-controller memory usage with namespaced endpoint informer #8418
Reduce mt-broker-controller memory usage with namespaced endpoint informer #8418
Conversation
…ormer Currently, the mt-broker-controller is using a cluster-wide endpoints informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE". Using the namespaced informer factory ensures that the watcher is only watching endpoints in the `knative-eventing` (also known as `SYSTEM_NAMESPACE`) namespace. Signed-off-by: Pierangelo Di Pilato <[email protected]>
/cherry-pick release-1.17 |
@pierDipi: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherry-pick release-1.16 |
/cherry-pick release-1.15 |
@pierDipi: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@pierDipi: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8418 +/- ##
==========================================
- Coverage 64.10% 64.10% -0.01%
==========================================
Files 388 388
Lines 23359 23363 +4
==========================================
+ Hits 14975 14976 +1
- Misses 7589 7591 +2
- Partials 795 796 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
509d984
to
b76b7ba
Compare
Signed-off-by: Pierangelo Di Pilato <[email protected]>
b76b7ba
to
060934f
Compare
endpointsInformer := endpointsinformer.Get(ctx) | ||
|
||
endpointsInformer := namespacedinformerfactory.Get(ctx).Core().V1().Endpoints() | ||
if err := controller.StartInformers(ctx.Done(), endpointsInformer.Informer()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew, pierDipi 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@pierDipi: new pull request created: #8420 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@pierDipi: new pull request created: #8421 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@pierDipi: new pull request created: #8422 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
…ormer (knative#8418) * Reduce mt-broker-controller memory usage with namespaced endpoint informer Currently, the mt-broker-controller is using a cluster-wide endpoints informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE". Using the namespaced informer factory ensures that the watcher is only watching endpoints in the `knative-eventing` (also known as `SYSTEM_NAMESPACE`) namespace. Signed-off-by: Pierangelo Di Pilato <[email protected]> * Start informer Signed-off-by: Pierangelo Di Pilato <[email protected]> --------- Signed-off-by: Pierangelo Di Pilato <[email protected]>
…ormer (knative#8418) (#1002) * Reduce mt-broker-controller memory usage with namespaced endpoint informer Currently, the mt-broker-controller is using a cluster-wide endpoints informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE". Using the namespaced informer factory ensures that the watcher is only watching endpoints in the `knative-eventing` (also known as `SYSTEM_NAMESPACE`) namespace. * Start informer --------- Signed-off-by: Pierangelo Di Pilato <[email protected]>
…ormer (knative#8418) * Reduce mt-broker-controller memory usage with namespaced endpoint informer Currently, the mt-broker-controller is using a cluster-wide endpoints informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE". Using the namespaced informer factory ensures that the watcher is only watching endpoints in the `knative-eventing` (also known as `SYSTEM_NAMESPACE`) namespace. Signed-off-by: Pierangelo Di Pilato <[email protected]> * Start informer Signed-off-by: Pierangelo Di Pilato <[email protected]> --------- Signed-off-by: Pierangelo Di Pilato <[email protected]>
…ormer (knative#8418) (#1012) * Reduce mt-broker-controller memory usage with namespaced endpoint informer Currently, the mt-broker-controller is using a cluster-wide endpoints informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE". Using the namespaced informer factory ensures that the watcher is only watching endpoints in the `knative-eventing` (also known as `SYSTEM_NAMESPACE`) namespace. * Start informer --------- Signed-off-by: Pierangelo Di Pilato <[email protected]> Co-authored-by: Pierangelo Di Pilato <[email protected]>
Currently, the mt-broker-controller is using a cluster-wide endpoints
informer but it actually only uses endpoints in the "SYSTEM_NAMESPACE".
Using the namespaced informer factory ensures that the watcher
is only watching endpoints in the
knative-eventing
(also known asSYSTEM_NAMESPACE
) namespace.The secret informer is already using a namesapced watcher.
The only one which is cluster-wide is the configmap watcher but
we can't remove that one since broker configurations could
exist in any namespace.
Fixes #
Proposed Changes
Pre-review Checklist
Release Note
Docs