Add new /apis/nova structure, update imports, and remove old api/#1075
Add new /apis/nova structure, update imports, and remove old api/#1075auniyal61 wants to merge 3 commits intoopenstack-k8s-operators:mainfrom
Conversation
- Create apis/nova/v1beta1/ for Nova API types - Copy all Nova API files from api/v1beta1/ to apis/nova/v1beta1/ - Create apis/go.mod with updated module path (api --> apis) - Update import paths from api/v1beta1 to apis/nova/v1beta1 dirs - Remove old api/ dir Placement will be added in a separate PR.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: auniyal61 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/9d4a0ce79e3449eebd1aeaa76a18bbc6 ❌ openstack-meta-content-provider FAILURE in 6m 18s |
0284901 to
66b2f48
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/0dc601b27ecb471db71801bb82f75085 ❌ openstack-meta-content-provider FAILURE in 9m 50s |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/1f5ad0ec578345b391db2fb308e12bd1 ❌ openstack-meta-content-provider FAILURE in 9m 21s |
| manifests: gowork controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. | ||
| $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases && \ | ||
| rm -f api/bases/* && cp -a config/crd/bases api/ | ||
| $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./apis/..." paths="./internal/..." paths="./cmd/..." output:crd:artifacts:config=config/crd/bases && \ |
There was a problem hiding this comment.
we added extra paths (internal and cmd) here for rbac permissions
scan ./apis for CRDs, ./internal and ./cmd for RBAC markers
go.mod
Outdated
| ) | ||
|
|
||
| replace github.com/openstack-k8s-operators/nova-operator/api => ./api | ||
| replace github.com/openstack-k8s-operators/nova-operator/apis => ./apis //allow-merging |
There was a problem hiding this comment.
so here used apis/ (like infra operator) instead of api/ (like openstack-operator)
to make it clear nova operator will host multiple API groups (nova, placement and eventually cyborg).
6a10cec to
237e678
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/76476cf72e7246409d658ce620195916 ❌ openstack-meta-content-provider FAILURE in 9m 24s |
- go.mod: Replaced module reference from /api to /apis, added //allow-merging comment
- PROJECT: Updated Nova API paths to apis/nova/v1beta1
- Makefile: Updated manifests, gowork, operator-lint, vet, and test targets for /apis
Use explicit controller-gen paths instead of ./...
- make manifests to generate Nova CRDs in config/crd/bases/ - creates and place all CRDs in apis/bases/
237e678 to
e1e0ed6
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/cf355f8c619047b8b17bd61514e4978d ❌ openstack-meta-content-provider FAILURE in 9m 39s |
gibizer
left a comment
There was a problem hiding this comment.
Changes in the api structure looks good to me.
Next steps are restructuring
- the internal dir
- the tests dir
- the template dir
Placement will be added in a separate PR.