-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Trim managedFields in controller-manager #118455
Conversation
Hi @linxiulei. 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 Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
The PR description could be improved since a single word doesn't describe it properly. And somehow I don't see any change related to ManagedFields, nor how it fixes the linked issue? Am I missing something? |
staging/src/k8s.io/controller-manager/pkg/informerfactory/informer_factory.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/code-generator/cmd/informer-gen/generators/factory.go
Outdated
Show resolved
Hide resolved
should we modify every informer according on your way which we don't use managedFileld? |
/triage accepted |
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
kubernetes/kubernetes#118455 Kubernetes-commit: c86f562f29b6b7498ea962d2ac596e6d26ecd723 Kubernetes-commit: 9c4651bd0479b84f5e5913649207476717f3f13e
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
kubernetes/kubernetes#118455 Kubernetes-commit: c86f562f29b6b7498ea962d2ac596e6d26ecd723 Kubernetes-commit: 9c4651bd0479b84f5e5913649207476717f3f13e Signed-off-by: Eric Lin <exlin@google.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
kubernetes/kubernetes#118455 Kubernetes-commit: c86f562f29b6b7498ea962d2ac596e6d26ecd723 Kubernetes-commit: 9c4651bd0479b84f5e5913649207476717f3f13e Signed-off-by: Eric Lin <exlin@google.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
kubernetes/kubernetes#118455 Kubernetes-commit: c86f562f29b6b7498ea962d2ac596e6d26ecd723 Kubernetes-commit: 9c4651bd0479b84f5e5913649207476717f3f13e Signed-off-by: Eric Lin <exlin@google.com>
We don't care about them, so why cache them and use a ton of memory. Inspired by kubernetes/kubernetes#118455 Signed-off-by: Dan Williams <dcbw@redhat.com>
kubernetes/kubernetes#118455 Kubernetes-commit: c86f562f29b6b7498ea962d2ac596e6d26ecd723 Kubernetes-commit: 9c4651bd0479b84f5e5913649207476717f3f13e Signed-off-by: Eric Lin <exlin@google.com>
Trim ManagedFields to reduce shared informer memory usage. Currently it is only for kubernetes client based informers. Once other generated clients use newer version of k8s/client-go [0.29] we can apply the trim to them too. Refer: kubernetes/kubernetes#118455 Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
Trim ManagedFields to reduce shared informer memory usage. Currently it is only for kubernetes client based informers. Once other generated clients use newer version of k8s/client-go [0.29] we can apply the trim to them too. Refer: kubernetes/kubernetes#118455 Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
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>
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>
A data race on resync was just reported in use of WithTransform in #124337 that may affect this use |
heh... We effectively can't call Transform for SYNC events here: |
Or delete events where the object is DeletedFinalStateUnknown, and maybe also for Replace (the docs there are unclear - "In cases involving Replace(), such an object can come through multiple times.") |
Good point on the DeletedFinalStateUnknown. Regarding Replace() - this is probably true in theory, but in practice we only replace with a net new result of List call, so in practice it's not a problem [although we should clarify the contract there or sth] |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Improve memory efficiency for
kube-controller-manager
Which issue(s) this PR fixes:
Fixes #118454
Special notes for your reviewer:
Does this PR introduce a user-facing change?