kcp
kcp copied to clipboard
Clean Up Our Controllers
Right now, we're using old-school Kubernetes boilerplate and the like for our controllers. This leads to a lot of boilerplate copy-paste and by my count we've got even three different implementations of Start()
. Not to mention, the code flows around creating informers and the like in the correct order are very fragile and multiple dev hours/days have been spent debugging informers that won't sync due to some mechanical issue.
We've spent time and effort fixing and re-fixing patch flows as well as hand-crafted patch statements. None of this adds value to our product and saps our available development effort. Let's consider what we can do to make writing controllers simpler and less error-prone. That might look like helpers, libraries using generics when we've got 1.18, or controller-runtime perhaps.
/cc @sttts @ncdc
controller-runtime has been discussed before. We cannot. It depends on kube and we cannot bind our fork life-cycle to some libraries' life-cycle.
Other than that, I am open to some kind of slim controller plumbing library. Generic will certainly make that much easier.
At a minimum Andy and I were hoping to get the JSON patch construction and logic around spec/status updates shared. It's currently copied around per-type everywhere.
Yes, please. That bit is most painful.
We could do controllers in kcp proper using controller-runtime, couldn't we? Just not in kcp-dev/k?
Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kcp-ci-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen
. Mark the issue as fresh with/remove-lifecycle rotten
./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.