Different providers may differ in their directory layout. Beginning with
the move to using CRDs and
kubebuilder the general layout follows that
defined by the
Go package Structure
cmd package contains the manager main program. Manager is responsible
for initializing shared dependencies and starting / stopping Controllers.
cmd package also contains the shared
pkg/apis/... packages contains the API resource definitions. Users edit
*_types.go files under this directory to implement their API definitions.
Each resource lives in a
controller package instantiates Cluster API controllers with provider specific Actuators.
Additional directories and files
In addition to the packages above, a Kubebuilder project has several other directories and files.
A Makefile is created with targets to build, test, run and deploy the controller artifacts for development as well as production workflows
A Dockerfile is scaffolded to build a container image for your Manager.
Kubebuilder creates yaml config for installing the CRDs and related objects under config/.
API reference documentation, user defined API samples and API conceptual documentation go here.