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

✨ Add TransformStripManagedFields #2791

Merged

Conversation

alvaroaleman
Copy link
Member

@alvaroaleman alvaroaleman commented Apr 21, 2024

This change adds TransformStripManagedFields to the Cache, a transform func that strips off all managed fields for objects. There are no known issues when using this as a DefaultTransform unless there is explicit code to access objects ManagedFields and it can lead to a significant reduction in memory usage.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 21, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 21, 2024
@alvaroaleman alvaroaleman changed the title :sparkling: Add TransformStripManagedFields ✨ Add TransformStripManagedFields Apr 21, 2024
@alvaroaleman alvaroaleman force-pushed the add-default-transform branch 2 times, most recently from a7015d9 to 85aa0fc Compare April 21, 2024 15:16
This change adds `TransformStripManagedFields` to the Cache, a
transform func that strips off all managed fields for objects. There are
no known issues when using this as a `DefaultTransform` unless there is
explicit code to access objects `ManagedFields` and can lead to a
significant reduction in memory usage.
Copy link
Member

@Danil-Grigorev Danil-Grigorev left a comment

Choose a reason for hiding this comment

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

This is very useful when using client.Patch with Apply logic, thanks
/lgtm
/hold
if anyone wants to take a look

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 8bfda55969144726bdabcfb9c7cad9a597b588a0

@sbueringer
Copy link
Member

Thx!!

/approve
/lgtm

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 22, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, Danil-Grigorev, sbueringer

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:
  • OWNERS [alvaroaleman,sbueringer]

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 merged commit 5823d1b into kubernetes-sigs:main Apr 22, 2024
9 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants