VictoriaMetrics / operator

Kubernetes operator for Victoria Metrics
Apache License 2.0
410 stars 141 forks source link

Update Kubebuilder go plugin #908

Closed Haleygo closed 1 month ago

Haleygo commented 4 months ago

Operator currently uses go.kubebuilder.io/v2 plugin which is already deprecated, would be great to update to v3 or v4.

[Deprecation Notice] This version is deprecated and is no longer scaffolded by default since 28 Apr 2021.The go/v2 plugin cannot scaffold projects in which CRDs and/or Webhooks have a v1 API version.Be aware that v1beta1 API for CRDs and Webhooks was deprecated on Kubernetes 1.16 and areremoved as of the Kubernetes 1.22 release. Therefore, since this plugin cannot produce projects thatwork on Kubernetes versions >= 1.22, it is recommended to upgrade your project to the latest versions available.

Two ways to implement:

  1. create a new v3 project and copy over the API and the reconciliation code, see https://book.kubebuilder.io/migration/legacy/migration_guide_v2tov3
  2. updating all the files manually, see https://book.kubebuilder.io/migration/legacy/manually_migration_guide_v2_v3#migration-from-v2-to-v3-by-updating-the-files-manually
Nageshbansal commented 4 months ago

hey @Haleygo , Can i work in this?

f41gh7 commented 4 months ago

I think we should go with second solution and use manual update.