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 cf-k8s-controllers to a multi-group kubebuilder project #27

Closed
acosta11 opened this issue Aug 30, 2021 · 0 comments
Closed

Migrate cf-k8s-controllers to a multi-group kubebuilder project #27

acosta11 opened this issue Aug 30, 2021 · 0 comments

Comments

@acosta11
Copy link
Member

acosta11 commented Aug 30, 2021

Background

With the initial CRDs implemented in the single workloads.cloudfoundry.org group, we realized it may be better to organize the resources in separate groups. Because there is a relatively small blast radius to the change earlier on in the project, we should address the tech debt of a monolithic api group now.

See https://kubebuilder.io/migration/multi-group.html.

Follow the kubebuilder migration docs https://kubebuilder.io/migration/multi-group.html to reorganize the project to support multiple api groups.

Acceptance Criteria

Based directly on the multi-group kubebuilder documentation:
GIVEN/WHEN I view the github.com/cloudfoundry/cf-k8s-controller repository
THEN I see:

  • The CFRoute and CFDomain custom resources are in the networking.cloudfoundry.org group

  • The api directory is now an apis directory with workloads and networking subdirectories to hold the now separately organized resources

  • The controllers directory now contains workloads and networking subdirectories to hold the now separately organized controllers

  • The kubebuilder PROJECT file is marked as multigroup: true

AND WHEN I run tests
THEN I see the envtest based controllers/group.suite_test.go files correctly install CRDs to the test environment

Impact

Organizing custom resources and controllers more granularly in the controller repository allows for clearer separation of concerns between the different technical domains of the cf implementation.

Dev Notes

We expect the new directory structure to affect imports currently in use by the first set of cf api shim stories like:

workloadsv1alpha1 "code.cloudfoundry.org/cf-k8s-controllers/api/v1alpha1"

becomes:

workloadsv1alpha1 "code.cloudfoundry.org/cf-k8s-controllers/apis/workloads/v1alpha1"

@akrishna90 akrishna90 changed the title [Chore]: Migrate cf-k8s-controllers to a multi-group kubebuilder project Migrate cf-k8s-controllers to a multi-group kubebuilder project Aug 30, 2021
matt-royal added a commit that referenced this issue Sep 2, 2021
Migrate cf-k8s-controllers to a multi-group kubebuilder project #27
acosta11 added a commit to cloudfoundry/cf-k8s-api that referenced this issue Sep 8, 2021
Follow up to cloudfoundry/korifi#27

Co-authored-by: Ashwin Krishna <krishnaas@vmware.com>
Birdrock added a commit that referenced this issue Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants