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

Introduce manager caching of Unstructured #153

Merged

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Mar 6, 2022

Caching of Unstructured is disabled by default in controller-runtime, and that is suboptimal for HNC which is reconciling generic objects configured by users.

Tested: Ran both unit-tests ('make test') and integration test ('make test-e2e') successfully.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 6, 2022
@adrianludwin
Copy link
Contributor

As mentioned on Slack, it would be nice to mention in the comments why caching is off by detail (i.e. kubernetes-sigs/controller-runtime#615 (comment)) and why our use of caching won't run into problems. Otherwise lgtm!

/ok-to-test

@adrianludwin
Copy link
Contributor

Also what do you think the risk of this is? Should we delay it to v1.1?

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 16, 2022
@erikgb erikgb force-pushed the refactor/cache-improvements branch 2 times, most recently from d451e6b to 413dda1 Compare March 16, 2022 22:48
@erikgb
Copy link
Contributor Author

erikgb commented Mar 16, 2022

Also what do you think the risk of this is? Should we delay it to v1.1?

Hmmm, hard to tell. 🤔 We have been caching Unstructured for a long time in our controllers, and there seems to be quite performance gain. But on the other hand, the controller memory consumption might increase. How much depends on the cluster size and how many "object" resource types are configured in HNC. But resources tuning should any cluster-admin be able to do....

I can start by pulling out the "fixes" into a separate PR that can be merged. And leave the Unstructured caching (this PR) open for now?

@adrianludwin
Copy link
Contributor

adrianludwin commented Mar 16, 2022 via email

@rjbez17 rjbez17 added this to the release-v1.1 milestone Mar 23, 2022
@rjbez17
Copy link
Contributor

rjbez17 commented Mar 23, 2022

/hold

for 1.1

@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 Mar 23, 2022
@erikgb erikgb force-pushed the refactor/cache-improvements branch from 413dda1 to 7fbbc2a Compare March 24, 2022 14:15
Caching of Unstructured is disabled by default in controller-runtime, and that is suboptimal for HNC which is reconciling generic objects configured by users.

Tested: Ran both unit-tests ('make test') and integration test ('make test-e2e') successfully.
@erikgb erikgb force-pushed the refactor/cache-improvements branch from 7fbbc2a to 4739ff0 Compare March 24, 2022 19:07
@erikgb
Copy link
Contributor Author

erikgb commented Mar 24, 2022

I have now rebased this and fixed commit message and PR description. So should be ready for review - even if we decide to wait for 1.1 with this.

/cc @rjbez17

Copy link
Contributor

@adrianludwin adrianludwin left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin, erikgb

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:

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2022
@adrianludwin
Copy link
Contributor

/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 1, 2022
@k8s-ci-robot k8s-ci-robot merged commit adced6e into kubernetes-sigs:master Apr 1, 2022
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants