kubebuilder
kubebuilder copied to clipboard
For go/v4, remove the option to create v1beta1 CRD and Webhooks
What do you want to happen?
For go/v4, remove the option to create v1beta1 CRD and Webhooks. These APIs are no longer supported since k8s 1.22 and with versions upper than controller-gen v0.6.2 and controller-runtime v0.9.2. As a workaround to allow users to move forward and not break the backwards compatibility we have been trying to downgrade the versions, see: https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v3/commons.go#L38
Places that need to be cleaned up for go/v4:
For webhooks
- https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v3/webhook.go#L72-L73
- https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v3/webhook.go#L131-L135
For CRDs
- https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v3/api.go#L109-L110
- https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v3/api.go#L190-L197
Extra Labels
No response
@camilamacedo86 Could you please explain what we have to do here for removing the option to create v1beta1 CRD and Webhooks.
- Do we have to just remove these statements you have mentioned in webhook.go and api.go which are setting different flags for webhookVersion and crdVersion ?
/assign
@camilamacedo86 Could you please respond to https://github.com/kubernetes-sigs/kubebuilder/issues/2531#issuecomment-1066653961.
Hi @NikhilSharmaWe,
All issues under the milestone https://github.com/kubernetes-sigs/kubebuilder/milestone/26 are breaking changes and can only get done when we do a go/v4 plugin. I created a task for that, see https://github.com/kubernetes-sigs/kubebuilder/issues/2547 with all details.
Then, we can apply on this one everything that is under this milestone : https://github.com/kubernetes-sigs/kubebuilder/milestone/26 Also, by default kubebuilder should still scaffold the go/v3 and it will be changed only when go/v4 be promoted to stable.