How to generate Operator Bundles for OpenShift
March 16, 2026 ยท View on GitHub
For OpenShift Platform release we generate the
bundle for using local strategy.
Steps to generate bundles from an local files in the tree (warning: container images could be outdated, will need image replacement)
From the project root (tektoncd/operator) run
```bash
OPERATOR_RELEASE_VERSION=x.y.z
PREVIOUS_OPERATOR_RELEASE_VERSION=a.b.c
export BUNDLE_ARGS="--workspace openshift --operator-release-version ${OPERATOR_RELEASE_VERSION} --channels stable,preview --default-channel stable --fetch-strategy-local --upgrade-strategy-replaces --operator-release-previous-version ${PREVIOUS_OPERATOR_RELEASE_VERSION} --olm-skip-range '>=1.5.0 <1.6.0'"
make operator-bundle
```
CLI flags explained
| Flag | Description |
|---|---|
--workspace operatorhub/openshift | the working directory where the operator bundle should be assembled |
--operator-release-version 1.6.0 | version of the release (version of bundle) |
--channels stable,preview | target release channel(s) (eg: stable,preview) |
--default-channel stable | set default channel of the operator |
--fetch-strategy-local | gather input resources definitions from a local yaml files |
--upgrade-strategy-replaces | specify update strategy (use replaces or semver) |
--operator-release-previous-version 1.5.0 | version of the previous operator release that will be replaced by the bundle being built |
--olm-skip-range '>=1.5.0 <1.6.0' | add olm.skipRange to the CSV file in the bundle |
Steps to generate bundles from an existing github release.yaml
Note: The input release.yaml could be a github release or the result of ko resolve config
-
Make sure that we have the release manifest file ready eg:
tektoncd_operator_version=$( curl -sL https://api.github.com/repos/tektoncd/operator/releases | jq -r '.[].tag_name' | sort -Vr | head -n 1 | tr -d 'v') release_file_name=openshift-release-v${tektoncd_operator_version}.yaml curl -sL -o ${release_file_name} https://github.com/tektoncd/operator/releases/download/v${tektoncd_operator_version}/openshift-release.notags.yaml -
From the project root (tektoncd/operator) run (note abosolute path for
--release-manifestflag is necessary)export BUNDLE_ARGS="--workspace openshift --operator-release-version ${tektoncd_operator_version} --channels stable,preview --default-channel stable --fetch-strategy-release-manifest --release-manifest $(pwd)/${release_file_name} --upgrade-strategy-semver" make operator-bundleCLI flags explained
Flag Description --workspace openshiftthe working directory (inside operatorhub/) where the operator bundle should be assembled --operator-release-version ${tektoncd_operator_version}version of the release (version of bundle) --channels stable,previewtarget release channel(s) (use stable to match OpenShift operator channel) --default-channel stableset default channel of the operator --fetch-strategy-release-manifestgather input kubernetes resources from a list of yaml manifests instead of using local files --release-manifest $(pwd)/${release_file_name}specify abosolute ({release_file_name}) path to release manifest file --upgrade-strategy-semverspecify update strategy (options replacesorsemver)