Skip to content

Commit aba28f1

Browse files
author
Christopher Bradford
committed
ClusterServiceVersion (CSV) for v1.0.0
1 parent 229855d commit aba28f1

7 files changed

Lines changed: 980 additions & 0 deletions

File tree

PACKAGING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Packaging for Operator Hub
2+
3+
Shamelessly pulled from the [documentation](https://sdk.operatorframework.io/docs/olm-integration/generating-a-csv/).
4+
5+
## Known Issues
6+
7+
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.
8+
9+
You should to use the [Package Builder](https://operatorhub.io/packages) to assist in generating complete files.
10+
11+
## Create CSV (no previous version)
12+
13+
Generate Cluster Service Version (CSV)
14+
15+
```bash
16+
operator-sdk generate csv --make-manifests=false --csv-version a.b.c
17+
```
18+
19+
**Example:**
20+
21+
```bash
22+
operator-sdk generate csv --operator-name cass-operator --csv-version 1.0.0 --make-manifests=false
23+
```
24+
25+
Update files under `operator/deploy/olm-catalog/cass-operator/a.b.c`
26+
27+
## Update CSV
28+
29+
_Useful when adding a CRD to a project_
30+
31+
Run the generate command again and new CRDs will be added to the CSV
32+
33+
```bash
34+
operator-sdk generate csv --make-manifests=false --csv-version a.b.c
35+
```
36+
37+
**Example:**
38+
39+
```bash
40+
operator-sdk generate csv --operator-name cass-operator --csv-version 1.0.0 --make-manifests=false
41+
```
42+
43+
## Upgrade CSV
44+
45+
Run the generate command and specify the old version to base on
46+
47+
```bash
48+
operator-sdk generate csv --make-manifests=false --csv-version d.e.f --from-version a.b.c
49+
```
50+
51+
**Example:**
52+
53+
```bash
54+
operator-sdk generate csv --operator-name cass-operator --csv-version 1.1.0 --make-manifests=false --from-version 1.0.0
55+
```
56+
57+
## Defining Descriptors
58+
59+
https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md
60+
61+
## Validating Operator SDK Manifests

operator/.osdk-scorecard.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
scorecard:
2+
# Setting a global scorecard option
3+
output: json
4+
plugins:
5+
# `basic` tests configured to test 2 CRs
6+
- basic:
7+
cr-manifest:
8+
- "example-cassdc-yaml/cassandra-3.11.6/example-cassdc-scorecard.yaml"
9+
# - "example-cassdc-yaml/dse-6.8.0/example-cassdc-scorecard.yaml"
10+
11+
# OLM tests may only test one CR
12+
# - olm:
13+
# cr-manifest:
14+
# - "example-cassdc-yaml/cassandra-3.11.6/example-cassdc-scorecard.yaml"
15+
# # - "example-cassdc-yaml/dse-6.8.0/example-cassdc-scorecard.yaml"
16+
# csv-path: "deploy/olm-catalog/cass-operator/1.0.0/cass-operator.v1.0.0.clusterserviceversion.yaml"
17+

0 commit comments

Comments
 (0)