Skip to content

Commit

Permalink
Initial attempts at packaging for OperatorHub / OLM
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfordcp committed May 8, 2020
1 parent 4a71be4 commit 7766488
Show file tree
Hide file tree
Showing 7 changed files with 1,606 additions and 0 deletions.
55 changes: 55 additions & 0 deletions PACKAGING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Packaging for Operator Hub

Shamelessly pulled from the [documentation](https://sdk.operatorframework.io/docs/olm-integration/generating-a-csv/).

## Known Issues

Currently the OperatorHub.io website generates a slightly different version of the `spec.customresourcedefinitions.owned[]` field compared to `operator-sdk` (v0.17.0). The one generated by the SDK is missing some information.

You should to use the [Package Builder](https://operatorhub.io/packages) to assist in generating complete files.

## Create CSV (no previous version)

Generate Cluster Service Version (CSV)

```bash
operator-sdk generate csv --make-manifests=false --csv-version a.b.c
```

**Example:**

```bash
operator-sdk generate csv --operator-name cass-operator --csv-version 1.0.0 --make-manifests=false
```

Update files under `operator/deploy/olm-catalog/cass-operator/a.b.c`

## Update CSV

_Useful when adding a CRD to a project_

Run the generate command again and new CRDs will be added to the CSV

```bash
operator-sdk generate csv --make-manifests=false --csv-version a.b.c
```

**Example:**

```bash
operator-sdk generate csv --operator-name cass-operator --csv-version 1.0.0 --make-manifests=false
```

## Upgrade CSV

Run the generate command and specify the old version to base on

```bash
operator-sdk generate csv --make-manifests=false --csv-version d.e.f --from-version a.b.c
```

**Example:**

```bash
operator-sdk generate csv --operator-name cass-operator --csv-version 1.1.0 --make-manifests=false --from-version 1.0.0
```
13 changes: 13 additions & 0 deletions operator/.osdk-scorecard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
scorecard:
# Setting a global scorecard option
output: json
plugins:
# `basic` tests configured to test 2 CRs
- basic:
cr-manifest:
- "example-cassdc-yaml/cassandra-3.11.6/example-cassdc-minimal.yaml"
# `olm` tests configured to test 2 CRs
- olm:
cr-manifest:
- "example-cassdc-yaml/cassandra-3.11.6/example-cassdc-minimal.yaml"
csv-path: "deploy/olm-catalog/cass-operator/1.1.0/cass-operator.v1.1.0.clusterserviceversion.yaml"
Loading

0 comments on commit 7766488

Please sign in to comment.