kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

For go/v4, remove the option to create v1beta1 CRD and Webhooks

Open camilamacedo86 opened this issue 3 years ago • 4 comments
trafficstars

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 avatar Mar 08 '22 23:03 camilamacedo86

@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 ?

NikhilSharmaWe avatar Mar 14 '22 11:03 NikhilSharmaWe

/assign

NikhilSharmaWe avatar Mar 14 '22 11:03 NikhilSharmaWe

@camilamacedo86 Could you please respond to https://github.com/kubernetes-sigs/kubebuilder/issues/2531#issuecomment-1066653961.

NikhilSharmaWe avatar Mar 18 '22 07:03 NikhilSharmaWe

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.

camilamacedo86 avatar Mar 18 '22 15:03 camilamacedo86