Skip to content

Commit 92a4c92

Browse files
authoredFeb 24, 2021
Merge pull request operator-framework#594 from timflannagan/update-readme
README: Address markdown violations
2 parents 51afdf6 + 5aebd1f commit 92a4c92

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed
 

‎README.md

+29-24
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
[![Build Status](https://travis-ci.com/operator-framework/operator-registry.svg?branch=master)](https://travis-ci.com/operator-framework/operator-registry)
2+
23
# operator-registry
34

4-
Operator Registry runs in a Kubernetes or OpenShift cluster to provide operator catalog data to [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager).
5+
Operator Registry runs in a Kubernetes or OpenShift cluster to provide operator catalog data to [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager).
56

67
# Overview
78

89
This project provides the following binaries:
910

10-
* `opm`, which generates and updates registry databases as well as the index images that encapsulate them.
11-
* `initializer`, which takes as an input a directory of operator manifests and outputs a sqlite database containing the same data for querying.
12-
* `registry-server`, which takes a sqlite database loaded with manifests, and exposes a gRPC interface to it.
13-
* `configmap-server`, which takes a kubeconfig and a configmap reference, and parses the configmap into the sqlite database before exposing it via the same interface as `registry-server`.
14-
11+
* `opm`, which generates and updates registry databases as well as the index images that encapsulate them.
12+
* `initializer`, which takes as an input a directory of operator manifests and outputs a sqlite database containing the same data for querying.
13+
* `registry-server`, which takes a sqlite database loaded with manifests, and exposes a gRPC interface to it.
14+
* `configmap-server`, which takes a kubeconfig and a configmap reference, and parses the configmap into the sqlite database before exposing it via the same interface as `registry-server`.
15+
1516
And libraries:
16-
17-
* `pkg/client` - providing a high-level client interface for the gRPC api.
18-
* `pkg/api` - providing low-level client libraries for the gRPC interface exposed by `registry-server`.
19-
* `pkg/registry` - providing basic registry types like Packages, Channels, and Bundles.
20-
* `pkg/sqlite` - providing interfaces for building sqlite manifest databases from `ConfigMap`s or directories, and for querying an existing sqlite database.
21-
* `pkg/lib` - providing external interfaces for interacting with this project as an api that defines a set of standards for operator bundles and indexes.
22-
* `pkg/containertools` - providing an interface to interact with and shell out to common container tooling binaries (if installed on the environment)
17+
18+
* `pkg/client` - providing a high-level client interface for the gRPC api.
19+
* `pkg/api` - providing low-level client libraries for the gRPC interface exposed by `registry-server`.
20+
* `pkg/registry` - providing basic registry types like Packages, Channels, and Bundles.
21+
* `pkg/sqlite` - providing interfaces for building sqlite manifest databases from `ConfigMap`s or directories, and for querying an existing sqlite database.
22+
* `pkg/lib` - providing external interfaces for interacting with this project as an api that defines a set of standards for operator bundles and indexes.
23+
* `pkg/containertools` - providing an interface to interact with and shell out to common container tooling binaries (if installed on the environment)
2324

2425
**NOTE:** The purpose of `opm` tool is to help who needs to manage index catalogues for OLM instances. However, if you are looking for a tool to help you to integrate your operator project with OLM then you should use [Operator-SDK](https://github.com/operator-framework/operator-sdk).
2526

2627
# Manifest format
2728

2829
We refer to a directory of files with one ClusterServiceVersion as a "bundle". A bundle typically includes a ClusterServiceVersion and the CRDs that define the owned APIs of the CSV in its manifest directory, though additional objects may be included. It also includes an annotations file in its metadata folder which defines some higher level aggregate data that helps to describe the format and package information about how the bundle should be added into an index of bundles.
2930

30-
```
31+
```bash
3132
# example bundle
3233
etcd
3334
├── manifests
@@ -39,19 +40,18 @@ We refer to a directory of files with one ClusterServiceVersion as a "bundle". A
3940

4041
When loading manifests into the database, the following invariants are validated:
4142

42-
* The bundle must have at least one channel defined in the annotations.
43-
* Every bundle has exactly one ClusterServiceVersion.
44-
* If a ClusterServiceVersion `owns` a CRD, that CRD must exist in the bundle.
43+
* The bundle must have at least one channel defined in the annotations.
44+
* Every bundle has exactly one ClusterServiceVersion.
45+
* If a ClusterServiceVersion `owns` a CRD, that CRD must exist in the bundle.
4546

4647
Bundle directories are identified solely by the fact that they contain a ClusterServiceVersion, which provides an amount of freedom for layout of manifests.
4748

48-
Check out the [operator bundle design](docs/design/operator-bundle.md) for more detail on the bundle format.
49+
Check out the [operator bundle design](docs/design/operator-bundle.md) for more detail on the bundle format.
4950

5051
# Bundle images
5152

5253
Using [OCI spec](https://github.com/opencontainers/image-spec/blob/master/spec.md) container images as a method of storing the manifest and metadata contents of individual bundles, `opm` interacts directly with these images to generate and incrementally update the database. Once you have your [manifests defined](https://operator-framework.github.io/olm-book/docs/packaging-an-operator.html#writing-your-operator-manifests) and have created a directory in the format defined above, building the image is as simple as defining a [Dockerfile](docs/design/operator-bundle.md#Bundle-Dockerfile) and building that image:
5354

54-
5555
```sh
5656
podman build -t quay.io/my-container-registry-namespace/my-manifest-bundle:latest -f bundle.Dockerfile .
5757
```
@@ -137,7 +137,7 @@ apiVersion: operators.coreos.com/v1alpha1
137137
kind: Subscription
138138
metadata:
139139
name: etcd-subscription
140-
namespace: default
140+
namespace: default
141141
spec:
142142
channel: alpha
143143
name: etcd
@@ -150,7 +150,7 @@ spec:
150150
After starting a catalog locally:
151151

152152
```sh
153-
$ docker run --rm -p 50051:50051 <index image>
153+
docker run --rm -p 50051:50051 <index image>
154154
```
155155

156156
[grpcurl](https://github.com/fullstorydev/grpcurl) is a useful tool for interacting with the api:
@@ -169,8 +169,9 @@ ListPackages
169169
```
170170

171171
```sh
172-
$ grpcurl -plaintext localhost:50051 api.Registry/ListPackages
172+
grpcurl -plaintext localhost:50051 api.Registry/ListPackages
173173
```
174+
174175
```json
175176
{
176177
"name": "etcd"
@@ -181,8 +182,9 @@ $ grpcurl -plaintext localhost:50051 api.Registry/ListPackages
181182
```
182183

183184
```sh
184-
$ grpcurl -plaintext -d '{"name":"etcd"}' localhost:50051 api.Registry/GetPackage
185+
grpcurl -plaintext -d '{"name":"etcd"}' localhost:50051 api.Registry/GetPackage
185186
```
187+
186188
```json
187189
{
188190
"name": "etcd",
@@ -200,6 +202,7 @@ $ grpcurl -plaintext -d '{"name":"etcd"}' localhost:50051 api.Registry/GetPackag
200202
$ grpcurl localhost:50051 describe api.Registry.GetBundleForChannel
201203
api.Registry.GetBundleForChannel is a method:
202204
```
205+
203206
```json
204207
{
205208
"name": "GetBundleForChannel",
@@ -214,6 +217,7 @@ api.Registry.GetBundleForChannel is a method:
214217
$ grpcurl localhost:50051 describe api.GetBundleInChannelRequest
215218
api.GetBundleInChannelRequest is a message:
216219
```
220+
217221
```json
218222
{
219223
"name": "GetBundleInChannelRequest",
@@ -246,8 +250,9 @@ api.GetBundleInChannelRequest is a message:
246250
```
247251

248252
```sh
249-
$ grpcurl -plaintext -d '{"pkgName":"etcd","channelName":"alpha"}' localhost:50051 api.Registry/GetBundleForChannel
253+
grpcurl -plaintext -d '{"pkgName":"etcd","channelName":"alpha"}' localhost:50051 api.Registry/GetBundleForChannel
250254
```
255+
251256
```json
252257
{
253258
"csvName": "etcdoperator.v0.9.2",

0 commit comments

Comments
 (0)
Please sign in to comment.