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 <pierdipi@redhat.com>
|
/cherry-pick release-1.17 |
|
@pierDipi: once the present PR merges, I will cherry-pick it on top of DetailsIn 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 DetailsIn 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 DetailsIn 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. |
509d984 to
b76b7ba
Compare
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
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 { |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@pierDipi: new pull request created: #8420 DetailsIn 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 DetailsIn 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 DetailsIn 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 <pierdipi@redhat.com> * Start informer Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…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 <pierdipi@redhat.com>
…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 <pierdipi@redhat.com> * Start informer Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…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 <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
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