https://github.com/upbound/olm-bundle
A utility to build an OLM bundle from a stream of YAMLs
https://github.com/upbound/olm-bundle
Last synced: about 1 year ago
JSON representation
A utility to build an OLM bundle from a stream of YAMLs
- Host: GitHub
- URL: https://github.com/upbound/olm-bundle
- Owner: upbound
- License: apache-2.0
- Created: 2021-03-16T14:14:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-22T21:48:43.000Z (over 2 years ago)
- Last Synced: 2025-05-08T23:45:00.036Z (about 1 year ago)
- Language: Go
- Size: 160 KB
- Stars: 5
- Watchers: 27
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# OLM Bundle
This tool can be used to produce an [Operator Lifecycle Manager](https://docs.openshift.com/container-platform/4.7/operators/understanding/olm-packaging-format.html)
bundle from a stream of YAMLs. You can additionally add metadata by using a Helm
`Chart.yaml` file.
Example:
```
helm template | \
olm-bundle \
--chart-file-path /Chart.yaml \
--extra-resources-dir \
--output-dir
```
You can use base template for the generated `ClusterServiceVersion` by having
`clusterserviceversion.yaml.tmpl` in the given output directory. Following is an
example:
```yaml
apiVersion: v1alpha1
kind: ClusterServiceVersion
metadata:
creationTimestamp: null
spec:
minKubeVersion: 1.16.0
maturity: stable
installModes:
- supported: false
type: OwnNamespace
- supported: false
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: true
type: AllNamespaces
```
Similarly, you can have `annotations.yaml.tmpl` in the output directory to have
it used as base. Following is an example:
```yaml
annotations:
operators.operatorframework.io.bundle.mediatype.v1: "registry+v1"
operators.operatorframework.io.bundle.manifests.v1: "manifests/"
operators.operatorframework.io.bundle.metadata.v1: "metadata/"
operators.operatorframework.io.bundle.package.v1: "test-operator"
operators.operatorframework.io.bundle.channels.v1: "beta,stable"
operators.operatorframework.io.bundle.channel.default.v1: "stable"
```
## Releasing
To release a new version of the tool, run the following command:
```bash
make build.all
```
This will place the binaries in `_output/bin` directory.
Create a new release with a tag and upload all the binaries as assets.