Kubebuilder is becoming the common way to develop operators /controllers for Kubernetes. With the release of various new features of CRD, it seems that new annotations are added to kubebuilder instead of code-generator repo. But one issue with kubebuilder and its controller-runtime and controller-tools repos is that these are not released with the same cycle as Kubernetes. In recent times, these libraries have been updated months after the last Kubernetes release. This is not a criticism of the fine folks behind kubebuilder. As a developer of Kubernetes operators/controllers, we would like to see that these tools become part of the same release cadence as Kubernetes. This will us to experiment with the new features of CRDs and release own tools and products faster after a new release of Kubernetes.
/kind feature
/sig api-machinery
/sig architecture
/area custom-resources
Kubernetes' release cadence (and, more broadly, long release cadences) are not well suited to healthy development practices, IMO. They encourage stressful pre-code-freeze crunch times, delay features because they were not able to make some arbitrary calendar date, and generally cause much misery as folks battle between trying to ensure that a release is stable versus not having to wait months to get their feature in.
We should be striving to decouple release cadences, not couple them further.
If you were to argue that we should release KubeBuilder and friends more frequently, I'm all for that -- ideally, we're releasing new minor versions every few feature PRs (basically, whenever there's enough momentum).
If you were to argue that we've done a poor job staying on top of Kubernetes releases, and that we should upgrade more aggressively, I'd buy that (it's a bit more complicated due to compatibility, but that's not an insurmountable challenge).
However, as it stands, I'm strongly opposed to coupling to the Kubernetes release cadence -- it'll only hamper KubeBuilder, and I'm not convinced that it's the best way to deal with the version skew problem.
Following up on this:
In my experience (and based on feedback I've gotten), there are a few problems being bundled into one here:
As a controller-runtime user, I want to be able to make use of the latest Kubernetes API machinery features at any given point in time
As a controller-tools user, I want to be able to generate CRDs that take advantage of the latest api extension fields (in CRDs, webhook configs, etc)
As a controller author, I want reassurance that a given version of my API types and API machinery will work with my target Kubernetes versions
As a controller author, I want assurance that generated manifests will work well with my target Kubernetes versions
As a controller author, I want to be able to include controller-runtime and third-party libraries that both depend on Kubernetes API machinery
As a controller-{runtime,tools} user, I want to be able to make use of the latest controller-{runtime,tools} features, independent of Kubernetes features
(feel free to comment if there's a case I haven't covered)
Let's look at some solutions, and see where they break down. First, though, some terminology:
- As a controller-runtime user, I want to be able to make use of the latest Kubernetes API machinery features at any given point in time
Relevant: 1, 3, 5, 6.
TL;DR: "create a minimal, stable subset of API types and functionality for controllers and clients, and don't break that" looks most promising, but requires a lot of work.
k8s.io/apimachineryk8s.io/apimachinery often changes incompatibly, meaning we need the latest k8s.io/client-go and k8s.io/api.k8s.io/client-go contains both specific and generic functionality.k8s.io/*k8s.io/apimachinery could break things in your cluster (unlikely, but it could happen), but using a newer k8s.io/api version very well might mean you accidentally use features not yet support by the specific APIs, or can't makek8s.io/apimachinery with stable versions, make a generic stable client-gok8s.io/* with major module import path versions every releaseCaveat: This requires extra effort on the Kubernetes side to not break this, and figure out what it includes.
NB: this is written mostly as a strawman -- there are a number of impracticalities here, not to mention it's not very good for both sets of code. I don't think we'd do this.
6: Solved
Problem: this is a lot of work, almost impractical
- As a controller-tools user, I want to be able to generate CRDs that take advantage of the latest api extension fields (in CRDs, webhook configs, etc)
Relevant: 2, 4, 6.
TL;DR: there's nothing that makes everyone happy here that I can see.
- As a controller author, I want reassurance that a given version of my API types and API machinery will work with my target Kubernetes versions
- As a controller author, I want assurance that generated manifests will work well with my target Kubernetes versions
Mostly discussed above -- these are constraints to consider when figuring how how to solve the problems introduced by 1 and 2.
- As a controller author, I want to be able to include controller-runtime and third-party libraries that both depend on Kubernetes API machinery
The solution from 1 ("create a minimal, stable subset of API types and functionality for controllers and clients, and don't break that")
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
We're getting progress! deads2k is putting together a KEP for solution 1 :tada:
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.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
@fejta-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.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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.
Most helpful comment
Kubernetes' release cadence (and, more broadly, long release cadences) are not well suited to healthy development practices, IMO. They encourage stressful pre-code-freeze crunch times, delay features because they were not able to make some arbitrary calendar date, and generally cause much misery as folks battle between trying to ensure that a release is stable versus not having to wait months to get their feature in.
We should be striving to decouple release cadences, not couple them further.
If you were to argue that we should release KubeBuilder and friends more frequently, I'm all for that -- ideally, we're releasing new minor versions every few feature PRs (basically, whenever there's enough momentum).
If you were to argue that we've done a poor job staying on top of Kubernetes releases, and that we should upgrade more aggressively, I'd buy that (it's a bit more complicated due to compatibility, but that's not an insurmountable challenge).
However, as it stands, I'm strongly opposed to coupling to the Kubernetes release cadence -- it'll only hamper KubeBuilder, and I'm not convinced that it's the best way to deal with the version skew problem.