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

Controller: Optimize sync process. #12918

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sergeylanzman
Copy link
Contributor

@sergeylanzman sergeylanzman commented Mar 1, 2025

What this PR does / why we need it:

Add many optimization for sync process. On huge cluster with four digit number of ingress and pods controller take up to 50GB memory and sync process too long. This PR try optimize code for less memory and cpu usage

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Local tests

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 1, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sergeylanzman
Once this PR has been reviewed and has the lgtm label, please assign strongjz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 1, 2025
@k8s-ci-robot k8s-ci-robot requested review from Gacko and strongjz March 1, 2025 20:02
@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority labels Mar 1, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @sergeylanzman. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 1, 2025
Copy link

netlify bot commented Mar 1, 2025

Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit f3b4b06
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/67c385b36ac8210008a72378

@sergeylanzman sergeylanzman force-pushed the optimization-sync-process branch 2 times, most recently from 413e74e to 8128c81 Compare March 1, 2025 21:59
@sergeylanzman sergeylanzman force-pushed the optimization-sync-process branch from 501833f to 4e62cf4 Compare March 1, 2025 22:08
@strongjz
Copy link
Member

strongjz commented Mar 2, 2025

/ok-to-test
/triage accepted
/kind feature

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/feature Categorizes issue or PR as related to a new feature. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Mar 2, 2025
@strongjz strongjz added this to the release-1.13 milestone Mar 2, 2025
Copy link
Member

@Gacko Gacko left a comment

Choose a reason for hiding this comment

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

/retitle Controller: Optimize sync process.
/triage accepted
/kind bug
/priority backlog

Looks good so far! Please ping us as soon as your WIP is ready for a final review. 🙂

Also I'm tempted to cherry-pick this to release-1.12 and release-1.11. @sergeylanzman @strongjz WDYT?

@k8s-ci-robot k8s-ci-robot changed the title add optimization for sync process Controller: Optimize sync process. Mar 3, 2025
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-priority labels Mar 3, 2025
@strongjz
Copy link
Member

strongjz commented Mar 9, 2025

I wouldn't consider this a bug like the author says, its an optimization. I am torn, this changes how the sync process works, we do our best to ensure compatibility in patch versions. I can see folks arguing that changing how the sync process works should be in a minor release. We have to remember that folks who do gitops push patch changes almost immediately, so with that in mind we should save it for 1.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants