Skip to content

Add Documentation on Distributing Projects Built with Kubebuilder with steps ( you will need to POC locally ) #4873

Closed
@camilamacedo86

Description

@camilamacedo86

Context

The current Kubebuilder documentation lacks a dedicated section on how to distribute operators built with Kubebuilder. We would like either to add how to build the bundle to publish the solution in OperatorHub.io (https://operatorhub.io/) or enabling deployment with OLM (Operator Lifecycle Manager). (https://olm.operatorframework.io/) since those are common needs.

Users, can build the solution with Kubebuilder and use Operator-SDK just to generate the bundle, give a look at operator-sdk generate bundle --help

Proposal

1. Add a new section in the Kubebuilder Book:

Location: https://book.kubebuilder.io/reference/reference

Title: Distributing Your Project

This section should be added under the reference material, and include:

2. Add a Subsection:

Title: Publishing Kubebuilder Projects to OperatorHub.io

This should provide:

Provide Makefile Target that downloads the latest SDK bin in the bin/ dir and allows generating the bundle, something like:

##@ Distribution

BUNDLE_OUTPUT_DIR ?= bundle
BUNDLE_VERSION ?= 0.1.0
BUNDLE_IMG ?= controller-bundle:$(BUNDLE_VERSION)

.PHONY: bundle
bundle: manifests kustomize ## Generate operator bundle using operator-sdk
	operator-sdk generate bundle \
		--version $(BUNDLE_VERSION) \
		--kustomize-dir config/manifests \
		--output-dir $(BUNDLE_OUTPUT_DIR) \
		--package $(shell basename $$PWD) \
		--channels alpha \
		--default-channel alpha

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions