This assumes an operator has been created with a tool like operator-sdk and tested locally
This also assumes that the operator follows the directory structure of the operator-sdk
Operatorhub.io has Prerequisites in place for the operator to be published
- The operator must be in a public container registry
- The operator must be in a public git repository
- The operator must have a valid semantic version
- The operator must have a valid operator package manifest
- The operator must have a valid bundle image
-
Create a bundle image The bundle directory can be created with the following command
-
in your project directory, use the kustomize command to generate the manifests
kustomize build config/manifests | operator-sdk generate bundle --version 0.0.1
-
Validate the bundle with the following command
operator-sdk bundle validate ./bundle
-
NOTE: The generated Makefile has bundling options as well:
# This generates the kustomize manifests and the bundle directory and validates the bundle. make bundle
-
-
Build and push your bundle image
docker build -f bundle.Dockerfile -t <image_name>:<tag> .
docker push quay.io/<namespace>/<operator_name>:<tag>
-
Create an Operator Package Manifest
kustomize build config/manifests | operator-sdk generate packagemanifests --version 0.0.1
-
Submit Operator to OperatorHub.io
The directory should follow the following structure:
operator
├── 1.0.0
│ ├── operator.v1.0.0.clusterserviceversion.yaml
│ ├── operator-crd1.crd.yaml
│ ├── operator-crd2.crd.yaml
│ ├── operator-crd3.crd.yaml
└── operator.package.yaml
- Fork the community-operators repo
- Copy the bundle directory to the community-operators repo
- Create a pull request to the community-operators repo