Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit b9fa75e

Browse files
committed
Add metadata generation docs & update release docs
1 parent 720755f commit b9fa75e

File tree

5 files changed

+64
-23
lines changed

5 files changed

+64
-23
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ for more information.
2323

2424
## Setup/Development
2525

26-
1. Install [operator-sdk](https://github.com/operator-framework/operator-sdk/tree/master#quick-start).
27-
2. Run `operator-sdk generate k8s` if there's a change in api type.
28-
3. Build operator container with `operator-sdk build storageos/cluster-operator:<tag>`
29-
4. Apply the manifests in `deploy/` to install the operator
26+
1. Build operator container image with `make image/cluster-operator`. Publish or
27+
copy this container image to an existing k8s cluster to make it available
28+
for use within the cluster.
29+
2. Apply the manifests in `deploy/` to install the operator
3030
* Apply `namespace.yaml` to create the `storageos-operator` namespace.
3131
* Apply `service_account.yaml`, `role.yaml` and `role_binding.yaml` to create
3232
a service account and to grant all the permissions.
@@ -53,7 +53,11 @@ make image/cluster-operator OPERATOR_IMAGE=storageos/cluster-operator:test
5353

5454
This builds all the components and copies the binaries into the same container.
5555

56-
After creating a resource, query the resource:
56+
For any changes related to Operator Lifecycle Manager(OLM), update
57+
`deploy/storageos-operators.configmap.yaml` and run `make metadata-update` to
58+
automatically update all the CRD, CSV and package files.
59+
60+
After creating a StorageOSCluster resource, query the resource:
5761

5862
```bash
5963
$ kubectl get storageoscluster

deploy/olm/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## csv-rhel/
2+
3+
This directory contains all the CSV files for rhel releases.
4+
5+
## storageos/
6+
7+
This directory contains all the CSV files for community operator releases. It
8+
also contains CRD and package files. This directory is also used to create a
9+
diff and submit a PR to the community operator repo for publishing new
10+
release. rhel releases uses the CRD and package files from this directory.
11+
12+
## olm.sh
13+
14+
This script contains helper functions to setup OLM in a cluster, install
15+
the storageos operator and install storageos. Also includes scripts to
16+
uninstallation everything it installs.
17+
18+
19+
## community-changes.yaml, rhel-changes.yaml, package-changes.yaml
20+
21+
These files are update scripts for the yaml files used by yq yaml processor.

deploy/olm/csv-rhel/README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@ change, a new CSV with incremented version must be created.
1010
## Release Instructions
1111

1212
To create a new release:
13-
1. Update `metadata.annotations.containerImage` and deployment image with the
14-
new operator container image and `spec.version` to the new release version
15-
number in `storageos.clusterserviceversion.yaml`.
13+
1. Update `metadata.name` with new version name,
14+
`metadata.annotations.containerImage` and
15+
`spec.install.spec.deployments[0].spec.template.spec.containers[0].image` with
16+
the new operator container image, and `spec.version` to the new release version
17+
number in `deploy/olm/rhel-changes.yaml`. Run `make metadata-update` to generate
18+
`storageos.clusterserviceversion.yaml`.
19+
Any other change in the CSV file must be made in
20+
`deploy/storageos-operators.configmap.yaml` and regenerate all the metadata
21+
files.
22+
1623
2. Run `make metadata-zip` from the root of the project to generate a metadata
1724
zip file at `/build/_output/storageos-olm-metadata.zip`. This file can be
1825
directly uploaded to the rhel operator metadata scanner for a new release.
@@ -23,4 +30,4 @@ the repo to keep a record of the releases.
2330
## Testing
2431

2532
Run `make metadata-bundle-lint` from the root of the project to create a
26-
metadata bundle and lint it before submitting a new release.
33+
metadata bundle at `build/_output/` and lint it before submitting a new release.

deploy/olm/storageos/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@ releases have the release version in the file name
99
be modified because releases are versioned and can't be rereleased. For any
1010
change, a new CSV with incremented version must be created.
1111

12+
## Release Instructions
13+
14+
Update `metadata.name` with new version number,
15+
`metadata.annotations.containerImage` and
16+
`spec.install.spec.deployments[0].spec.template.spec.containers[0].image` with
17+
the new operator container image, and `spec.version` to the new release version
18+
number in `deploy/olm/community-changes.yaml`. Run `make metadata-update` to
19+
generate `storageos.clusterserviceversion.yaml`.
20+
21+
Any other change in the CSV file must be made in
22+
`deploy/storageos-operators.configmap.yaml` and regenerate all the metadata
23+
files.
24+
1225
## Testing
1326

1427
Run `make olm-lint` from the project root to lint all the file in this
1528
directory. A lint must be performed before submitting a new release to the
1629
operatorhub.
17-
18-
For e2e tests, ensure that any change in `storageos.clusterserviceversion.yaml`,
19-
`storageos.package.yaml` and all the crd.yaml files are copied to
20-
[`/deploy/storageos-operators.configmap`](/deploy/storageos-operators.configmap).
21-
The configmap is used as a catalog source in the OLM e2e tests.
22-
23-
__NOTE__: With more tooling, we should be able to generate a gRPC catalog source
24-
using the files in this directory directly, without maintaining a separate
25-
configmap.

docs/release-process.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ The release requires
1414
`deploy/olm/csv-rhel/storageos.v<version>.clusterserviceversion.yaml` and
1515
`deploy/olm/storageos/storageos.v<version>.clusterserviceversion.yaml` to be
1616
checked-in before `version` is tagged. These files should have the container
17-
image set to tag `version`. Once tagged, these containers are published using
18-
`scripts/deploy.sh`. rhel build is triggered at the same time to publish a new
19-
container in rhel container registry. The metadata zip for rhel release is
20-
generated and attached to the github release automatically. This file can then
21-
be submitted to the rhel metadata scanner for a new rhel operator release.
17+
image set to tag `version`. Update `community-changes.yaml`, `rhel-changes.yaml`
18+
and `package-changes.yaml` files with the new versions and run
19+
`make metadata-update` from project root to automatically update all the CSV and
20+
package files with new versions and images. Once tagged, these containers are
21+
published using `scripts/deploy.sh`. rhel build is triggered at the same time to
22+
publish a new container in rhel container registry. The metadata zip for rhel
23+
release is generated and attached to the github release automatically. This file
24+
can then be submitted to the rhel metadata scanner for a new rhel operator
25+
release.
26+
2227
`scripts/create-pr.sh` creates a new PR to update the community-operator with
2328
the new release. Once the PR is merged, a new version is released at
2429
operatorhub.io.

0 commit comments

Comments
 (0)