Skip to content

Commit

Permalink
ClusterServiceVersion (CSV) for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfordcp committed May 22, 2020
1 parent 229855d commit aba28f1
Show file tree
Hide file tree
Showing 7 changed files with 980 additions and 0 deletions.
61 changes: 61 additions & 0 deletions PACKAGING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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
```

## Defining Descriptors

https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md

## Validating Operator SDK Manifests
17 changes: 17 additions & 0 deletions operator/.osdk-scorecard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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-scorecard.yaml"
# - "example-cassdc-yaml/dse-6.8.0/example-cassdc-scorecard.yaml"

# OLM tests may only test one CR
# - olm:
# cr-manifest:
# - "example-cassdc-yaml/cassandra-3.11.6/example-cassdc-scorecard.yaml"
# # - "example-cassdc-yaml/dse-6.8.0/example-cassdc-scorecard.yaml"
# csv-path: "deploy/olm-catalog/cass-operator/1.0.0/cass-operator.v1.0.0.clusterserviceversion.yaml"

Loading

0 comments on commit aba28f1

Please sign in to comment.