Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 2.67 KB

README.md

File metadata and controls

68 lines (44 loc) · 2.67 KB

Generating Bundles (release artifact) for OperatorHub

We can use bundle.py tool to generate operator bundles. The tool takes in a list of Kubernetes resource definitions (Deployment, Role, Rolebinding, ConfigMaps ...) and some metadata (bundle description, release channels, bundle icon graphic... ) and outputs operator bundle.

Quick Links

  1. Generating Operator Bundle for Kubernetes
  2. Generating Operator Bundle for OpenShift

Concepts

Bundle Generation "Strategies"

The bundle generation strategy specifies how the tool accumulates input (list of kubernetes resources). Two strategies are supported:

  1. release-manifest: input files are collected from a pre-existing release.yaml file. This release.yaml could be from an already existing github release or from the result of ko resolve cofig.

  2. local: All input files are gathered in realtime from local repository extensive usage of kustomize.

Update Strategies

An update strategy defines the update relations of the current bundle with the previous releases (bundles). The bundle generation tool supports 2 update strategies.

  1. semver: OLM will upgrade opertor to a bundle with higher semver version, in the current subscription channel
  2. replaces: OLM will follow explict spec.replaces: <previous version> filed specification

more details: semver-mode, replaces mode

Conventions

The tool expects the following directory structure and a config.yaml for each platform.

kubernetes
├── config.yaml
├── manifests
│   ├── bases
│   │   └── tektoncd-operator.clusterserviceversion.template.yaml
│   ├── fetch-strategy-local
│   │   └── kustomization.yaml
│   └── fetch-strategy-release-manifest
│       └── kustomization.yaml

CLI flags

bundle.py cli flags

Specifying Image Overrides using config.yaml

bunele generation config.yaml

Operator LifeCycle Manager Concepts

References

  1. Operator Lifecycle Manager (OLM) Documentation
  2. Operator SDK OLM Integration Documentation
  3. OperatorHub (Community Operators) Documentation