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

🤖 Sync from open-cluster-management-io/governance-policy-propagator: #145 #496

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

magic-mirror-bot[bot]
Copy link
Contributor

It was previously copying the entire root policy status when building
the replicated policy which can get quite large when a policy applies to
thousands of clusters. Now, only the metadata and spec are copied.

In a test environment with 3000 clusters that have 10 policies apply to
it, it saved several GBs of memory allocations after the initial
reconciles completed.

Signed-off-by: mprahl <[email protected]>
(cherry picked from commit fb7d252)
Since policy objects are often deep copied, we can save on memory usage
and allocations by not caching these large unused fields.

Signed-off-by: mprahl <[email protected]>
(cherry picked from commit c3dc396)
This will save on memory utilization in the cache and every time
IsInClusterNamespace is called, it will not deep copy the entire object.

Signed-off-by: mprahl <[email protected]>
(cherry picked from commit a49cfc8)
Copy link

openshift-ci bot commented Nov 10, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: magic-mirror-bot[bot]
Once this PR has been reviewed and has the lgtm label, please assign mprahl for approval. For more information see the Kubernetes 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

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@magic-mirror-bot magic-mirror-bot bot merged commit 5173077 into main Nov 10, 2023
15 checks passed
@magic-mirror-bot magic-mirror-bot bot deleted the magic-mirror-main-1699628476421 branch November 10, 2023 15:23
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.

1 participant