Skip to content

refactor(core): change scaffolding to use kubebuilder v4 structure#989

Merged
IvoGoman merged 11 commits intomainfrom
refactor/kubebuilder-v3-to-v4
Apr 9, 2025
Merged

refactor(core): change scaffolding to use kubebuilder v4 structure#989
IvoGoman merged 11 commits intomainfrom
refactor/kubebuilder-v3-to-v4

Conversation

@IvoGoman
Copy link
Contributor

@IvoGoman IvoGoman commented Mar 14, 2025

Description

This updates the structure of the repository to more closely follow the kubebuilder/v4 scaffolding.
The previous structure was not following any kubebuilder scaffolding, thus made it hard to generate new apis/controllers/webhooks.

This also changes how CRDs are generated. In order to make patching the CRDs easier the makefile now builds the CRDs with kustomize and then copies them into the helm chart.

TODO:

  • sort out the /config folder, this currently contains all auto generated kustomize files
  • revisit hack/helmify.sh and potentially replace this with kustomize patches
  • make sure current consumers are updated (kubeconfig-generator, repo-guard)
  • double-check scaffolding now works seamlessly
  • update getting-started docs

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@IvoGoman IvoGoman force-pushed the refactor/kubebuilder-v3-to-v4 branch from 6c41277 to 8de0761 Compare April 2, 2025 14:25
@github-actions github-actions bot added documentation Improvements or additions to documentation core-apis dependencies labels Apr 2, 2025
@IvoGoman IvoGoman force-pushed the refactor/kubebuilder-v3-to-v4 branch 2 times, most recently from dd30cff to 131bfb3 Compare April 2, 2025 14:48
@IvoGoman IvoGoman marked this pull request as ready for review April 2, 2025 14:59
@IvoGoman IvoGoman requested review from a team as code owners April 2, 2025 14:59
Copy link
Collaborator

@kengou kengou left a comment

Choose a reason for hiding this comment

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

@IvoGoman IvoGoman force-pushed the refactor/kubebuilder-v3-to-v4 branch from 2b9a5cd to 267dd94 Compare April 3, 2025 07:49
@IvoGoman IvoGoman requested a review from kengou April 3, 2025 07:52
kengou
kengou previously approved these changes Apr 3, 2025
Copy link
Collaborator

@kengou kengou left a comment

Choose a reason for hiding this comment

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

lgtm

@IvoGoman IvoGoman force-pushed the refactor/kubebuilder-v3-to-v4 branch from 267dd94 to 518629f Compare April 3, 2025 15:35
@abhijith-darshan
Copy link
Contributor

abhijith-darshan commented Apr 7, 2025

could we remove the sub-folder greenhouse in the api section?

Instead of

api
|_greenhouse
   |_v1alpha1
   |_v1alpha2
   |_well-known
   |_docs

Let's keep

api
 |_v1alpha1
 |_v1alpha2
 |_well-known
 |_docs 

We would need to update the import paths everywhere, which I addressed in - https://github.com/cloudoperators/greenhouse/tree/feat/enable-conversion-webhooks

@IvoGoman IvoGoman force-pushed the refactor/kubebuilder-v3-to-v4 branch from 518629f to 2d42fc4 Compare April 7, 2025 19:20
kengou
kengou previously approved these changes Apr 7, 2025
uwe-mayer
uwe-mayer previously approved these changes Apr 8, 2025
@IvoGoman IvoGoman dismissed stale reviews from uwe-mayer and kengou via 7fe10b2 April 8, 2025 12:55
@IvoGoman IvoGoman requested review from kengou and uwe-mayer April 8, 2025 13:34
@IvoGoman IvoGoman merged commit b06ed5a into main Apr 9, 2025
23 checks passed
@IvoGoman IvoGoman deleted the refactor/kubebuilder-v3-to-v4 branch April 9, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-apis dependencies documentation Improvements or additions to documentation idproxy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants