-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial attempts at packaging for OperatorHub / OLM
- Loading branch information
1 parent
4a71be4
commit 7766488
Showing
7 changed files
with
1,606 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.