The operator-sdk
CLI can generate, or scaffold, a number of packages and files for each Operator project.
Ansible-based Operator projects generated using the operator-sdk init --plugins ansible
command contain the following directories and files:
File or directory | Purpose |
---|---|
|
Dockerfile for building the container image for the Operator. |
|
Targets for building, publishing, deploying the container image that wraps the Operator binary, and targets for installing and uninstalling the custom resource definition (CRD). |
|
YAML file containing metadata information for the Operator. |
|
Base CRD files and the |
|
Collects all Operator manifests for deployment. Use by the |
|
Controller manager deployment. |
|
|
|
Role and role binding for leader election and authentication proxy. |
|
Sample resources created for the CRDs. |
|
Sample configurations for testing. |
|
A subdirectory for the playbooks to run. |
|
Subdirectory for the roles tree to run. |
|
Group/version/kind (GVK) of the resources to watch, and the Ansible invocation method. New entries are added by using the |
|
YAML file containing the Ansible collections and role dependencies to install during a build. |
|
Molecule scenarios for end-to-end testing of your role and Operator. |