Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to kubebuilder v4 #366

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

mh013370
Copy link
Member

@mh013370 mh013370 commented Jan 16, 2024

Q A
Bug fix? no
New feature? no
API breaks? no
Deprecations? no
Related tickets fixes #365
License Apache 2.0

What's in this PR?

Migrates the operator to KubeBuilder go/v4 and operator-sdk v1.33.0, applying all appropriate migrations in the process. The migration process required re-scaffolding the entire API and all controllers in order to regenerate the PROJECT configuration, but the actual specs & controller code was copied forward. Regardless, care should be taken in reviewing this to ensure that i did not incidentally leave something out.

I updated the Makefile and all generated Kustomize configuration to match the latest in KubeBuilder. From this point, only minor updates should be required.

Primary changes:

  • main.go moved to cmd/main.go
  • controllers/ moved to internal/controller/
  • All of the config/ generated yaml was updated

Note Merging this will necessitate updating your locally installed operator-sdk to v1.33.0.

Why?

KubeBuilder go/v4 is now stable and go/v3 will be end-of-lifed and removed.

Checklist

  • Implementation tested
  • Error handling code meets the guideline
  • Logging code meets the guideline
  • User guide and development docs updated (if needed)
  • Append changelog with changes

@mh013370 mh013370 changed the title Migrate kubebuilder v4 Migrate to kubebuilder v4 Jan 16, 2024
@mh013370 mh013370 added this to the Release 2.0.0 milestone Jan 16, 2024
@mh013370 mh013370 force-pushed the migrate-kubebuilder-v4 branch 2 times, most recently from 43f3715 to e1d04e8 Compare January 16, 2024 15:50
Copy link
Contributor

@juldrixx juldrixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before taking an in-depth look and testing it, I think that the version of Operator SDK is mentionned in the documention (not sure for Kubebuilder itself), so it must be updated accordingly.

@mh013370
Copy link
Member Author

Before taking an in-depth look and testing it, I think that the version of Operator SDK is mentionned in the documention (not sure for Kubebuilder itself), so it must be updated accordingly.

Yeah, so basically upgrading to operador-sdk v1.33.0 is just migrating to kubebuilder go/v4:

https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.33.0/

Copy link
Contributor

@r65535 r65535 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial checks LGTM.
I'll test a few cluster deployments using this branch tomorrow 👍

go.mod Outdated Show resolved Hide resolved
@juldrixx
Copy link
Contributor

Before taking an in-depth look and testing it, I think that the version of Operator SDK is mentionned in the documention (not sure for Kubebuilder itself), so it must be updated accordingly.

Yeah, so basically upgrading to operador-sdk v1.33.0 is just migrating to kubebuilder go/v4:

https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.33.0/

I was thinking of NiFiKop documentation 😄

@mh013370
Copy link
Member Author

ng of NiFiKop document

Before taking an in-depth look and testing it, I think that the version of Operator SDK is mentionned in the documention (not sure for Kubebuilder itself), so it must be updated accordingly.

Yeah, so basically upgrading to operador-sdk v1.33.0 is just migrating to kubebuilder go/v4:
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.33.0/

I was thinking of NiFiKop documentation 😄

You're right it is. Updated :)

migrate to kubebuilder go/v4
go.mod Outdated Show resolved Hide resolved
Co-authored-by: Juldrixx <31806759+juldrixx@users.noreply.github.com>
@juldrixx juldrixx merged commit cb89242 into konpyutaika:master Feb 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate nifikop to KubeBuilder go/v4 from go/v3
3 participants