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

Unregister unnecessary configMap informer #1273

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

guillaumerose
Copy link
Contributor

@guillaumerose guillaumerose commented Nov 25, 2021

Changes

It prevents controller to watch for configMap in all namespaces.

Before this change:
controller logs shows:
2021/11/25 08:46:36 Registering 5 informers

crictl stats reports 66.88MB with around 4k configMaps of 2.5kB with kind.

After this change:
controller logs shows:
2021/11/25 08:48:48 Registering 4 informers

crictl stats reports 16.29MB

Related to #1268

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Release Notes

Reduce memory usage of triggers controller

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 25, 2021
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: savitaashture

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 29, 2021
@savitaashture savitaashture added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Nov 29, 2021
@dibyom
Copy link
Member

dibyom commented Nov 29, 2021

Nice find @guillaumerose

We used to create one logging configmap per namespace for EL logging config but in #1207 we switched to passing this via env vars

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 29, 2021
@dibyom dibyom closed this Nov 29, 2021
@dibyom dibyom reopened this Nov 29, 2021
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 30, 2021
@guillaumerose
Copy link
Contributor Author

I rebased the PR and also removed configMaps from the controller test.

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 71.8% 71.8% -0.1

It prevents controller to watch for configMap in all namespaces.

Before this change:
controller logs shows:
2021/11/25 08:46:36 Registering 5 informers

crictl stats reports 66.88MB with around 4k configMaps of 2.5kB with kind.

After this change:
controller logs shows:
2021/11/25 08:48:48 Registering 4 informers

crictl stats reports 16.29MB

Related to tektoncd#1268
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 30, 2021
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/controller.go 71.8% 71.8% -0.1

Copy link
Contributor

@savitaashture savitaashture left a comment

Choose a reason for hiding this comment

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

🎉

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2021
@tekton-robot tekton-robot merged commit 208dcb3 into tektoncd:main Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

None yet

4 participants