Skip to content

Allow different directory structure (related: multigroup) #1268

@jaypipes

Description

@jaypipes

I'd like to use kubebuilder for the new AWS Service Operator project. However, I'd like the following:

  • Put the manager code in cmd/aws-service-operator/main.go instead of a main.go in the root project directory (note: I'd like all command/binary code in a top-level cmd directory since that is a Golang best practice IIANM)
  • Put the CRDs in apis/{GROUP}/{VERSION}/{KIND}_types.go file (similar to multigroup=true planned functionality) -- e.g. apis/s3/bucket_types.go
  • Put the controller code in pkg/controllers/{GROUP}/{KIND}_controller.go (note: I'd like all package code in a top-level pkg directory since that is a Golang best practice IIANM)

I could imagine a kubebuilder create api --api-path-template "apis/{group}/{version}/{kind}" --controller-path-template "pkg/controllers/{group}/{kind}" ... CLI command having the flexibility to deal with both multi-group and single-group desired directory layouts.

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions