Skip to content

Commit

Permalink
fix: clear last-applied-configuration annotation to reduce memory usage
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito committed May 22, 2024
1 parent e505f91 commit 23d5db1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/callback_handler/kubernetes/reflector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ impl Reflector {
ev.modify(|obj| {
// clear managed fields to reduce memory usage
obj.managed_fields_mut().clear();
// clear last-applied-configuration to reduce memory usage
obj.annotations_mut()
.remove("kubectl.kubernetes.io/last-applied-configuration");
})
});

Expand Down

0 comments on commit 23d5db1

Please sign in to comment.