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

Reduce sharedInformer memory usage #1316

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

vthapar
Copy link
Contributor

@vthapar vthapar commented Feb 12, 2024

Trim ManagedFields to reduce shared informer memory usage. This requires informers generated with newer version of k8s/client-go [0.29] so currently it is done for following informers:
- k8s
- submarinerconfig

Rest informers should be updated once WithTransform() is available.

Refer: kubernetes/kubernetes#118455

DependsOn #1318

@skitt
Copy link
Member

skitt commented Feb 12, 2024

/retest

@skitt
Copy link
Member

skitt commented Feb 12, 2024

/retest

@skitt
Copy link
Member

skitt commented Feb 13, 2024

open-cluster-management-io/api#320 updates the OCM informers.

Trim ManagedFields to reduce shared informer memory usage.
This requires informers generated with  newer version of k8s/client-go [0.29]
so currently it is done for following informers:
 - k8s
 - submarinerconfig

Rest informers should be updated once WithTransform() is available.

Refer: kubernetes/kubernetes#118455

Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
@vthapar vthapar changed the title Reduce k8s sharedInformer memory usage Reduce sharedInformer memory usage Feb 15, 2024
@tpantelis
Copy link
Collaborator

tpantelis commented Feb 26, 2024

open-cluster-management-io/api#320 updates the OCM informers.

Cool. I updated the code to use it.

@tpantelis tpantelis force-pushed the trimManagedFields branch 2 times, most recently from 64ba6de to fd9e59f Compare February 26, 2024 18:55
@tpantelis
Copy link
Collaborator

/approve

Copy link
Contributor

openshift-ci bot commented Feb 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tpantelis

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

...and use the new WithTransform function on the informers to trim
the managed fields.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@vthapar
Copy link
Contributor Author

vthapar commented Feb 27, 2024

@tpantelis We need to override the sonarcheck for this.

@tpantelis
Copy link
Collaborator

/override ci/prow/sonarcloud

Copy link
Contributor

openshift-ci bot commented Feb 27, 2024

@tpantelis: Overrode contexts on behalf of tpantelis: ci/prow/sonarcloud

In response to this:

/override ci/prow/sonarcloud

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/test-infra repository.

@tpantelis
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Feb 27, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit d8b1dfa into stolostron:main Feb 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants