×

Operator project scaffolding layout

The operator-sdk CLI generates a number of packages for each Operator project. The following sections describes a basic rundown of each generated file and directory.

Ansible-based projects

Ansible-based Operator projects generated using the operator-sdk new --type ansible command contain the following directories and files:

File/folders Purpose

molecule/

Contains the files that are used for testing the Ansible roles.

roles/

Contains the Helm chart used while creating the project.

build/

Contains the Dockerfile and build scripts used to build the Operator.

deploy/

Contains various YAML manifests for registering CRDs, setting up RBAC, and deploying the Operator as a deployment.

requirements.yml

Contains the Ansible content that needs to be installed.

watches.yaml

Contains group, version, kind and role.

Helm-based projects

Helm-based Operator projects generated using the operator-sdk new --type helm command contain the following directories and files:

File/folders Purpose

deploy/

Contains various YAML manifests for registering CRDs, setting up RBAC, and deploying the Operator as a Deployment.

helm-charts/<kind>

Contains a Helm chart initialized using the equivalent of the helm create command.

build/

Contains the Dockerfile and build scripts used to build the Operator.

watches.yaml

Contains group, version, kind and Helm chart location.