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

chore(refactor): migrate project from Kubebuilder v3 to v4 layout #84

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

programmer04
Copy link
Member

@programmer04 programmer04 commented Apr 15, 2024

What this PR does / why we need it:

Inspired by

followed the official manual too.

This PR does not modify the API surface of KGO since it's currently used as a dependency in the enterprise built. Such efforts can be addressed in a separate PR.

Which issue this PR fixes

Part of #130

Special notes for your reviewer:

The layout proposed by kubebuilder to move controllers -> internal/controller cannot be implemented because they are pulled by KGO EE, so only renaming to controller was performed.

Known limitation, calling e.g.

 kubebuilder create api --group batch --version v1 --kind CronJob

will put a newly created controller in internal/controller. Maybe all controllers that are not pulled explicitly should be put there... It's something to consider and write down as a separate issue.

The usage of sed in generate.clientsets is not great but I tested it with bot BSD and GNU sed so I think we can live with it.

@programmer04 programmer04 self-assigned this Apr 15, 2024
@programmer04 programmer04 force-pushed the kubebuilder-layout branch 5 times, most recently from e0b8231 to 4c01263 Compare April 16, 2024 16:37
@programmer04 programmer04 added this to the KGO v1.3.x milestone Apr 16, 2024
@programmer04 programmer04 marked this pull request as ready for review April 16, 2024 17:43
@programmer04 programmer04 requested a review from a team as a code owner April 16, 2024 17:43
@programmer04 programmer04 enabled auto-merge (squash) April 16, 2024 17:54
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

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

Curious if we could make kubebuilder happier by symlinking its desired names to the actual (public) locations of the packages, but IDK if that causes havoc or how much benefit it'd really provide--I assume we'd still need to move newly-added things, so probably not much.

@programmer04 programmer04 merged commit 3876430 into main Apr 16, 2024
13 checks passed
@programmer04 programmer04 deleted the kubebuilder-layout branch April 16, 2024 17:58
@pmalek
Copy link
Member

pmalek commented Apr 17, 2024

This will be a breaking change for CG dataplane-controller and we will need to coordinate its update when its KGO dependency is bumped to (probably) 1.3 which will include this change.

#130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants