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

FlagDescription
--workspace operatorhub/openshiftthe working directory where the operator bundle should be assembled
--operator-release-version 1.6.0version of the release (version of bundle)
--channels stable,previewtarget release channel(s) (eg: stable,preview)
--default-channel stableset default channel of the operator
--fetch-strategy-localgather input resources definitions from a local yaml files
--upgrade-strategy-replacesspecify update strategy (use replaces or semver)
--operator-release-previous-version 1.5.0version 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

  1. 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
    
  2. From the project root (tektoncd/operator) run (note abosolute path for --release-manifest flag 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-bundle
    

    CLI flags explained

    FlagDescription
    --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 ((pwd)/(pwd)/{release_file_name}) path to release manifest file
    --upgrade-strategy-semverspecify update strategy (options replaces or semver)