tofu-controller
tofu-controller copied to clipboard
Use a k8s cached client for the branch planner implementation
We should use a Kubernetes cached client to optimize terraform objects query since that could potentially put a lot of pressure on k8s API.
This a follow-up issue of #779 derived by Michael comment: https://github.com/weaveworks/tf-controller/pull/790#discussion_r1270837915
User Story
As a Terraform Controller user, I'd like to use a Kubernetes cached client for Terraform objects query in the branch planner implementation, so that it reduces the pressure on the k8s API and optimizes performance.
Acceptance Criteria
- [ ] Implement a Kubernetes cached client for querying Terraform objects
- [ ] Verify reduced pressure on the k8s API
Rewriting as a (controller-runtime) controller with a manager will solve this by default (see #722 for discussion).